[Glass] case insensitive search broken for Unicode7?

Mariano Martinez Peck marianopeck at gmail.com
Wed Mar 5 08:57:56 PST 2014


On Wed, Mar 5, 2014 at 1:47 PM, James Foster <
james.foster at gemtalksystems.com> wrote:

> I added 'asUppercase' to both the receiver and the argument in my code
> (with a note to remove it later).
>
>
But the problem is that lots of methods will be broken....because it is all
senders of all senders of all senders.. of _findString: subString
startingAt: startIndex ignoreCase: aBoolean  of Unicode7.

What about this instead:

Unicode7 >> _findString: subString startingAt: startIndex ignoreCase:
aBoolean

  ^ super _findString: subString startingAt: startIndex ignoreCase: aBoolean


Thanks,


>
> On Mar 5, 2014, at 8:26 AM, Mariano Martinez Peck <marianopeck at gmail.com>
> wrote:
>
> Ok, thanks James.
> Is there an easy workaround? What about implementing:
>
> Unicode7 >> includesSubstring: aString caseSensitive: aBool
>
> aString size == 0 ifTrue: [ ^false ]. "patch for bug 39473"
> ^ (*(String fromString: self)* _findString: aString startingAt: 1
> ignoreCase: aBool not) > 0
>
> is there a better/safer one?
>
> Thanks,
>
>
>
> On Wed, Mar 5, 2014 at 1:03 PM, James Foster <
> james.foster at gemtalksystems.com> wrote:
>
>> This was reported (by me!) as bug #43773 just a few weeks ago and there
>> will be a fix in 3.2 (coming soon!).
>>
>> James
>>
>> On Mar 5, 2014, at 7:28 AM, Mariano Martinez Peck <marianopeck at gmail.com>
>> wrote:
>>
>> Hi guys,
>>
>> I am in Gemstone 3.0.1.4 and look at the result of this expression:
>>
>> ('Newmont' *asUnicodeString* _findString: 'newm' startingAt: 1
>> ignoreCase: true) > 0
>>
>> -> false
>>
>> while
>>
>> ('Newmont'  _findString: 'newm' startingAt: 1 ignoreCase: true) > 0
>>
>> -> true
>>
>> All this started because a #matches: was failing...
>>
>> I am missing something?
>>
>> Thanks,
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.com
>>  _______________________________________________
>> Glass mailing list
>> Glass at lists.gemtalksystems.com
>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>>
>>
>>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20140305/98252fea/attachment.html>


More information about the Glass mailing list