From: Thomas Hurst Date: 2002-06-07T00:10:43+09:00 Subject: Re: Struct :symbol vs 'string' difference * Tim Sutherland (timsuth@ihug.co.nz) wrote: > Bar = Struct.new('Bar', :a, :b, :c) > Bar.new(1, 2, 3) -> # > > Foo = Struct.new(:Foo, :a, :b, :c) > Foo.new(1, 2, 3) -> # > I'm wondering why there is this difference, which I found surprising. If Struct#new's first argument is a string, it's used as the name of the structure within Struct::, otherwise it's just returned as an anonymous class object. It's not surprising if you read the docs ;) -- Thomas 'Freaky' Hurst - freaky@aagh.net - http://www.aagh.net/ - She missed an invaluable opportunity to give him a look that you could have poured on a waffle.