> You are mixing up class and instance side :)
> 
> #canUnderstand: is send to instances
> #includesSelector: is sent to classes
> 
> (Integer canUnderstand: #readFrom) ==> (Integer class includesSelector: 
> #readFrom:)

The instance side equivalent of canUnderstand: is #respondsTo:..
#includesSelector: is class side too but does not look in superclasses.
So you have:

Integer respondsTo: #readFrom:   --> true
Integer class canUnderstand: #readFrom:   --> true
Integer class includesSelector: #readFrom:   --> true


> 
> On 2013-04-20, at 20:01, Milan Mimica <milan.mim...@gmail.com> wrote:
> 
>> How come this evaluates to false?
>> Integer canUnderstand: #readFrom:   --> false
>> Integer includesSelector: #readFrom:   --> false
>> 
>> However, it does implement the method.
>> Integer readFrom: '1' readStream.   --> 1
>> 
>> 
>> -- 
>> Milan Mimica
>> http://sparklet.sf.net
> 
> 


Reply via email to