diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index 85cec0a..ecf4478 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -32,6 +32,14 @@ class TestMarshal < Test::Unit::TestCase return f end + def test_marshal_object_and_float + e = Object.new + calls = [] + calls << [2.0, e] + calls << [e] + assert_equal calls, Marshal.load(Marshal.dump(calls)) + end + def test_marshal a = [1, 2, 3, [4,5,"foo"], {1=>"bar"}, 2.5, fact(30)] assert_equal a, Marshal.load(Marshal.dump(a))