From 8abef4fd0df828e79be6b9fadd8f45c575ab817c Mon Sep 17 00:00:00 2001 From: Manfred Stienstra Date: Sun, 21 Sep 2008 17:25:36 +0200 Subject: All methods which normally return a string now return a proxy instance. --- activesupport/lib/active_support/multibyte/chars.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activesupport/lib/active_support/multibyte/chars.rb') 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 -- cgit v1.2.3