<div dir="ltr"><div>Done</div><div><a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/561">https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/561</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 21, 2021 at 3:02 PM Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
Florin, would you mind opening an issue here?<br>
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues" rel="noreferrer" target="_blank">https://github.com/OpenSmalltalk/opensmalltalk-vm/issues</a><br>
<br>
Le mer. 21 avr. 2021 à 19:59, Florin Mateoc <<a href="mailto:florin.mateoc@gmail.com" target="_blank">florin.mateoc@gmail.com</a>> a écrit :<br>
><br>
><br>
> Yes, you are most likely getting the errorNoModification only because of the primitive fallback code<br>
><br>
> On Wed, Apr 21, 2021 at 1:52 PM Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>> wrote:<br>
>><br>
>><br>
>> Hmm OK,<br>
>> on a recently recompiled spur 64bits VM I've got errorNoModification,<br>
>> maybe because the optional primitive is missing?<br>
>> On 32 bits spur VM though, I get the behavior that you described.<br>
>><br>
>> Le mer. 21 avr. 2021 à 14:54, Florin Mateoc <<a href="mailto:florin.mateoc@gmail.com" target="_blank">florin.mateoc@gmail.com</a>> a écrit :<br>
>> ><br>
>> ><br>
>> > Hi Nicolas,<br>
>> ><br>
>> > I did try it. After making sure a string was not interned, ( "Symbol findInterned: 'test123'" return nil ), I did<br>
>> ><br>
>> > | s | s := #TEST123.<br>
>> > s translateToLowercase.<br>
>> > Symbol findInterned: s<br>
>> ><br>
>> > and the resulting s is a Symbol and it is not interned<br>
>> ><br>
>> > Florin<br>
>> ><br>
>> > On Wed, Apr 21, 2021 at 2:06 AM Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>> wrote:<br>
>> >><br>
>> >><br>
>> >> Hi Florin,<br>
>> >> did you try it? It should fail if passing a literal (ModificationForbidden).<br>
>> >> I see that it's only ever sent to copy asString, for case translation<br>
>> >> or converting lineEndings...<br>
>> >><br>
>> >> Le mer. 21 avr. 2021 à 01:17, Florin Mateoc <<a href="mailto:florin.mateoc@gmail.com" target="_blank">florin.mateoc@gmail.com</a>> a écrit :<br>
>> >> ><br>
>> >> ><br>
>> >> > Hi,<br>
>> >> ><br>
>> >> > While looking at some of the more exotic primitives, I stumbled upon this little gem.<br>
>> >> > I think it's bad enough that it modifies strings in place (some of those could be method literals), but it even modifies symbols in place, without adding them to the symbol table.<br>
>> >> ><br>
>> >> > I would say this is a bug, I don't think symbols should be modified in place (other than by the #intern: method), but this does not look unintentional - apparently ByteSymbol class >> #translate:from:to:table: was added specifically to make the primitive work on symbols too.<br>
>> >> ><br>
>> >> > Does anybody have any insight into this, is this functionality (modifying symbols in place) used anywhere?<br>
>> >> ><br>
>> >> > Thank you,<br>
>> >> > Florin<br>
>> >> ><br>
</blockquote></div>