Pavel Krivanek wrote:
On Wed, May 9, 2012 at 2:38 PM, Herby VojÄÃk<herby@mailbox.sk> wrote:
Pavel Krivanek wrote:
Some next interesting information:
o := ((Metaclass allInstances detect: [:c | c superclass = ProtoObject class]) instVarNamed: #thisClass). 1.
Smalltalk allClassesAndTraits select: [:c | o isKindOf: c] -> an OrderedCollection(Behavior Class ClassDescription Object ProtoObject)
Smalltalk allClasses select: [:c | o class == c] -> an OrderedCollection() "WTF"
My gut feeling says 'o class == o' here. Also it may be interesting to see what is o class class. (o class is not inspectable, is it?)
As I see there is a circle but different one:
dzindzik := (Metaclass allInstances detect: [:c | c superclass = ProtoObject class]). 1. o := dzindzik instVarNamed: #thisClass. 1. o class == dzindzik -> true ... what just says it's a metaclass...
BTW, o methodDict is inspectable, it has size 338 and definitely is something from morphic taken from method names. Obviously :-) Smalltalk allClasses select: [ :c | c class methodDict size = 338] => anOrderedCollection() Herby
-- Pavel
Herby