filter_backtrace(bt)
public
error message manipulator
Show source
def filter_backtrace(bt)
case IRB.conf[:CONTEXT_MODE]
when 0
return nil if bt =~ /\(irb_local_binding\)/
when 1
if(bt =~ %/tmp/irb-binding! or
bt =~ %irb/.*\.rb! or
bt =~ /irb\.rb/)
return nil
end
when 2
return nil if bt =~ /irb\/.*\.rb/
return nil if bt =~ /irb\.rb/
when 3
return nil if bt =~ /irb\/.*\.rb/
return nil if bt =~ /irb\.rb/
bt = bt.sub(/:\s*in `irb_binding'/, '')
end
bt
end