James Edward Gray II wrote:

> On Feb 20, 2006, at 8:38 AM, Michael Ulm wrote:
> 
>> This demonstrates a problem I have with many solutions -- taking
>> Florians as an example.
>>
>> class Test
>>   attribute 'a'
>> end
>>
>> tst.a?         # => false   OK
>> tst.a = false  # => false   OK
>> tst.a?         # => false   This should be true
> 
> 
> I believe you are making the mistake that you expect attr_meth?() to  
> tell you if an attribute is set.  That's not the intention.  attr_meth 
> () returns true if the attribute holds a true value.
> 
> I know this because I made the exact same mistake and Ara corrected  
> me.  ;)

I just checked the metakoans.rb file, and see that you are right:

#   o.a?      # query  - true if @a

Had I defined the interface, this would behave differently. I guess
this shows that I am not enlightened yet.

Regards,

Michael


-- 
Michael Ulm
R&D Team
ISIS Information Systems Austria
tel: +43 2236 27551-219, fax: +43 2236 21081
e-mail: michael.ulm / isis-papyrus.com
Visit our Website: www.isis-papyrus.com

---------------------------------------------------------------
This e-mail is only intended for the recipient and not legally
binding. Unauthorised use, publication, reproduction or
disclosure of the content of this e-mail is not permitted.
This email has been checked for known viruses, but ISIS accepts
no responsibility for malicious or inappropriate content.
---------------------------------------------------------------