From: Igor Pirnovar Date: 2012-10-26T06:39:49+09:00 Subject: Re: Name/symbol/object type clash? What is happening here? Ryan Davis wrote in post #1081229: > This has nothing to do with grammar. Again, Struct is a class, not > grammar. This is like saying verb is a word not grammar. Obviously, you are on a crusade without having any reason for it, so you either have to bluff your way or are blissfully unaware what you are mussing. Try fixing my code snippet in which I demonstrated the inconsistency when mixing Struct and class. Get the following to run, without annulling the Struct with {{ attr_accessor :num }}: S = Struct.new(:num) class S def initialize n super self.num = n + 5 end def num=(n); self.num = n + 5; end end s = S.new(10).num # => ./teststruct.rb:9: \ stack level too deep (SystemStackError) p s.num #=> s.num = 1 p s.num #=> Am I really blowing this out of proportion? I'm just stating the obvious. This stuff is broken if used for more serious work than playing with simplistic examples on some forum. Regards, igor -- Posted via http://www.ruby-forum.com/.