From: Daniel DeLorme Date: 2007-09-05T07:47:19+09:00 Subject: Re: Struct is cleverer than the documentation claims Robert Klemme wrote: > Why should I reopen a class if I can have everything with the block? > > Customer = Struct.new :name, :address do > def to_s > "Customer called '#{name}' living at '#{address}'" > end > end because, say, you'd want to add a constant to that class Customer = Struct.new :name, :address do K = 42 end Customer::K (irb):7: warning: toplevel constant K referenced by Customer::K Daniel