diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-28 10:29:55 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-28 10:29:55 +0000 |
| commit | 009d277aeb72c2b7e8d338f8dc80ab8206d61339 (patch) | |
| tree | 6983ee7e169dba5efcb8a8cdee8cfddeba557f7b /ext | |
| parent | 919246e0bd79e1c0f30f6562542b1ee903dc1a31 (diff) | |
| download | ruby-009d277aeb72c2b7e8d338f8dc80ab8206d61339.tar.gz ruby-009d277aeb72c2b7e8d338f8dc80ab8206d61339.tar.xz ruby-009d277aeb72c2b7e8d338f8dc80ab8206d61339.zip | |
* ext/readline/readline.c (readline_readline, readline_s_set_input):
use mReadline directly because self is not always same.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/readline/readline.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 045892f45..ea9d97ca6 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -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; } |
