1. The last literal of a method because the last literal always points to the class of the method.
Object methods collectAsSet: [ : cm | cm literals last value ]
==>����"a Set(Object)"
So, we need to ignore the last literal
2. The literals that are Associations can also point to other global literals that are not classes:
(ASTCache class>>#initialize) literals allButLast
select: [ :l | l isKindOf: Association ]��
thenCollect: #value
==> "{Smalltalk}"
So, a better implementation for a method is:
(Object>>#actionMap) ��literals allButLast
select: [ :l | l value isKindOf: Class ]��
thenCollect: #value
I opened a bug:
Cheers,
Doru