fix test_too_long_string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-01-26 05:05:07 +00:00
parent 7c884e9012
commit 1e039d96f3

View File

@ -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)
}