Closed sent-hil closed 8 years ago
Thanks for the report @sent-hil. I've rewritten pry-nav with a different tracer and added breakpoints. Check out pry-debugger: https://github.com/nixme/pry-debugger
Let me know if you still see this issue with pry-debugger. Thanks.
@nixme Sorry for taking so long to reply back. I tried it with pry-debugger and I see the same behavior.
sent-hil:~/ $ pry [13:15:38]
[1] pry(main)> require 'pry-debugger'
=> false
[2] pry(main)> class Post
[2] pry(main)* def initialize
[2] pry(main)* binding.pry
[2] pry(main)* puts 'before'
[2] pry(main)* puts 'after'
[2] pry(main)* end
[2] pry(main)* end
=> nil
[3] pry(main)> Post.new
From: (pry) @ line 3 Post#initialize:
3: def initialize
=> 4: binding.pry
5: puts 'before'
6: puts 'after'
7: end
[1] pry(#<Post>)> next
From: (pry) @ line 3 Post#initialize:
3: def initialize
4: binding.pry
=> 5: puts 'before'
6: puts 'after'
7: end
[3] pry(#<Post>)> next
before
From: (pry) @ line 3 Post#initialize:
3: def initialize
4: binding.pry
5: puts 'before'
=> 6: puts 'after'
7: end
[5] pry(#<Post>)> next
after
From: /Users/sent-hil/.rvm/gems/ruby-1.9.3-p194/gems/pry-0.9.10/lib/pry/pry_instance.rb @ line 276 Pry#re:
271: code = r(target)
272:
273: exec_hook :before_eval, code, self
274:
275: result = target.eval(code, Pry.eval_path, Pry.current_line)
=> 276: set_last_result(result, target, code)
277:
278: result
279: rescue RescuableException => e
280: self.last_exception = e
281: e
[7] pry(#<Pry>)> next
From: /Users/sent-hil/.rvm/gems/ruby-1.9.3-p194/gems/pry-0.9.10/lib/pry/pry_instance.rb @ line 278 Pry#re:
273: exec_hook :before_eval, code, self
274:
275: result = target.eval(code, Pry.eval_path, Pry.current_line)
276: set_last_result(result, target, code)
277:
=> 278: result
279: rescue RescuableException => e
280: self.last_exception = e
281: e
282: ensure
283: update_input_history(code)
[9] pry(#<Pry>)> next
From: /Users/sent-hil/.rvm/gems/ruby-1.9.3-p194/gems/pry-0.9.10/lib/pry/pry_instance.rb @ line 283 Pry#re:
278: result
279: rescue RescuableException => e
280: self.last_exception = e
281: e
282: ensure
=> 283: update_input_history(code)
284: exec_hook :after_eval, result, self
285: end
286:
287: # Perform a read.
288: # If no parameter is given, default to top-level (main).