Closed vincentwoo closed 10 years ago
On Ruby ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
I get slightly different output.
% rescue foo.rb
/home/kyrylo/.gem/ruby/2.1.0/gems/pry-rescue-1.3.1/lib/pry-rescue.rb:154:in `without_bindings_below_raise': undefined method `size' for nil:NilClass (NoMethodError)
from /home/kyrylo/.gem/ruby/2.1.0/gems/pry-rescue-1.3.1/lib/pry-rescue.rb:51:in `enter_exception_context'
from /home/kyrylo/.gem/ruby/2.1.0/gems/pry-rescue-1.3.1/lib/pry-rescue/core_ext.rb:37:in `rescued'
from /home/kyrylo/.gem/ruby/2.1.0/gems/pry-rescue-1.3.1/lib/pry-rescue/core_ext.rb:17:in `rescue in block (2 levels) in rescue'
from /home/kyrylo/.gem/ruby/2.1.0/gems/pry-rescue-1.3.1/lib/pry-rescue/core_ext.rb:14:in `block (2 levels) in rescue'
from /home/kyrylo/.gem/ruby/2.1.0/gems/pry-rescue-1.3.1/lib/pry-rescue/core_ext.rb:13:in `catch'
from /home/kyrylo/.gem/ruby/2.1.0/gems/pry-rescue-1.3.1/lib/pry-rescue/core_ext.rb:13:in `block in rescue'
from /home/kyrylo/.gem/ruby/2.1.0/gems/pry-rescue-1.3.1/lib/pry-rescue/core_ext.rb:12:in `loop'
from /home/kyrylo/.gem/ruby/2.1.0/gems/pry-rescue-1.3.1/lib/pry-rescue/core_ext.rb:12:in `rescue'
from /home/kyrylo/.gem/ruby/2.1.0/gems/pry-rescue-1.3.1/lib/pry-rescue.rb:70:in `load'
from /home/kyrylo/.gem/ruby/2.1.0/gems/pry-rescue-1.3.1/bin/rescue:42:in `<top (required)>'
from /home/kyrylo/.gem/ruby/2.1.0/bin/rescue:23:in `load'
from /home/kyrylo/.gem/ruby/2.1.0/bin/rescue:23:in `<main>'
pry-rescue's stacktrace and binding seem to be in the wrong place when the script in question has a syntax error: