From 16cef77d37ffe3e2cdc6f7db76b4ae59ce4cbc5b Mon Sep 17 00:00:00 2001 From: James MacAulay Date: Tue, 18 May 2010 15:19:53 -0400 Subject: Fix AS::MB::Chars#+ to not alter self [#4646 state:resolved] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- activesupport/lib/active_support/multibyte/chars.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 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 String#=~ only it returns the character offset (in codepoints) instead of the byte offset. -- cgit v1.2.3