[MacRuby-devel] String#sub/gsub and text encodings
vincent.isambart at gmail.com
Fri May 20 19:10:34 PDT 2011
> I finally found time to further investigate this.
Thanks for investigating it.
> Am I doing something wrong? If not, I'll file a ticket.
No it's indeed a bug, could you please file a ticket.
By the way I've made a shorter version of your code:
s1 = NSMutableString.stringWithString("this is a test script.")
puts s1 #=> this is a $B!1(IAB(B script.
s2 = NSMutableString.stringWithString("this is a test script.")
s2[10..14] = "$B$"(B"
puts s2 #=> this is a $B!1(IAB(B script.
(in fact sub! uses = internally)
More information about the MacRuby-devel