diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-13 00:58:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-13 00:58:30 +0000 |
commit | d70719b0614f8624020f8cdc561a426a45cdda1b (patch) | |
tree | 8b381f9b6e6e32f71c362ae83b91c634a264154b /test/ruby | |
parent | 4150c2c05dff1a034af010bb6a6c11ad9abd05ac (diff) |
* 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
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_encoding.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_encoding.rb b/test/ruby/test_encoding.rb index 6e442b564b..6edad2418f 100644 --- a/test/ruby/test_encoding.rb +++ b/test/ruby/test_encoding.rb @@ -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 |