summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-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 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