From: Igor Pirnovar Date: 2012-10-26T08:19:45+09:00 Subject: Re: Name/symbol/object type clash? What is happening here? Bartosz DziewoƄski wrote in post #1081236: > Verb isn't grammar. It is a word. Please rethink what you just wrote. According to Ruby grammar {{ class S; def @var = value; end }} is the definition of instance method and again according to Ruby grammar convention its use is defined as {{ S#var = value }}. Here, the accessor method can be considered a verb or operator. Idiom {{ class S; end }} is according to Ruby grammar the definition of class 'S'. If for some word grammar seems inappropriate here, I do not intend to convince you otherwise. Likewise I never meant to say that verb is grammar, but it nevertheless represents grammatical conception or term and it is in this context that I used the word, suggesting otherwise is pretending ignorance. > You should use class S < Struct.new(:num) here, and then properly call > super. I'm sure you can find examples of what it does online, do try. As for 'infinite recursion', it is I, who is objecting to this use all along and pointing out that Struct should be fixed so it would understand, conform and obey the Ruby instance variable grammar and rules. Use of '@' instance variables is sometimes unavoidable and necessary. Ruby grammar is clear about its use, except when it comes to the conundrum of mixing Struct with class reopening, and using instance variables in this context. The examples above clearly demonstrate these problems. Regards, igor -- Posted via http://www.ruby-forum.com/.