From 0a641a69b014b3edb7948181f4450ac03eb74748 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 30 Jan 2020 12:08:37 +0900 Subject: [PATCH] Unnamed groups are not captured when named groups are used --- lib/irb/completion.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]