Permalink
Browse files

Simplify getting a method from a binding

  • Loading branch information...
1 parent 7297a47 commit c2e58d8e9a41cc97ccb068a93446154c4d7f03bd @ConradIrwin ConradIrwin committed Sep 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/pry/method.rb
View
@@ -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

0 comments on commit c2e58d8

Please sign in to comment.