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.

#ord method for ActiveSupport::Multibyte::Chars

#1483

This patch adds a ActiveSupport::Multibyte::Chars#ord method so that it returns correct Unicode value instead of falling back on String#ord in CoreExtensions, which is not multibyte compatible.

Before patch:


'こんにちは'.mb_chars.ord #=> 227

After patch:


'こんにちは'.mb_chars.ord #=> 12371

Reported by Jason Cheow · November 26th, 2008 @ 03:15 PM

State: committed
Milestone: none
Assigned to: Jeremy Kemper Jeremy Kemper
Importance: none

Activity

  1. Jason Cheow
    Jason Cheow
    • Title changed from #ord for ActiveSupport::Multibyte::Chars to #ord method for ActiveSupport::Multibyte::Chars

    November 26th, 2008 @ 03:15 PM

  2. Jeremy Kemper
    Jeremy Kemper
    • Milestone cleared.
    • State changed from new to open
    • Assigned user set to Jeremy Kemper

    November 26th, 2008 @ 06:41 PM

  3. Repository
    Repository
    • State changed from open to committed

    (from [4e60eebae05aeec65e4894e3901c9d61c9b32910]) Add ActiveSupport::Multibyte::Chars#ord method so that it returns correct Unicode value instead of falling back on String#ord in CoreExtensions, which is not multibyte compatible

    [#1483 #ord method for ActiveSupport::Multibyte::Chars state:committed]

    Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...

    December 9th, 2008 @ 12:12 AM

  4. Repository
    Repository

    (from [032902146a6ff8a194901ba91cd4d6b00b9eb411]) Add ActiveSupport::Multibyte::Chars#ord method so that it returns correct Unicode value instead of falling back on String#ord in CoreExtensions, which is not multibyte compatible

    [#1483 #ord method for ActiveSupport::Multibyte::Chars state:committed]

    Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...

    December 9th, 2008 @ 12:12 AM