[Seaside-dev] Seaside-Core-topa.811

Tobias Pape Das.Linux at gmx.de
Sun Apr 6 18:44:52 UTC 2014


Hey,

On 06.04.2014, at 19:13, Philippe Marschall <philippe.marschall at gmail.com> wrote:

Hi

Can you elaborate a bit on the problem?
Can you supply some tests?
Will this work on GemStone (comparing classes with #==)?

This is a strange thing no matter how we look at it.

#pathStringUnencoded states
"allocate with correct size, avoid copy"

However, it is working on strings that potentially contain
unicode stuff. The way this method was written did not cope for
the underlying stream/stream’s collection to change. The test will
fail in mostly any squeak out there (except trunk [1]).

Yet, we can only be sure that
 a) the preallocated size is correct and
 b) the #pathUnencodedOn: will not change the collection kind
if all path segments are of the same kind (Byte/Wide in Squeak/Pharo
or one of the equivalent Unicode classes in GemStone…)

Even if the #== in GemStone would fail[2], the failsafe method I
added will always work, although potentially create a copy.


I find it hard to come up with a dedicated test for that except for what
already is done in WAUtf8UrlTest>>#testPathStringUnencoded (the one that
triggered all that for me). If you need one, i try to come up with one.
(note that I have no VA or VW to test with and are mostly
stuck with Squeak/Pharo/Gemstone…)

HTH

Best
	-Tobias





[1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2014-March/177658.html
[2] Which I suspect, do not, since classes all over the place are checked with #~~,
    but I actually did not test it (shame on me)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1625 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.squeakfoundation.org/pipermail/seaside-dev/attachments/20140406/321cbefd/signature.pgp


More information about the seaside-dev mailing list