Multibyte safe String access methods

In a previous patch I started using String#chars in the String access methods to make the multibyte safe. Then it dawned on me that there might be people using these methods to perform operations on byte strings. I created ticket #6460 to move the multibyte safe access methods to the chars accessor. Julian thinks we should keep it as it is now.

Can somebody from the core team read ticket #6460 and make a decision whether access methods should only be used on character strings or to apply the patch?

http://dev.rubyonrails.org/ticket/6460

Thanks,    Manfred

In a previous patch I started using String#chars in the String access methods to make the multibyte safe. Then it dawned on me that there might be people using these methods to perform operations on byte strings. I created ticket #6460 to move the multibyte safe access methods to the chars accessor. Julian thinks we should keep it as it is now.

Can somebody from the core team read ticket #6460 and make a decision whether access methods should only be used on character strings or to apply the patch?

http://dev.rubyonrails.org/ticket/6460

David and I were having this exact conversation yesterday. My take is that for string methods we've added, we should ensure we're multibyte safe. The core methods like String# are still going to return the bytes so it's not a big deal.

I agree. We shouldn't mock with the default Ruby String methods unless you've specifically asked to for the .chars proxy.

I think the same, that's why I closed the ticket (I think the String access methods in AS are character-oriented as opposed to byte-oriented)