respondsTo: bug

Boris Popov boris at deepcovelabs.com
Tue Dec 18 19:17:51 UTC 2007


Doug,

((3 @ 4) respondsTo: #<=) answers true here, the rest are confusing
because you are sending #respondsTo: to a class, whereas you really want
to know if its instances respond to certain messages, try

Array
 with: ((3 @ 4) respondsTo: #<=)
 with: ((3 @ 4) respondsTo: #abs)
 with: ((3 @ 4) respondsTo: #hash)
 with: ((3 @ 4) respondsTo: #storeOn:)

Cheers,

-Boris

-- 
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

boris at deepcovelabs.com

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org
[mailto:squeak-dev-
> bounces at lists.squeakfoundation.org] On Behalf Of Doug Edmunds
> Sent: Tuesday, December 18, 2007 10:51 AM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: respondsTo: bug
> 
> Squeak 3.9 #7067
> 
> I happened to be comparing Squeak to Dolphin CE, and ran across
> this bug in Squeak relating to respondsTo:
> 
> (3 @ 4) respondsTo: #<=.  "Squeak reports this as false"
> 
> However:
> 
> (3 @ 4) <= (10 @ 15). "true"
> 
> (3 @ 4) <= (1 @ 15). "false"
> 
> Trying other methods for Point, I get many similar 'false' results
when
> sending 'respondsTo:' to Point (but I also get many correct results).
> 
> ie.
> 
> Point respondsTo: #abs.  "false"
> however,
> Point respondsTo: #hash.   "true"
> Point respondsTo: #storeOn:.  true
> 
> Point respondsTo: #x. false
> but
> (3 @ 4) x. "3"
> 
> Point respondsTo: #y. false
> but
> (3 @ 4) y. "4"
> 
> There does not seem to be any pattern to when
> respondsTo: works correctly and when it doesn't.
> 
> -- dae
> 




More information about the Squeak-dev mailing list