* ext/readline/readline.c (readline_readline, readline_s_set_input):
use mReadline directly because self is not always same. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
371977ff3d
commit
b1b238da2c
@ -1,3 +1,8 @@
|
|||||||
|
Fri Dec 28 19:29:07 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/readline/readline.c (readline_readline, readline_s_set_input):
|
||||||
|
use mReadline directly because self is not always same.
|
||||||
|
|
||||||
Fri Dec 28 19:11:28 2007 Tanaka Akira <akr@fsij.org>
|
Fri Dec 28 19:11:28 2007 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* encoding.c (rb_locale_encoding): defined.
|
* encoding.c (rb_locale_encoding): defined.
|
||||||
|
@ -95,9 +95,9 @@ readline_readline(int argc, VALUE *argv, VALUE self)
|
|||||||
add_history(buff);
|
add_history(buff);
|
||||||
}
|
}
|
||||||
if (buff) {
|
if (buff) {
|
||||||
rb_io_t *ifp;
|
|
||||||
rb_encoding* enc;
|
rb_encoding* enc;
|
||||||
VALUE input = rb_ivar_get(self, id_var_input);
|
VALUE input = rb_ivar_get(mReadline, id_var_input);
|
||||||
|
rb_io_t *ifp;
|
||||||
GetOpenFile(input, ifp);
|
GetOpenFile(input, ifp);
|
||||||
if (ifp->enc)
|
if (ifp->enc)
|
||||||
enc = ifp->enc;
|
enc = ifp->enc;
|
||||||
@ -123,7 +123,7 @@ readline_s_set_input(VALUE self, VALUE input)
|
|||||||
Check_Type(input, T_FILE);
|
Check_Type(input, T_FILE);
|
||||||
GetOpenFile(input, ifp);
|
GetOpenFile(input, ifp);
|
||||||
rl_instream = rb_io_stdio_file(ifp);
|
rl_instream = rb_io_stdio_file(ifp);
|
||||||
rb_ivar_set(self, id_var_input, input);
|
rb_ivar_set(mReadline, id_var_input, input);
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user