From 8e5af8b628b2a52d203e43ad5a8b18375f801cde Mon Sep 17 00:00:00 2001 From: hsbt Date: Sat, 9 Aug 2014 01:36:49 +0000 Subject: * lib/cmath.rb: fixed indent. * lib/drb/ssl.rb: ditto. * lib/irb/**/*.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/irb/input-method.rb | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'lib/irb/input-method.rb') diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb index 55363fe0c4..0b765d377b 100644 --- a/lib/irb/input-method.rb +++ b/lib/irb/input-method.rb @@ -133,14 +133,14 @@ module IRB include Readline # Creates a new input method object using Readline def initialize - super + super - @line_no = 0 - @line = [] - @eof = false + @line_no = 0 + @line = [] + @eof = false - @stdin = IO.open(STDIN.to_i, :external_encoding => IRB.conf[:LC_MESSAGES].encoding, :internal_encoding => "-") - @stdout = IO.open(STDOUT.to_i, 'w', :external_encoding => IRB.conf[:LC_MESSAGES].encoding, :internal_encoding => "-") + @stdin = IO.open(STDIN.to_i, :external_encoding => IRB.conf[:LC_MESSAGES].encoding, :internal_encoding => "-") + @stdout = IO.open(STDOUT.to_i, 'w', :external_encoding => IRB.conf[:LC_MESSAGES].encoding, :internal_encoding => "-") end # Reads the next line from this input method. @@ -149,13 +149,13 @@ module IRB def gets Readline.input = @stdin Readline.output = @stdout - if l = readline(@prompt, false) - HISTORY.push(l) if !l.empty? - @line[@line_no += 1] = l + "\n" - else - @eof = true - l - end + if l = readline(@prompt, false) + HISTORY.push(l) if !l.empty? + @line[@line_no += 1] = l + "\n" + else + @eof = true + l + end end # Whether the end of this input method has been reached, returns +true+ @@ -163,7 +163,7 @@ module IRB # # See IO#eof? for more information. def eof? - @eof + @eof end # Whether this input method is still readable when there is no more data to @@ -171,7 +171,7 @@ module IRB # # See IO#eof for more information. def readable_after_eof? - true + true end # Returns the current line number for #io. @@ -180,12 +180,12 @@ module IRB # # See IO#lineno for more information. def line(line_no) - @line[line_no] + @line[line_no] end # The external encoding for standard input. def encoding - @stdin.external_encoding + @stdin.external_encoding end end rescue LoadError -- cgit v1.2.3