From b08c1bea3632062d0689affac4e0e78523349af0 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 30 Jan 2020 12:08:37 +0900 Subject: [PATCH] [ruby/irb] Unnamed groups are not captured when named groups are used https://github.com/ruby/irb/commit/0a641a69b0 --- 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 7277bf5504..c44aa9039e 100644 --- a/lib/irb/completion.rb +++ b/lib/irb/completion.rb @@ -148,7 +148,7 @@ module IRB 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]