Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simplify getting a method from a binding

  • Loading branch information...
commit c2e58d8e9a41cc97ccb068a93446154c4d7f03bd 1 parent 7297a47
@ConradIrwin ConradIrwin authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/pry/method.rb
View
2  lib/pry/method.rb
@@ -67,7 +67,7 @@ def from_binding(b)
nil
else
method = begin
- new(b.eval("::Object.instance_method(:method).bind(self).call(#{meth_name.to_s.inspect})"))
+ new(Object.instance_method(:method).bind(b.eval("self")).call(meth_name))
rescue NameError, NoMethodError
Disowned.new(b.eval('self'), meth_name.to_s)
end
Please sign in to comment.
Something went wrong with that request. Please try again.