1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Pry::CodeObject: binding_lookup --> empty_lookup

This commit is contained in:
John Mair 2013-01-09 01:37:08 +01:00
parent 439c5c6811
commit 0608c0effa

View file

@ -27,7 +27,7 @@ class Pry
co = new(str, target, _pry_, options) co = new(str, target, _pry_, options)
co.default_lookup || co.method_or_class_lookup || co.default_lookup || co.method_or_class_lookup ||
co.command_lookup || co.binding_lookup co.command_lookup || co.empty_lookup
end end
end end
@ -38,7 +38,7 @@ class Pry
def initialize(str, target, _pry_, options={}) def initialize(str, target, _pry_, options={})
options = { options = {
:super => 0 :super => 0,
}.merge!(options) }.merge!(options)
@str = str @str = str
@ -53,8 +53,7 @@ class Pry
pry.commands.find_command_by_match_or_listing(str) rescue nil pry.commands.find_command_by_match_or_listing(str) rescue nil
end end
# extract the object from the binding def empty_lookup
def binding_lookup
return nil if str && !str.empty? return nil if str && !str.empty?
if internal_binding?(target) if internal_binding?(target)