Using rbenv
to try ruby 2.4.3 vs 2.5.1.
Works in 2.4.3:
$ rbenv local 2.4.3 && bundle && bundle exec rescue bug.rb
Using bundler 1.16.2
Using coderay 1.1.2
Using interception 0.5
Using method_source 0.9.0
Using pry 0.11.3
Using pry-rescue 1.4.5
Bundle complete! 1 Gemfile dependency, 6 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
From: /home/artm/src/triage/pry-rescue/bug.rb @ line 1 :
=> 1: 1 / 0
ZeroDivisionError: divided by 0
from /home/artm/src/triage/pry-rescue/bug.rb:1:in `/'
[1] pry(main)>
Broken in 2.5.1:
$ rbenv local 2.5.1 && bundle && bundle exec rescue bug.rb
Using bundler 1.16.2
Using coderay 1.1.2
Using interception 0.5
Using method_source 0.9.0
Using pry 0.11.3
Using pry-rescue 1.4.5
Bundle complete! 1 Gemfile dependency, 6 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
bundler: failed to load command: rescue (/home/artm/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/bin/rescue)
ArgumentError: Hook with name 'enable_rescuing' already defined!
/home/artm/.rbenv/gems/2.5.0/gems/pry-0.11.3/lib/pry/hooks.rb:74:in `add_hook'
/home/artm/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/pry-rescue-1.4.5/lib/pry-rescue.rb:28:in `<top (required)>'
/home/artm/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/pry-rescue-1.4.5/bin/rescue:51:in `require'
/home/artm/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/pry-rescue-1.4.5/bin/rescue:51:in `<top (required)>'
/home/artm/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/bin/rescue:23:in `load'
/home/artm/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/bin/rescue:23:in `<top (required)>'