burke / zeus

Boot any rails app in under a second.
MIT License
3.33k stars 231 forks source link

Use defined? instead of respond_to? in Pry monkeypatch #678

Closed dmcinnes closed 9 months ago

dmcinnes commented 3 years ago

I'm not clear on what is going on, though currently I'm getting errors on the latest version of pry when I try to do anything in a console:

(pry) output error: #<NameError: undefined local variable or method `_pry_' for #<Pry::Pager:0x00007fe77e5c8b50>

It seems like pry_instance is defined as an instance variable when this is run, so respond_to? doesn't pick it up. This change to defined? will work for instance variables AND method definitions to cover our bases.