Use more strict regexp to avoid to match naninanirb.rb
This commit is contained in:
parent
ffab1bfdfc
commit
88d6009d91
@ -553,7 +553,7 @@ module IRB
|
|||||||
end
|
end
|
||||||
|
|
||||||
def handle_exception(exc)
|
def handle_exception(exc)
|
||||||
if exc.backtrace && exc.backtrace[0] =~ /irb(2)?(\/.*|-.*|\.rb)?:/ && exc.class.to_s !~ /^IRB/ &&
|
if exc.backtrace && exc.backtrace[0] =~ /\/irb(2)?(\/.*|-.*|\.rb)?:/ && exc.class.to_s !~ /^IRB/ &&
|
||||||
!(SyntaxError === exc)
|
!(SyntaxError === exc)
|
||||||
irb_bug = true
|
irb_bug = true
|
||||||
else
|
else
|
||||||
|
@ -124,8 +124,8 @@ EOF
|
|||||||
|
|
||||||
# error message manipulator
|
# error message manipulator
|
||||||
def filter_backtrace(bt)
|
def filter_backtrace(bt)
|
||||||
return nil if bt =~ /irb\/.*\.rb/
|
return nil if bt =~ /\/irb\/.*\.rb/
|
||||||
return nil if bt =~ /irb\.rb/
|
return nil if bt =~ /\/irb\.rb/
|
||||||
case IRB.conf[:CONTEXT_MODE]
|
case IRB.conf[:CONTEXT_MODE]
|
||||||
when 1
|
when 1
|
||||||
return nil if bt =~ %r!/tmp/irb-binding!
|
return nil if bt =~ %r!/tmp/irb-binding!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user