diff --git a/lib/pry/commands.rb b/lib/pry/commands.rb index fcff5d61..b1558832 100644 --- a/lib/pry/commands.rb +++ b/lib/pry/commands.rb @@ -176,9 +176,7 @@ class Pry meth_name = meth_name_from_binding.call(target) meth_name = "N/A" if !meth_name - # FIX ME!!! this line is screwed - # check_for_dynamically_defined_method.call() - if file =~ /(\(.*\))|<.*>/ + if file =~ /(\(.*\))|<.*>/ || file == "" output.puts "Cannot find local context. Did you use `binding.pry` ?" next end @@ -463,7 +461,7 @@ e.g: eval-file -c self "hello.rb" next end - target.eval("#{obj}.pry") + target.eval("#{obj}").pry end process_comment_markup = lambda do |comment, code_type| diff --git a/lib/pry/hooks.rb b/lib/pry/hooks.rb index 22baee90..10546905 100644 --- a/lib/pry/hooks.rb +++ b/lib/pry/hooks.rb @@ -11,7 +11,7 @@ class Pry file = target.eval('__FILE__') # /unknown/ for rbx - if file !~ /(\(.*\))|<.*>/ && file !~ /__unknown__/ + if file !~ /(\(.*\))|<.*>/ && file !~ /__unknown__/ && file != "" Pry.run_command "whereami", :output => out, :show_output => true, :context => target, :commands => Pry::Commands end end, diff --git a/lib/pry/version.rb b/lib/pry/version.rb index d2a89576..a408e0ca 100644 --- a/lib/pry/version.rb +++ b/lib/pry/version.rb @@ -1,3 +1,3 @@ class Pry - VERSION = "0.7.7.1" + VERSION = "0.7.7.2" end