diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/multibyte/chars.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/multibyte/chars.rb b/activesupport/lib/active_support/multibyte/chars.rb index cd0993d56b..27cc3c65a2 100644 --- a/activesupport/lib/active_support/multibyte/chars.rb +++ b/activesupport/lib/active_support/multibyte/chars.rb @@ -246,7 +246,6 @@ module ActiveSupport #:nodoc: result[range] = self.class.u_unpack(replace_by) @wrapped_string.replace(result.pack('U*')) end - self end # Works just like String#rjust, only integer specifies characters instead of bytes. @@ -365,7 +364,7 @@ module ActiveSupport #:nodoc: # Example: # 'über'.mb_chars.capitalize.to_s #=> "Über" def capitalize - (slice(0) || '').upcase + (slice(1..-1) || '').downcase + (slice(0) || chars('')).upcase + (slice(1..-1) || chars('')).downcase end # Returns the KC normalization of the string by default. NFKC is considered the best normalization form for |