mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/irb/context.rb: fix irb --readline
option. [ruby-dev:40955]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
97335c53e6
commit
0bace243b0
2 changed files with 19 additions and 4 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
Fri Jul 29 16:12:02 005 Keiju Ishitsuka <keiju@ruby-lang.org>
|
||||||
|
* lib/irb/context.rb: fix `irb --readline` option. [ruby-dev:40955]
|
||||||
|
|
||||||
Fri Jul 29 09:59:38 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Fri Jul 29 09:59:38 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* eval.c (rb_call0): fix calling zsuper from a method with anonymous
|
* eval.c (rb_call0): fix calling zsuper from a method with anonymous
|
||||||
|
|
|
@ -58,12 +58,24 @@ module IRB
|
||||||
|
|
||||||
case input_method
|
case input_method
|
||||||
when nil
|
when nil
|
||||||
if (defined?(ReadlineInputMethod) &&
|
case use_readline?
|
||||||
(use_readline? || IRB.conf[:PROMPT_MODE] != :INF_RUBY && STDIN.tty?))
|
when nil
|
||||||
@io = ReadlineInputMethod.new
|
if (defined?(ReadlineInputMethod) && STDIN.tty? &&
|
||||||
else
|
IRB.conf[:PROMPT_MODE] != :INF_RUBY)
|
||||||
|
@io = ReadlineInputMethod.new
|
||||||
|
else
|
||||||
|
@io = StdioInputMethod.new
|
||||||
|
end
|
||||||
|
when false
|
||||||
@io = StdioInputMethod.new
|
@io = StdioInputMethod.new
|
||||||
|
when true
|
||||||
|
if defined?(ReadlineInputMethod)
|
||||||
|
@io = ReadlineInputMethod.new
|
||||||
|
else
|
||||||
|
@io = StdioInputMethod.new
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
when String
|
when String
|
||||||
@io = FileInputMethod.new(input_method)
|
@io = FileInputMethod.new(input_method)
|
||||||
@irb_name = File.basename(input_method)
|
@irb_name = File.basename(input_method)
|
||||||
|
|
Loading…
Reference in a new issue