ruby-changes:63931
From: manga_osyo <ko1@a...>
Date: Sat, 5 Dec 2020 03:09:28 +0900 (JST)
Subject: [ruby-changes:63931] e47e5db889 (master): [ruby/reline] Fix crash to input ``. refs #174
https://git.ruby-lang.org/ruby.git/commit/?id=e47e5db889 From e47e5db88943b7421f802f1fdfd34ba2224ec057 Mon Sep 17 00:00:00 2001 From: manga_osyo <manga.osyo@g...> Date: Thu, 12 Nov 2020 12:36:48 +0900 Subject: =?UTF-8?q?[ruby/reline]=20Fix=20crash=20to=20input=20`=C3=A9`.=20?= =?UTF-8?q?refs=20#174?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/ruby/reline/commit/ba5e267e5f diff --git a/lib/reline/unicode.rb b/lib/reline/unicode.rb index df2f671..d482997 100644 --- a/lib/reline/unicode.rb +++ b/lib/reline/unicode.rb @@ -89,6 +89,9 @@ class Reline::Unicode https://github.com/ruby/ruby/blob/trunk/lib/reline/unicode.rb#L89 | #{ 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 https://github.com/ruby/ruby/blob/trunk/lib/reline/unicode.rb#L101 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/