[Seaside-dev] When is Symbol>>#= not Symbol>>#==?

Philippe Marschall philippe.marschall at gmail.com
Thu Nov 13 19:44:34 UTC 2008


2008/11/13, John O'Keefe <wembley.instantiations at gmail.com>:
> I have been getting failures in my port of the JSJson tests (example, self
> assert: (self parse: 'True') = 'True').  These failures were a bit of a
> mystery to me since on VA Smalltalk "self parse: 'True'" answers a Symbol,
> not a String.  But on delving into Squeak, all is now clear -- it answers a
> Symbol there also!

That looks like a bug in the test or in the Squeak implementation. The
Seaside coding conventions are quite clear in this area, you can't
assume that a Symbol is a String. So either the test or the Squeak
implementation is broken.

It probably couldn't hurt to document the type assumptions along the lines of:

assert: (self parse: 'True') class = #True class

or:

assert: (self parse: 'True') isSymbol

Cheers
Philippe


More information about the seaside-dev mailing list