From: Suraj Kurapati Date: 2006-11-07T13:58:05+09:00 Subject: Struct.new and symbol with question mark Why isn't the Struct class smart enough to detect a question mark at the end of a member name and create the appropriate #member= and #member? methods? >> Klass = Struct.new :foo, :bar? => Klass >> x = Klass.new => # >> x.foo => nil >> x.bar? NoMethodError: undefined method `bar?' for # from (irb):5 from :0 I was expecting Klass to have the #foo, #foo=, #bar?, and #bar= methods. -- Posted via http://www.ruby-forum.com/.