diff options
author | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-13 05:01:10 +0000 |
---|---|---|
committer | keiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-13 05:01:10 +0000 |
commit | 5ee43b0a94d2743f97cdee5e83e6093243af7559 (patch) | |
tree | 93e834712f490847cc219c9e467b4c57d8c162a2 /lib/irb | |
parent | c871aee96b0d5112ecc040cd56e84a2d7fe2e3c5 (diff) |
* lib/irb/completion.rb (CompletionProc): fix [ruby-dev:40953]
[Bug #3126]. Thanks Kazuhiro NISHIYAMA.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb')
-rw-r--r-- | lib/irb/completion.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb index a345c23af7..e059bc4055 100644 --- a/lib/irb/completion.rb +++ b/lib/irb/completion.rb @@ -81,10 +81,10 @@ module IRB candidates.grep(/^#{receiver}/).collect{|e| "::" + e} # when /^(((::)?[A-Z][^:.\(]*)+)::?([^:.]*)$/ - when /^([A-Z].*)::([^:.]+)*$/ + when /^([A-Z].*)::([^:.]*)$/ # Constant or class methods receiver = $1 - message = Regexp.quote($4) + message = Regexp.quote($2) begin candidates = eval("#{receiver}.constants.collect{|m| m.to_s}", bind) candidates |= eval("#{receiver}.methods.collect{|m| m.to_s}", bind) @@ -134,7 +134,7 @@ module IRB when /^([^."].*)\.([^.]*)$/ # variable receiver = $1 - message = Regexp.quote($3) + message = Regexp.quote($2) gv = eval("global_variables", bind).collect{|m| m.to_s} lv = eval("local_variables", bind).collect{|m| m.to_s} |