Fun with Kernel :)

Andreas Raab andreas.raab at gmx.de
Fri Apr 4 21:39:34 UTC 2003


Stef,

> We are have fun with the kernel. here is an example.

As a matter of fact this is clearly a bug. Watch this:

> 	(MessageSet isPseudoSelector: selector)
> 		ifTrue: ["Not really a selector"
> 			^ nil].
> 	source _ self
> 				sourceCodeAt: selector asSymbol
> 				ifAbsent: [^ nil].

Regarless of what those "pseudo selectors" selectors are it is clearly the
case that if you ever implement one of them, the method will not work
correctly. However, for any selector which is not implemented the method
will answer nil anyway. So what's the point in the test?! None whatsoever.

Cheers,
  - Andreas



More information about the Squeak-dev mailing list