aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_m17n.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-08-20 00:16:43 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-08-20 03:57:13 +0900
commitce384ef5a95b809f248e089c1608e60753dabe45 (patch)
tree8628b9c8480e6f0601f5e4a540781a4edfeadc30 /test/ruby/test_m17n.rb
parent4177f60eedd71b846d9a86889fd46071ecdb0158 (diff)
downloadruby-ce384ef5a95b809f248e089c1608e60753dabe45.tar.gz
[Bug #18955] Check length of argument for `%c` in proper encoding
Diffstat (limited to 'test/ruby/test_m17n.rb')
-rw-r--r--test/ruby/test_m17n.rb2
1 files changed, 2 insertions, 0 deletions
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