mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
45592f4b4c
commit
8e5af8b628
32 changed files with 1363 additions and 1357 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue