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

[ruby/reline] Fix crash to input é. refs #174

https://github.com/ruby/reline/commit/ba5e267e5f
This commit is contained in:
manga_osyo 2020-11-12 12:36:48 +09:00 committed by aycabta
parent ff4656ee64
commit e47e5db889

View file

@ -89,6 +89,9 @@ class Reline::Unicode
| #{ EastAsianWidth::TYPE_NA }
| #{ EastAsianWidth::TYPE_N }
)
| (?<ambiguous_width>
#{EastAsianWidth::TYPE_A}
)
/x
def self.get_mbchar_width(mbchar)
@ -98,6 +101,7 @@ class Reline::Unicode
when m[:width_3] then 3
when m[:width_0] then 0
when m[:width_1] then 1
when m[:ambiguous_width] then Reline.ambiguous_width
else
nil
end