mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Simplify getting a method from a binding
This commit is contained in:
parent
7297a471e9
commit
c2e58d8e9a
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ class Pry
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue