From ce384ef5a95b809f248e089c1608e60753dabe45 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 20 Aug 2022 00:16:43 +0900 Subject: [Bug #18955] Check length of argument for `%c` in proper encoding --- test/ruby/test_m17n.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index c00bf59e18..2c6fcee004 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -892,6 +892,8 @@ class TestM17N < Test::Unit::TestCase assert_raise(Encoding::CompatibilityError) { "%s%s" % [s("\xc2\xa1"), e("\xc2\xa1")] } + + "%c" % "\u3042".encode('Windows-31J') end def test_sprintf_p -- cgit v1.2.3