When I dumped a aobject which contains several float objects, the data collapsed.
The test code is as follows.
class MarshalTest
def initialize
@a = 0.1
@b = 0.2
@c = 0.3
end
end
o = MarshalTest.new
p o
File.open('test.bin', 'wb') do |f|
Marshal.dump(o, f)
end
File.open('test.bin', 'rb') do |f|
p Marshal.load(f)
end
When I dumped a aobject which contains several float objects, the data collapsed.
The test code is as follows.
The output is as follows.
MarshalTest.b is collapsed.