diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-09 01:36:49 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-09 01:36:49 +0000 |
commit | 8e5af8b628b2a52d203e43ad5a8b18375f801cde (patch) | |
tree | 457d72a0f7ac4ea97949ec5b317b359a7d776089 /lib/irb/xmp.rb | |
parent | 45592f4b4c7e835881538e52172932c3e20d0c4d (diff) | |
download | ruby-8e5af8b628b2a52d203e43ad5a8b18375f801cde.tar.gz |
* 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
Diffstat (limited to 'lib/irb/xmp.rb')
-rw-r--r-- | lib/irb/xmp.rb | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/irb/xmp.rb b/lib/irb/xmp.rb index 947d2cf5a2..2e3fefc4ba 100644 --- a/lib/irb/xmp.rb +++ b/lib/irb/xmp.rb @@ -85,16 +85,16 @@ class XMP if @irb.context.ignore_sigint begin - trap_proc_b = trap("SIGINT"){@irb.signal_handle} - catch(:IRB_EXIT) do - @irb.eval_input - end + trap_proc_b = trap("SIGINT"){@irb.signal_handle} + catch(:IRB_EXIT) do + @irb.eval_input + end ensure - trap("SIGINT", trap_proc_b) + trap("SIGINT", trap_proc_b) end else catch(:IRB_EXIT) do - @irb.eval_input + @irb.eval_input end end end @@ -117,10 +117,10 @@ class XMP # See IO#gets for more information. def gets while l = @exps.shift - next if /^\s+$/ =~ l - l.concat "\n" - print @prompt, l - break + next if /^\s+$/ =~ l + l.concat "\n" + print @prompt, l + break end l end @@ -131,14 +131,14 @@ class XMP # doesn't match the previous expression evaluated. def puts(exps) if @encoding and exps.encoding != @encoding - enc = Encoding.compatible?(@exps.join("\n"), exps) - if enc.nil? - raise Encoding::CompatibilityError, "Encoding in which the passed expression is encoded is not compatible to the preceding's one" - else - @encoding = enc - end + enc = Encoding.compatible?(@exps.join("\n"), exps) + if enc.nil? + raise Encoding::CompatibilityError, "Encoding in which the passed expression is encoded is not compatible to the preceding's one" + else + @encoding = enc + end else - @encoding = exps.encoding + @encoding = exps.encoding end @exps.concat exps.split(/\n/) end |