From: Tomas Matousek Date: 2009-08-24T12:30:43+09:00 Subject: [ruby-core:25067] [Bug #1983] Struct doesn't define instance methods for valid method names Issue #1983 has been updated by Tomas Matousek. Since irb(main):012:0> class C irb(main):013:1> attr_accessor :foo? irb(main):014:1> end NameError: invalid attribute name `foo?' I would rather think that the same error should be raised by Struct.new. BTW, even more interesting names for attributes are operator names: irb(main):007:0> Struct.new(:===, :+, :-)[1,2,3] => # :====1, :+=2, :-=3> ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1983 ---------------------------------------- http://redmine.ruby-lang.org