mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use more strict regexp to avoid to match naninanirb.rb
This commit is contained in:
parent
ffab1bfdfc
commit
88d6009d91
2 changed files with 3 additions and 3 deletions
|
@ -553,7 +553,7 @@ module IRB
|
|||
end
|
||||
|
||||
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)
|
||||
irb_bug = true
|
||||
else
|
||||
|
|
|
@ -124,8 +124,8 @@ EOF
|
|||
|
||||
# error message manipulator
|
||||
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]
|
||||
when 1
|
||||
return nil if bt =~ %r!/tmp/irb-binding!
|
||||
|
|
Loading…
Add table
Reference in a new issue