ConradIrwin / pry-rescue

Start a pry session whenever something goes wrong.
MIT License
852 stars 49 forks source link

bin/rescue: use the realpath #110

Closed DamienRobert closed 4 years ago

DamienRobert commented 6 years ago

This fixes issue #109.

Since ruby 2.5, require 'pry-rescue' uses the realpath of the pry-rescue gem. But bin/rescue specify an absolute path to load 'pry-rescue'.

So if 'pry-rescue' is in a path that contains a symlink, it will be loaded twice, once from bin/rescue (at the absolute path) and the other one via 'pry' automatic loading of plugins (at the real path).

Then the pry hooks will be called twice, which yield an error. See also https://github.com/pry/pry/pull/1762

joallard commented 4 years ago

Merci @DamienRobert !

DamienRobert commented 4 years ago

Great, thanks to you!