This project is archived and is in readonly mode.

#3626 ✓resolved
Joe Van Dyk

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

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>

Referenced by

Pages