summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_marshal.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index 2c5b2aa765..6b7c9c105f 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -598,6 +598,7 @@ class TestMarshal < Test::Unit::TestCase
def test_packed_string
packed = ["foo"].pack("p")
- assert_equal(Marshal.dump(""+packed), Marshal.dump(packed))
+ bare = "".force_encoding(Encoding::ASCII_8BIT) << packed
+ assert_equal(Marshal.dump(bare), Marshal.dump(packed))
end
end