Skip to content

Commit

Permalink
* lib/irb/completion.rb (CompletionProc): fix [ruby-dev:40953]
Browse files Browse the repository at this point in the history
   [Bug ruby#3126]. Thanks Kazuhiro NISHIYAMA.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
keiju committed Apr 13, 2010
1 parent c871aee commit 5ee43b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Tue Apr 13 13:57:36 2010 Keiju Ishitsuka <[email protected]>

* lib/irb/completion.rb (CompletionProc): fix [ruby-dev:40953]
[Bug #3126]. Thanks Kazuhiro NISHIYAMA.

Tue Apr 13 09:32:12 2010 NARUSE, Yui <[email protected]>

* transcode.c (transcode_loop): insert output the value when
Expand Down
6 changes: 3 additions & 3 deletions lib/irb/completion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ module InputCompletor
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)
Expand Down Expand Up @@ -134,7 +134,7 @@ module InputCompletor
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}
Expand Down

0 comments on commit 5ee43b0

Please sign in to comment.