diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-11-26 11:05:16 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu.nakada@gmail.com> | 2024-11-26 11:46:34 +0900 |
| commit | 6b4f8945d600168bf530d21395da8293fbd5e8ba (patch) | |
| tree | 00423c31613b2b7b3ce91ed7b745f67ebbd77944 /test/ruby | |
| parent | 02b70256b5171d4b85ea7eeab836d3d7cfb3dbfc (diff) | |
Many of Oniguruma functions need valid encoding strings
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12169
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_string.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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') |
