marshal_fail.patch

Aaron Patterson, 11/14/2012 09:20 AM

Download (556 Bytes)

View differences:

test/ruby/test_marshal.rb
32 32
    return f
33 33
  end
34 34

  
35
  def test_marshal_object_and_float
36
    e = Object.new
37
    calls = []
38
    calls << [2.0, e]
39
    calls << [e]
40
    assert_equal calls, Marshal.load(Marshal.dump(calls))
41
  end
42

  
35 43
  def test_marshal
36 44
    a = [1, 2, 3, [4,5,"foo"], {1=>"bar"}, 2.5, fact(30)]
37 45
    assert_equal a, Marshal.load(Marshal.dump(a))