[squeak-dev] non braking space oddity

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Oct 27 10:15:52 UTC 2009


While looking at http://bugs.squeak.org/view.php?id=7211, I found this
funny classification:

Character nbsp isSeparator. -> false
(Scanner new typeTableAt: Character nbsp) -> #xBinary

That makes nbsp a valid binary selector, and that ain't good...

Example: I thought I would compile a method #bingo, but I compile a
method with an invisible binary selector...

Object compile: (String with: Character nbsp) , ' bingo ^self'.
2 perform: (String with: Character nbsp) asSymbol with: nil.
2 perform: #bingo.

Note that a leading nbsp can happen via a copy from web...
I doubt this is an intentional feature.



More information about the Squeak-dev mailing list