Robert Klemme wrote in post #1081662:

> Apparently I'm wrong - but where?

I have already told you, where:

>> ""Ruby compounds double execution of expressions used in class/Struct
>> initialization process (see my comment in your code: #=> 10 WRONG!!!).""

Apparently the "#=> 10 WRONG!!!" line you never wrote, of course you did
not, you blocked it out, once you saw that it gives you the wrong
result, hence you preferred your half-way solutions. If you hadn't,
you'd understood what was happening.

I am glad you finally realized, that even this half-way version to
satisfy my original requirements, reveals how Struct breaks the basic
Ruby class initialization grammar! That is why in situations like this
you can not use it unless you are willing to accept botching into your
coding practices. And by the way, irb is not synchronized with the
interpreter, and does not realizes that Struct is not behaving in
accordance with Ruby class initialization grammar!

-- 
Posted via http://www.ruby-forum.com/.