aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/multibyte/chars.rb
diff options
context:
space:
mode:
authorManfred Stienstra <manfred@fngtps.com>2008-09-21 17:25:36 +0200
committerManfred Stienstra <manfred@fngtps.com>2008-09-21 17:25:36 +0200
commit8abef4fd0df828e79be6b9fadd8f45c575ab817c (patch)
tree0337b3e8d6ead5e9a2686fea48cb9fe401f8bb9c /activesupport/lib/active_support/multibyte/chars.rb
parent520c3f33c3f642ccab3a860cf5ee0b5530c7c4f1 (diff)
downloadrails-8abef4fd0df828e79be6b9fadd8f45c575ab817c.tar.gz
rails-8abef4fd0df828e79be6b9fadd8f45c575ab817c.tar.bz2
rails-8abef4fd0df828e79be6b9fadd8f45c575ab817c.zip
All methods which normally return a string now return a proxy instance.
Diffstat (limited to 'activesupport/lib/active_support/multibyte/chars.rb')
-rw-r--r--activesupport/lib/active_support/multibyte/chars.rb3
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