This project is archived and is in readonly mode.
Inflector.underscore does unnecessary string copies
Reported by Joe Van Dyk | December 28th, 2009 @ 07:15 PM
The method uses gsub multiple times, which does unnecessary string copies.
Patch fixes this. No tests need updating. Benchmarks shows the new method is about twice as fast.
Comments and changes to this ticket
-
Joe Van Dyk December 28th, 2009 @ 07:54 PM
Exact patch, but fixed the author's name and email in the commit log.
-
Yaroslav Markin April 10th, 2010 @ 07:59 PM
- Tag changed from 2-3-stable, activesupport to 2-3-stable, activesupport, patch
-
Yaroslav Markin April 10th, 2010 @ 07:59 PM
- Assigned user set to José Valim
-
Repository April 12th, 2010 @ 10:10 AM
- State changed from new to resolved
(from [ccf33660a1548dadd123a92df6de2de946d208c4]) Avoid unnecessary allocations in Inflector.underscore [#3626 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/ccf33660a1548dadd123a92df6de2d...
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
- 3626 Inflector.underscore does unnecessary string copies (from [ccf33660a1548dadd123a92df6de2de946d208c4]) Avoid u...