This project is archived and is in readonly mode.
Ruby 1.9 compat: add String#bytesize
Reported by Akira Matsuda | February 14th, 2009 @ 07:10 AM | in 2.x
Added String#bytesize to ActiveSupport, since we (multibytish language users) came to use that new method in some cases.
Comments and changes to this ticket
-
Manfred Stienstra February 14th, 2009 @ 07:49 AM
Looks like a good idea. Can you add a unit test to the patch?
-
Akira Matsuda February 14th, 2009 @ 02:10 PM
Sorry about that. Attatched a new patch file including test cases.
-
Akira Matsuda February 14th, 2009 @ 04:03 PM
I rethinked and changed my mind.
This bytesize method may induce some needless surprize, because String#bytesize should not be == String#size in many other cases.
Please reject and forget about this patch (I'm sorry it seems that I can't cancel the ticket by myself...)
-
Michael Koziarski February 14th, 2009 @ 09:41 PM
- State changed from new to invalid
invalidating as per the submitters test
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 1969 Ruby 1.9 compat: fix JSON decoding with multibyte values I found JSON decoding doesn't work properly with multibyt...
- 1969 Ruby 1.9 compat: fix JSON decoding with multibyte values I found JSON decoding doesn't work properly with multibyt...
- 1969 Ruby 1.9 compat: fix JSON decoding with multibyte values Changed the implementation not to depend on #1968 which d...