From: ara.t.howard@... Date: 2006-02-18T07:34:42+09:00 Subject: Re: [QUIZ] metakoans.rb (#67) On Sat, 18 Feb 2006, Sander Land wrote: > Very interesting quiz :) > > One small question: > # o.a? # query - true if @a > That should be strictly ==true (or ==false when not @a), right? not > something else which would evaluate to true in the assert... > I'm asking because all the asserts are like "assert{ c.a? }" ,and none > of them test "assert{ c.a? == true }" since only false and nil are failed predicates in ruby i find it quite uesful for boolean methods to return a value if((sql = conn.commited?)) log sql end etc. i avoided '== true' test to explicitly allow this behaviour. it's certainly fine to only return true, however. it's a religious choice in the end. regards. -a -- judge your success by what you had to give up in order to get it. - h.h. the 14th dali lama