1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Correct check for internal bindings [Fix #1022]

This commit is contained in:
Conrad Irwin 2014-05-06 00:13:28 -07:00
parent bb5745aa55
commit 8df4864c00

View file

@ -10,14 +10,14 @@ class Pry
e.g reload-code MyClass#my_method #=> reload a method
reload-code MyClass #=> reload a class
reload-code my-command #=> reload a pry command
reload-code self #=> reload the 'current' object
reload-code #=> identical to reload-code self
reload-code self #=> reload the current object
reload-code #=> reload the current file or object
BANNER
def process
if !args.empty?
reload_object(args.join(" "))
elsif Class === target.eval("self")
elsif internal_binding?(target)
reload_object("self")
else
reload_current_file