ruby-changes:30446
From: naruse <ko1@a...>
Date: Mon, 12 Aug 2013 02:58:15 +0900 (JST)
Subject: [ruby-changes:30446] naruse:r42525 (trunk): * ext/readline/readline.c (readline_s_set_input): on OS X with editline,
naruse 2013-08-12 02:58:07 +0900 (Mon, 12 Aug 2013) New Revision: 42525 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42525 Log: * ext/readline/readline.c (readline_s_set_input): on OS X with editline, Readline.readline doesn't work because readline_get doesn't use rl_getc. The difference is introduced by r42402 [ruby-dev:47509] [Bug #8644]. Before it rb_io_stdio_file set ifp->stdio_file. Therefore add manually setting the value. * ext/readline/readline.c (readline_s_set_onput): ditto. Modified files: trunk/ChangeLog trunk/ext/readline/readline.c Index: ChangeLog =================================================================== --- ChangeLog (revision 42524) +++ ChangeLog (revision 42525) @@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Aug 12 02:51:32 2013 NARUSE, Yui <naruse@r...> + + * ext/readline/readline.c (readline_s_set_input): on OS X with editline, + Readline.readline doesn't work because readline_get doesn't use + rl_getc. The difference is introduced by r42402 [ruby-dev:47509] + [Bug #8644]. Before it rb_io_stdio_file set ifp->stdio_file. + Therefore add manually setting the value. + + * ext/readline/readline.c (readline_s_set_onput): ditto. + Sun Aug 11 23:27:00 2013 Nobuyoshi Nakada <nobu@r...> * file.c (rb_str_encode_ospath): OS path encoding on Mac OS X is also Index: ext/readline/readline.c =================================================================== --- ext/readline/readline.c (revision 42524) +++ ext/readline/readline.c (revision 42525) @@ -503,6 +503,7 @@ readline_s_set_input(VALUE self, VALUE i https://github.com/ruby/ruby/blob/trunk/ext/readline/readline.c#L503 rb_sys_fail("fdopen"); } rl_instream = f; + ifp->stdio_file = f; readline_instream = input; } return input; @@ -557,6 +558,7 @@ readline_s_set_output(VALUE self, VALUE https://github.com/ruby/ruby/blob/trunk/ext/readline/readline.c#L558 rb_sys_fail("fdopen"); } rl_outstream = f; + ofp->stdio_file = f; readline_outstream = output; } return output; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/