diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/irb/completion.rb | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Sat Dec 29 21:57:11 2012 Keiju Ishitsuka <[email protected]> + + * lib/irb/completion.rb: treat rightly comletion for symbol on irb + [Bug #7632]. + Sat Dec 29 21:51:30 2012 Shugo Maeda <[email protected]> * ext/curses/curses.c (window_cury, window_curx, window_maxy, diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb index 3b4a07186f..3be0610c6e 100644 --- a/lib/irb/completion.rb +++ b/lib/irb/completion.rb @@ -44,7 +44,7 @@ module IRB when /^((["'`]).*\2)\.([^.]*)$/ # String receiver = $1 - message = $3 + message = Regexp.quote($3) candidates = String.instance_methods.collect{|m| m.to_s} select_message(receiver, message, candidates) @@ -79,7 +79,7 @@ module IRB if Symbol.respond_to?(:all_symbols) sym = $1 candidates = Symbol.all_symbols.collect{|s| ":" + s.id2name} - candidates.grep(/^#{sym}/) + candidates.grep(/^#{Regexp.quote(sym)}/) else [] end |