From: Love U Ruby Date: 2013-04-11T19:19:11+09:00 Subject: Re: confusion with Struct class "Jesús Gabriel y Galán" wrote in post #1105232: > On Thu, Apr 11, 2013 at 10:45 AM, Love U Ruby > wrote: >> > If you read the doc you referenced closely: > ***the name of this struct > will appear as a constant in class Struct***, Yes,I am confused how a full class be a constant. We can create a variable as a constant, say "NAME". class and module names are also constant. But full class body is constant - I just newly step into this topic. > 1.9.2p290 :001 > Struct.new("Customer", :name, :address) > => Struct::Customer > 1.9.2p290 :002 > p Struct::Customer > Struct::Customer > => Struct::Customer > 1.9.2p290 :003 > p Struct::Customer.class > Class > => Class -- Posted via http://www.ruby-forum.com/.