Skip to content

Commit

Permalink
Unnamed groups are not captured when named groups are used
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Feb 21, 2020
1 parent cc42036 commit 0a641a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/irb/completion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def self.retrieve_completion_data(input, bind: IRB.conf[:MAIN_CONTEXT].workspace
select_message(receiver, message, candidates, sep)
end

when /^(?<num>-?(0[dbo])?[0-9_]+(\.[0-9_]+)?(([eE][+-]?[0-9]+)?i?|r)?)(?<sep>\.|::)(?<mes>[^.]*)$/
when /^(?<num>-?(?:0[dbo])?[0-9_]+(?:\.[0-9_]+)?(?:(?:[eE][+-]?[0-9]+)?i?|r)?)(?<sep>\.|::)(?<mes>[^.]*)$/
# Numeric
receiver = $~[:num]
sep = $~[:sep]
Expand Down

0 comments on commit 0a641a6

Please sign in to comment.