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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
> 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/6460David 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. -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
I agree. We shouldn''t mock with the default Ruby String methods unless you''ve specifically asked to for the .chars proxy. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On Nov 23, 2006, at 11:30 PM, Michael Koziarski wrote:> 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 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) -- Julian ''Julik'' Tarkhanov please send all personal mail to me at julik.nl --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---