lib/active_support/multibyte/chars.rb in activesupport-3.0.19 vs lib/active_support/multibyte/chars.rb in activesupport-3.0.20
- old
+ new
@@ -435,10 +435,10 @@
@wrapped_string = @wrapped_string.dup.force_encoding(Encoding::ASCII_8BIT)
end
begin
@wrapped_string[0...byte_offset].unpack('U*').length
- rescue ArgumentError => e
+ rescue ArgumentError
byte_offset -= 1
retry
end
end