From: "Florian Groß" Date: 2005-03-17T23:09:56+09:00 Subject: Re: Allowing "?" in struct members Yukihiro Matsumoto wrote: > It's intentional, so that it shouldn't be a bug. But your message > made me think having field names with "?" can be valid if field > accessor is disabled for such cases. Though I wonder if having "foo?" and "foo=" for boolean accessors like flags would not be useful. For example I'm frequently using things like Contract.check_fulfills and .check_fulfills= and I think that if Contract.check_fulfills? then ... end just looks nicer than if Contract.check_fulfills ... end OTOH I totally dislike .foo?= because the double combinator just looks ugly... So if this were to be implemented I think attr_accessor :foo? should create .foo? and .foo= -- and Struct.new(:foo?) then would also be similar.