diff options
Diffstat (limited to 'lib/irb')
-rw-r--r-- | lib/irb/completion.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |