WideString instance asSymbol is broken

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

WideString instance asSymbol is broken

johnmci
'foo' asWideString asSymbol = #foo  -> false
'foo' asWideString asSymbol class = #foo class -> true

have fun....

I'll open a mantis report unless someone can talk me out of it.

--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===



Reply | Threaded
Open this post in threaded view
|

Re: WideString instance asSymbol is broken

Nicolas Cellier-3
Le Samedi 05 Août 2006 10:05, John M McIntosh a écrit :

> 'foo' asWideString asSymbol = #foo  -> false
> 'foo' asWideString asSymbol class = #foo class -> true
>
> have fun....
>
> I'll open a mantis report unless someone can talk me out of it.
>
> --
> ========================================================================
> ===
> John M. McIntosh <[hidden email]>
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ========================================================================
> ===

Maybe this is a requested feature so as still having fast == comparison of
Symbols...

In that case, Symbol must coerce to WideSymbol if and only if it contains
characters not encodable in a single byte...

BTW, what is the encoding of ByteSymbol ?

Nicolas


Reply | Threaded
Open this post in threaded view
|

Re: WideString instance asSymbol is broken

David T. Lewis
In reply to this post by johnmci
On Sat, Aug 05, 2006 at 01:05:27AM -0700, John M McIntosh wrote:
> 'foo' asWideString asSymbol = #foo  -> false
> 'foo' asWideString asSymbol class = #foo class -> true
>
> have fun....
>
> I'll open a mantis report unless someone can talk me out of it.

On Squeak 3.9 #6665, we have:

'foo' asWideString asSymbol = #foo -> true
'foo' asWideString asSymbol class = #foo class -> true

Maybe something already got fixed.

Dave


Reply | Threaded
Open this post in threaded view
|

Re: WideString instance asSymbol is broken

johnmci
Yawn, some more digging this am, I had tested with a #7004, toss  
that, get the 7051
works. mmm

ok in 3.8 and #7004 we have

  'abc' asWideString = 'abc'.  -> true
'abc' = 'abc' asWideString.  -> false

which is the root of the problem and prevents the like: finding the  
string in the WeakSet.

I see the whole String/WideString/ByteString logic has been rework,  
fixing the problem
which then fixes the asSymbol issue


On 5-Aug-06, at 6:47 AM, David T. Lewis wrote:

> 'foo' asWideString asSymbol = #foo -> true
> 'foo' asWideString asSymbol class = #foo class -> true

--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===