ruby Marshal serialization
===

thanks for your time!

I get a class like this

    class Vuser

        def initialize (logfile_name, iteration_hash)
            @logfile_name = logfile_name
            @iteration_hash = iteration_hash
        end
	
        attr_accessor :logfile_name, :iteration_hash
	
        def output_iteration_info ()
            puts @logfile_name
            puts @iteration_hash
        end
    end

And there's will be an array to store the instance of Vuser Class. Let's say the array's name is vuser_ary.

I want to store this array ( vuser_ary ) to a binary file and I think it's called serialization. I google it and find Marshal in the standard library can do this.
Here's an example how I do this according to the example on the Internet :

    #serialization
    File.open("some.file","wb") do |file|
       Marshal.dump(vuser_ary,file)
    end

    #loading
    vuser_ary = nil
    File.open("some.file","rb") {|f| vuser_ary = Marshal.load(f)}

But when I check the size of some.file. I find it's just four bytes. Then I realize that the data stored in some.file may be the reference but not the value of the vuser_ary.

Then my question is how do I store the value of vuser_ary to a binary file. How do I change my code to achieve that? Thanks in advance!

BTW: the value stored in vuser_ary will be like this :

RO_3.2_S4_CommericalRealEstate1_274.log

{1=>"Fail", 2=>"Fail", 3=>"Pass", 4=>"Pass", 5=>"Fail"}

RO_3.2_S4_CommericalRealEstate1_275.log

{11=>"Fail", 2=>"Fail", 3=>"Fail", 4=>"Pass", 5=>"Fail"

RO_3.2_S4_CommericalRealEstate1_276.log

{1=>"Fail", 2=>"Fail", 3=>"Pass", 4=>"Pass", 5=>"Fail"}

RO_3.2_S4_CommericalRealEstate1_277.log

{1=>"Fail", 2=>"Fail", 3=>"Pass", 4=>"Pass", 5=>"Fail"}

RO_3.2_S4_CommericalRealEstate1_278.log

{1=>"Fail", 2=>"Fail", 3=>"Pass", 4=>"Pass", 5=>"Fail"}

RO_3.2_S4_CommericalRealEstate1_279.log

{1=>"Fail", 2=>"Fail", 3=>"Pass", 4=>"Pass", 5=>"Fail"}

RO_3.2_S4_CommericalRealEstate1_280.log

{1=>"Fail", 2=>"Fail", 3=>"Fail", 4=>"Pass", 5=>"Fail"}
