summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_marshal.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index 619aaa6736..9eea3c272e 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -810,7 +810,11 @@ class TestMarshal < Test::Unit::TestCase
hash = Marshal.load(data)
assert_equal(42, ruby2_keywords_test(*[hash]))
- hash2 = Marshal.load(data.sub!(/\x06K(?=T\z)/, "\x08KEY"))
+ hash2 = Marshal.load(data.sub(/\x06K(?=T\z)/, "\x08KEY"))
+ assert_raise(ArgumentError, /\(given 1, expected 0\)/) {
+ ruby2_keywords_test(*[hash2])
+ }
+ hash2 = Marshal.load(data.sub(/:\x06K(?=T\z)/, "I\\&\x06:\x0dencoding\"\x0dUTF-16LE"))
assert_raise(ArgumentError, /\(given 1, expected 0\)/) {
ruby2_keywords_test(*[hash2])
}