summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-26 05:05:07 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-26 05:05:07 +0000
commit1e039d96f3c391cea3138c8c2c01d4f4757b0433 (patch)
tree292ad711525eec192a1c656e3dc44014b28385e4 /test
parent7c884e9012cbba4c7636fb7850cd7090eeab2fa6 (diff)
fix test_too_long_string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_marshal.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index 049db1221e..e2151e71c5 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -66,7 +66,8 @@ class TestMarshal < Test::Unit::TestCase
end
def test_too_long_string
- (data = Marshal.dump(C.new("a")))[-2, 1] = "\003\377\377\377"
+ data = Marshal.dump(C.new("a".force_encoding("ascii-8bit")))
+ data[-2, 1] = "\003\377\377\377"
e = assert_raise(ArgumentError, "[ruby-dev:32054]") {
Marshal.load(data)
}