Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

camelize :lower doesn't lower the first character

#696

currently 'Capital'.camelize(:lower) #=> 'Capital'

That is not intuitive and appears that it should be

'Capital'.camelize(:lower) #=> 'capital'

Here is a patch with two tests and a fix.

Reported by Amos King · July 24th, 2008 @ 05:48 PM

State: resolved
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Amos King
  2. Amos King
    Amos King
    • Tag set to activesupport, bug, core_ext, patch, tested

    oops I had tabs and not spaces. fixed in this new patch.

    July 24th, 2008 @ 08:43 PM

  3. Amos King
    Amos King
    • Title changed from camelize :lower doesn't lower the first character to [patch] camelize :lower doesn't lower the first character

    July 26th, 2008 @ 01:36 PM

  4. Pratik
    Pratik
    • Title changed from [patch] camelize :lower doesn't lower the first character to camelize :lower doesn't lower the first character

    July 26th, 2008 @ 03:05 PM

  5. Repository
    Repository
    • State changed from new to resolved

    (from [381210daa0b8db26be85841b8ccf889d0ef67d75]) camelize(:lower) should always downcase first character. [#696 camelize :lower doesn't lower the first character state:resolved]

    Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...

    August 22nd, 2008 @ 01:34 PM