diff options
Diffstat (limited to 'lib/irb/completion.rb')
-rw-r--r-- | lib/irb/completion.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb index 459f856dfe..6ba168e813 100644 --- a/lib/irb/completion.rb +++ b/lib/irb/completion.rb @@ -138,10 +138,7 @@ module IRB lv = eval("local_variables", bind).collect{|m| m.to_s} cv = eval("self.class.constants", bind).collect{|m| m.to_s} - if (gv | lv | cv).include?(receiver) - # foo.func and foo is local var. - candidates = eval("#{receiver}.methods", bind).collect{|m| m.to_s} - elsif /^[A-Z]/ =~ receiver and /\./ !~ receiver + if (gv | lv | cv).include?(receiver) || /^[A-Z]/ =~ receiver and /\./ !~ receiver # Foo::Bar.func begin candidates = eval("#{receiver}.methods", bind).collect{|m| m.to_s} |