1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* marshal.c (r_ivar): should not set internal encoding ivar as an

ordinary ivar.  [ruby-dev:38596]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-06-13 00:58:30 +00:00
parent 4150c2c05d
commit d70719b061
3 changed files with 16 additions and 3 deletions

View file

@ -60,4 +60,12 @@ class TestEncoding < Test::Unit::TestCase
assert_instance_of(String, v)
end
end
def test_marshal
str = "".force_encoding("EUC-JP")
str2 = Marshal.load(Marshal.dump(str))
assert_equal(str, str2)
str2 = Marshal.load(Marshal.dump(str2))
assert_equal(str, str2, '[ruby-dev:38596]')
end
end