From 6b4f8945d600168bf530d21395da8293fbd5e8ba Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 26 Nov 2024 11:05:16 +0900 Subject: Many of Oniguruma functions need valid encoding strings --- test/ruby/test_string.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index c8b9aeb597..d2099607fd 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -169,6 +169,10 @@ CODE assert_equal(nil, S("\u{3042 3044 3046}")[RbConfig::LIMITS["LONG_MIN"], 1]) end + def test_AREF_invalid_encoding + assert_equal(S("\x80"), S("A"*39+"\x80")[-1, 1]) + end + def test_ASET # '[]=' s = S("FooBar") s[0] = S('A') -- cgit v1.2.3