diff options
author | Matias Flores <mflores@atlanware.com> | 2009-09-26 21:32:21 -0300 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-11-02 17:57:55 -0800 |
commit | 23780850237876cf81038534d8f59fa307af0b31 (patch) | |
tree | 3865b6755f66be53270ae29e1a06865ae9cd2d0f /activesupport/lib/active_support/multibyte | |
parent | e93c2da14108c324ddf5f08f0165b342e028896f (diff) | |
download | rails-23780850237876cf81038534d8f59fa307af0b31.tar.gz rails-23780850237876cf81038534d8f59fa307af0b31.tar.bz2 rails-23780850237876cf81038534d8f59fa307af0b31.zip |
Fix chars.reverse for multibyte decomposed strings
[#597 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activesupport/lib/active_support/multibyte')
-rw-r--r-- | activesupport/lib/active_support/multibyte/chars.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/multibyte/chars.rb b/activesupport/lib/active_support/multibyte/chars.rb index 579ccc124d..c9bcfbd313 100644 --- a/activesupport/lib/active_support/multibyte/chars.rb +++ b/activesupport/lib/active_support/multibyte/chars.rb @@ -321,7 +321,7 @@ module ActiveSupport #:nodoc: # Example: # 'Café'.mb_chars.reverse.to_s #=> 'éfaC' def reverse - chars(self.class.u_unpack(@wrapped_string).reverse.pack('U*')) + chars(self.class.g_unpack(@wrapped_string).reverse.flatten.pack('U*')) end # Implements Unicode-aware slice with codepoints. Slicing on one point returns the codepoints for that |