diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/irb/completion.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb index 76111393b6..c21ebfbdbd 100644 --- a/lib/irb/completion.rb +++ b/lib/irb/completion.rb @@ -166,10 +166,12 @@ module IRB def self.retrieve_completion_data(input, bind: IRB.conf[:MAIN_CONTEXT].workspace.binding, doc_namespace: false) case input - when /^((["'`]).*\2)\.([^.]*)$/ + # this regexp only matches the closing character because of irb's Reline.completer_quote_characters setting + # details are described in: https://github.com/ruby/irb/pull/523 + when /^(.*["'`])\.([^.]*)$/ # String receiver = $1 - message = $3 + message = $2 if doc_namespace "String.#{message}" @@ -178,7 +180,9 @@ module IRB select_message(receiver, message, candidates) end - when /^(\/[^\/]*\/)\.([^.]*)$/ + # this regexp only matches the closing character because of irb's Reline.completer_quote_characters setting + # details are described in: https://github.com/ruby/irb/pull/523 + when /^(.*\/)\.([^.]*)$/ # Regexp receiver = $1 message = $2 |