From 8df4864c005675b808b2facb9125e5902accdb3a Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Tue, 6 May 2014 00:13:28 -0700 Subject: [PATCH] Correct check for internal bindings [Fix #1022] --- lib/pry/commands/reload_code.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pry/commands/reload_code.rb b/lib/pry/commands/reload_code.rb index e5a891f9..70413386 100644 --- a/lib/pry/commands/reload_code.rb +++ b/lib/pry/commands/reload_code.rb @@ -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