diff options
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/multibyte/unicode.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/multibyte/unicode.rb b/activesupport/lib/active_support/multibyte/unicode.rb index d7a403c45b..f49ca47f14 100644 --- a/activesupport/lib/active_support/multibyte/unicode.rb +++ b/activesupport/lib/active_support/multibyte/unicode.rb @@ -219,9 +219,9 @@ module ActiveSupport # encoding is entirely CP1252 or ISO-8859-1. def tidy_bytes(string, force = false) if force - return string.unpack("C*").flat_map do |b| + return string.unpack("C*").map do |b| tidy_byte(b) - end.compact.pack("C*").unpack("U*").pack("U*") + end.flatten.compact.pack("C*").unpack("U*").pack("U*") end bytes = string.unpack("C*") |