mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/irb.rb (IRB::Irb::eval_input): rescues Interrupt and other than
SystemExit and SignalException. [ruby-core:15359] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
185849a664
commit
8bc75b5bb0
3 changed files with 19 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sat Feb 9 00:44:52 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/irb.rb (IRB::Irb::eval_input): rescues Interrupt and other than
|
||||||
|
SystemExit and SignalException. [ruby-core:15359]
|
||||||
|
|
||||||
Fri Feb 8 23:51:36 2008 Tanaka Akira <akr@fsij.org>
|
Fri Feb 8 23:51:36 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* missing/lgamma_r.c (lgamma_r): use smaller argument for sin function.
|
* missing/lgamma_r.c (lgamma_r): use smaller argument for sin function.
|
||||||
|
|
18
lib/irb.rb
18
lib/irb.rb
|
@ -148,10 +148,15 @@ module IRB
|
||||||
line.untaint
|
line.untaint
|
||||||
@context.evaluate(line, line_no)
|
@context.evaluate(line, line_no)
|
||||||
output_value if @context.echo?
|
output_value if @context.echo?
|
||||||
rescue StandardError, ScriptError, Abort
|
exc = nil
|
||||||
$! = RuntimeError.new("unknown exception raised") unless $!
|
rescue Interrupt => exc
|
||||||
print $!.class, ": ", $!, "\n"
|
rescue SystemExit, SignalException
|
||||||
if $@[0] =~ /irb(2)?(\/.*|-.*|\.rb)?:/ && $!.class.to_s !~ /^IRB/
|
raise
|
||||||
|
rescue Exception => exc
|
||||||
|
end
|
||||||
|
if exc
|
||||||
|
print exc.class, ": ", exc, "\n"
|
||||||
|
if exc.backtrace[0] =~ /irb(2)?(\/.*|-.*|\.rb)?:/ && exc.class.to_s !~ /^IRB/
|
||||||
irb_bug = true
|
irb_bug = true
|
||||||
else
|
else
|
||||||
irb_bug = false
|
irb_bug = false
|
||||||
|
@ -160,7 +165,7 @@ module IRB
|
||||||
messages = []
|
messages = []
|
||||||
lasts = []
|
lasts = []
|
||||||
levels = 0
|
levels = 0
|
||||||
for m in $@
|
for m in exc.backtrace
|
||||||
m = @context.workspace.filter_backtrace(m) unless irb_bug
|
m = @context.workspace.filter_backtrace(m) unless irb_bug
|
||||||
if m
|
if m
|
||||||
if messages.size < @context.back_trace_limit
|
if messages.size < @context.back_trace_limit
|
||||||
|
@ -182,8 +187,7 @@ module IRB
|
||||||
print "Maybe IRB bug!!\n" if irb_bug
|
print "Maybe IRB bug!!\n" if irb_bug
|
||||||
end
|
end
|
||||||
if $SAFE > 2
|
if $SAFE > 2
|
||||||
warn "Error: irb does not work for $SAFE level higher than 2"
|
abort "Error: irb does not work for $SAFE level higher than 2"
|
||||||
exit 1
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#define RUBY_VERSION "1.9.0"
|
#define RUBY_VERSION "1.9.0"
|
||||||
#define RUBY_RELEASE_DATE "2008-02-08"
|
#define RUBY_RELEASE_DATE "2008-02-09"
|
||||||
#define RUBY_VERSION_CODE 190
|
#define RUBY_VERSION_CODE 190
|
||||||
#define RUBY_RELEASE_CODE 20080208
|
#define RUBY_RELEASE_CODE 20080209
|
||||||
#define RUBY_PATCHLEVEL 0
|
#define RUBY_PATCHLEVEL 0
|
||||||
|
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
#define RUBY_VERSION_TEENY 0
|
#define RUBY_VERSION_TEENY 0
|
||||||
#define RUBY_RELEASE_YEAR 2008
|
#define RUBY_RELEASE_YEAR 2008
|
||||||
#define RUBY_RELEASE_MONTH 2
|
#define RUBY_RELEASE_MONTH 2
|
||||||
#define RUBY_RELEASE_DAY 8
|
#define RUBY_RELEASE_DAY 9
|
||||||
|
|
||||||
#ifdef RUBY_EXTERN
|
#ifdef RUBY_EXTERN
|
||||||
RUBY_EXTERN const char ruby_version[];
|
RUBY_EXTERN const char ruby_version[];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue