diff options
author | Sergey Nartimov <just.lest@gmail.com> | 2012-05-28 23:32:14 +0300 |
---|---|---|
committer | Sergey Nartimov <just.lest@gmail.com> | 2012-05-28 23:32:14 +0300 |
commit | d64b25438a82541f781a22f42e5cee44acd57737 (patch) | |
tree | 5a8f89d7dfb7d5f23081afbe189703b5e75bb4a5 /activesupport/lib/active_support/multibyte | |
parent | 7dd80d68e509134cb0f821142b6b3ec46262a5a4 (diff) | |
download | rails-d64b25438a82541f781a22f42e5cee44acd57737.tar.gz rails-d64b25438a82541f781a22f42e5cee44acd57737.tar.bz2 rails-d64b25438a82541f781a22f42e5cee44acd57737.zip |
make AS::Multibyte::Chars work w/o multibyte core ext
Use ActiveSupport::Multibyte::Chars.new instead of String#mb_chars.
It allows to use ActiveSupport::Multibyte::Chars without requiring
String multibyte core extension.
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 4fe925f7f4..87b1d76026 100644 --- a/activesupport/lib/active_support/multibyte/chars.rb +++ b/activesupport/lib/active_support/multibyte/chars.rb @@ -76,7 +76,7 @@ module ActiveSupport #:nodoc: # # 'Café périferôl'.mb_chars.split(/é/).map { |part| part.upcase.to_s } # => ["CAF", " P", "RIFERÔL"] def split(*args) - @wrapped_string.split(*args).map { |i| i.mb_chars } + @wrapped_string.split(*args).map { |i| self.class.new(i) } end # Works like like <tt>String#slice!</tt>, but returns an instance of Chars, or nil if the string was not |