summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_encoding.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-13 00:58:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-13 00:58:30 +0000
commit7f9a3a2d7d6d3f9e024c0c4a63df8fd418c20f1e (patch)
tree8b381f9b6e6e32f71c362ae83b91c634a264154b /test/ruby/test_encoding.rb
parent9a59b7a099fc551c7f0cde78a4b93f47f6bfcc1a (diff)
downloadruby-7f9a3a2d7d6d3f9e024c0c4a63df8fd418c20f1e.tar.gz
ruby-7f9a3a2d7d6d3f9e024c0c4a63df8fd418c20f1e.tar.xz
ruby-7f9a3a2d7d6d3f9e024c0c4a63df8fd418c20f1e.zip
* marshal.c (r_ivar): should not set internal encoding ivar as an
ordinary ivar. [ruby-dev:38596] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_encoding.rb')
-rw-r--r--test/ruby/test_encoding.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_encoding.rb b/test/ruby/test_encoding.rb
index 6e442b564..6edad2418 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