1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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:
usa 2007-12-28 10:29:55 +00:00
parent 371977ff3d
commit b1b238da2c
2 changed files with 8 additions and 3 deletions

View file

@ -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>
* encoding.c (rb_locale_encoding): defined.

View file

@ -95,9 +95,9 @@ readline_readline(int argc, VALUE *argv, VALUE self)
add_history(buff);
}
if (buff) {
rb_io_t *ifp;
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);
if (ifp->enc)
enc = ifp->enc;
@ -123,7 +123,7 @@ readline_s_set_input(VALUE self, VALUE input)
Check_Type(input, T_FILE);
GetOpenFile(input, 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;
}