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]
=> #<struct #<Class:0x392b154> :====1, :+=2, :-=3>


----------------------------------------
http://redmine.ruby-lang.org/issues/show/1983

----------------------------------------
http://redmine.ruby-lang.org