This project is archived and is in readonly mode.
AS::MB::Chars#slice! doesn't operate in-place; guide docs are out of date
Reported by Norman Clarke | July 1st, 2010 @ 03:10 PM | in 3.0.2
The patch I will attach fixes a few remaining issues with AS::Multibyte::Chars:
- #slice! was not operating in place
- On 1.9, #strip!, #lstrip! and #rstrip! were going through the proxy class, but the corresponding bang-less methods were not. The patch avoids defining these methods on 1.9 since they are already multibyte-aware.
- The Rails initialization guide needed to be updated to reflect recent changes
I also took the opportunity to improve the test setup; I used
class_eval
to generate single-assertion tests for the
bang methods, rather than doing a bunch of assertions in a loop.
This makes test failures a little easier to track down.
Edited by Rohit Arondekar for formating.
Comments and changes to this ticket
-
Norman Clarke July 1st, 2010 @ 03:12 PM
- Tag changed from activesupport, docs, multibyte to activesupport, docs, multibyte, patch
Patch attached. Sorry for the extra-bold OMG SLICE!!!!! line above, not sure why that happened. :)
-
Santiago Pastorino July 7th, 2010 @ 05:07 PM
- Assigned user set to José Valim
- Milestone cleared.
- State changed from new to open
- Importance changed from to Low
-
José Valim July 8th, 2010 @ 09:28 PM
I cannot apply this patch anymore because the guide change. I would recommend you to fork github.com/lifo/docrails.git and do your docs change there (everyone has commit access) and provide the code change in one patch. :)
-
Norman Clarke July 8th, 2010 @ 09:45 PM
No problem. Here's the commit without the doc updates, and rebased against the current master.
-
Repository July 8th, 2010 @ 10:03 PM
- State changed from open to resolved
(from [6f83a57ac7bf77565380b26b506972cfe751b717]) Improve bang method defs, make slice! operate in-place. [#5028 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/6f83a57ac7bf77565380b26b506972...
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
Tags
Referenced by
- 5028 AS::MB::Chars#slice! doesn't operate in-place; guide docs are out of date (from [6f83a57ac7bf77565380b26b506972cfe751b717]) Improve...