Project

General

Profile

Bug #11088 ยป 11088_test.rb

shishir127 (Shishir Joshi), 05/09/2015 06:57 AM

 
1
class MarshalTest
2

    
3
    attr_accessor :str, :int
4

    
5
end
6

    
7
test_object = MarshalTest.new()
8
test_object.str = 'test'
9
test_object.int = 42
10

    
11
dump = Marshal.dump(test_object)
12
reconstituted_object = Marshal.load(dump)
13
puts reconstituted_object.str
14
puts reconstituted_object.int
15
reconstituted_object.undefined_method