Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Assume Encoding support

  • Loading branch information...
commit 46579340c0847c433c0f9c3f46c79cd4521d9234 1 parent d2a4acd
@norman norman authored
Showing with 1 addition and 5 deletions.
  1. +1 −5 activesupport/lib/active_support/multibyte/chars.rb
View
6 activesupport/lib/active_support/multibyte/chars.rb
@@ -66,11 +66,7 @@ def respond_to?(method, include_private=false)
# Returns +true+ when the proxy class can handle the string. Returns +false+ otherwise.
def self.consumes?(string)
- # Unpack is a little bit faster than regular expressions.
- string.unpack('U*')
- true
- rescue ArgumentError
- false
+ string.encoding == Encoding::UTF_8
end
include Comparable
Please sign in to comment.
Something went wrong with that request. Please try again.