From: "Peña, Botp" Date: 2002-12-26T19:07:20+09:00 Subject: Re: Struct Question Hi sir Jonas (aka Jonas Hoffmann [mailto:ruby@joelh.de]): You asked last Thursday, December 26, 2002 5:58 PM: > i have a question about Structs , in the Book 'Ruby in a > Nutshell' is written > => > S = Struct::new(:foo, :bar) > s = S::new(1,2) > s => # foo=1, bar=5> > > but > > i receive with my Code Ruby v1.6.8 => > > tem = Struct::new(:foo, :bar) > meinstruct = tem::new(0,8) > puts meinstruct > > => #<#> > > is this a change in a Rubyversion ? Or did i read the book wrongly ? I have: C:\family\ruby>ruby -v ruby 1.7.3 (2002-11-17) [i386-mswin32] C:\family\ruby>type a1.rb tem = Struct::new(:foo, :bar) meinstruct = tem::new(0,8) p meinstruct puts meinstruct C:\family\ruby>r C:\family\ruby>ruby a1.rb #<# foo=0, bar=8> #<#> C:\family\ruby> I think code differs only on p vs puts... > mfg. Jonas Hoffmann kind regards -botp