summaryrefslogtreecommitdiff
path: root/test/ruby/test_marshal.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-09-23 19:33:48 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-09-23 22:04:19 +0900
commit96c8964e0e65bb6e232f1da6b4725404cf4f4540 (patch)
treea6e4ae5323fdfcdd264d74926f610b4657014b76 /test/ruby/test_marshal.rb
parent4704bc09767cb885315abf7393605fcb930fddb8 (diff)
downloadruby-96c8964e0e65bb6e232f1da6b4725404cf4f4540.tar.gz
Revive the test using US-ASCII incompatible symbol
Diffstat (limited to 'test/ruby/test_marshal.rb')
-rw-r--r--test/ruby/test_marshal.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index 58831f3709..f7f273af42 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -814,6 +814,10 @@ class TestMarshal < Test::Unit::TestCase
assert_raise(ArgumentError, /\(given 1, expected 0\)/) {
ruby2_keywords_test(*[hash2])
}
+ hash2 = Marshal.load(data.sub(/:\x06K(?=T\z)/, "I\\&\x06:\x0dencoding\"\x0aUTF-7"))
+ assert_raise(ArgumentError, /\(given 1, expected 0\)/) {
+ ruby2_keywords_test(*[hash2])
+ }
end
def test_invalid_byte_sequence_symbol