aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/multibyte/chars.rb
diff options
context:
space:
mode:
authorJames MacAulay <james@jadedpixel.com>2010-05-18 15:19:53 -0400
committerJosé Valim <jose.valim@gmail.com>2010-06-30 13:22:28 +0200
commit16cef77d37ffe3e2cdc6f7db76b4ae59ce4cbc5b (patch)
treefb07349ae7acfc86a924dbdd8efe351b58bc75d0 /activesupport/lib/active_support/multibyte/chars.rb
parent13a36902718d452b31d13f2f7aba5770e51844a9 (diff)
downloadrails-16cef77d37ffe3e2cdc6f7db76b4ae59ce4cbc5b.tar.gz
rails-16cef77d37ffe3e2cdc6f7db76b4ae59ce4cbc5b.tar.bz2
rails-16cef77d37ffe3e2cdc6f7db76b4ae59ce4cbc5b.zip
Fix AS::MB::Chars#+ to not alter self [#4646 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activesupport/lib/active_support/multibyte/chars.rb')
-rw-r--r--activesupport/lib/active_support/multibyte/chars.rb2
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 c107aad6bb..1134d1ccc6 100644
--- a/activesupport/lib/active_support/multibyte/chars.rb
+++ b/activesupport/lib/active_support/multibyte/chars.rb
@@ -105,7 +105,7 @@ module ActiveSupport #:nodoc:
# Example:
# ('Café'.mb_chars + ' périferôl').to_s #=> "Café périferôl"
def +(other)
- self << other
+ chars(@wrapped_string + other)
end
# Like <tt>String#=~</tt> only it returns the character offset (in codepoints) instead of the byte offset.