Project

General

Profile

Bug #9675 ยป marshal_crash.rb

ccutrer (Cody Cutrer), 03/25/2014 03:54 PM

 
#!/usr/bin/env ruby

class A
def hash
@b['id'].hash
end
end

a = A.new
a.instance_variable_set(:@a, nil)
a.instance_variable_set(:@b, { 'id' => 1 })
a.instance_variable_set(:@a, { a => 1})

Marshal.load(Marshal.dump(a))
    (1-1/1)