diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb index 723674738..9e3db1f87 100644 --- a/lib/irb/completion.rb +++ b/lib/irb/completion.rb @@ -144,7 +144,7 @@ def self.retrieve_completion_data(input, bind: IRB.conf[:MAIN_CONTEXT].workspace select_message(receiver, message, candidates, sep) end - when /^(?-?(0[dbo])?[0-9_]+(\.[0-9_]+)?(([eE][+-]?[0-9]+)?i?|r)?)(?\.|::)(?[^.]*)$/ + when /^(?-?(?:0[dbo])?[0-9_]+(?:\.[0-9_]+)?(?:(?:[eE][+-]?[0-9]+)?i?|r)?)(?\.|::)(?[^.]*)$/ # Numeric receiver = $~[:num] sep = $~[:sep]