Project

General

Profile

Bug #9675 ยป marshal_crash.rb

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

 
1
#!/usr/bin/env ruby
2

    
3
class A
4
  def hash
5
    @b['id'].hash
6
  end
7
end
8

    
9
a = A.new
10
a.instance_variable_set(:@a, nil)
11
a.instance_variable_set(:@b, { 'id' => 1 })
12
a.instance_variable_set(:@a, { a => 1})
13

    
14
Marshal.load(Marshal.dump(a))