1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix number literal regexp of IRB completion

This commit is contained in:
aycabta 2019-05-27 01:59:17 +09:00
parent e39c950c2b
commit 0f35c79ad6

View file

@ -145,7 +145,7 @@ module IRB
select_message(receiver, message, candidates, sep)
end
when /^(?<num>-?(0[dbo])?[0-9_]+(\.[0-9_]+)?([eE]-?[0-9]+)?)(?<sep>\.|::)(?<mes>[^.]*)$/
when /^(?<num>-?(0[dbo])?[0-9_]+(\.[0-9_]+)?([eE][+-]?[0-9]+i?|r)?)(?<sep>\.|::)(?<mes>[^.]*)$/
# Numeric
receiver = $~[:num]
sep = $~[:sep]