From: Love U Ruby Date: 2013-04-11T23:59:39+09:00 Subject: Re: confusion with Struct class Robert Klemme wrote in post #1105267: > On Thu, Apr 11, 2013 at 4:27 PM, Love U Ruby > wrote: > > irb(main):006:0> 5.times { puts joe.hash } > 1060632465 > 1060632465 > 1060632465 > 1060632465 > 1060632465 > => 5 For me now it is also OK. I don't know why I got such bullshit output earlier? p RUBY_VERSION Customer = Struct.new(:name, :address, :zip) joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) p 5.times { puts joe.hash } p joe.hash p joe.hash Output: "1.9.3" -672312861 -672312861 -672312861 -672312861 -672312861 5 -672312861 8577108 -672312861 8577108 -- Posted via http://www.ruby-forum.com/.