mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
String already respond_to scrub at Ruby 2.2
This commit is contained in:
parent
dc6efd387f
commit
065c20890a
1 changed files with 1 additions and 2 deletions
|
@ -211,9 +211,8 @@ module ActiveSupport
|
||||||
codepoints
|
codepoints
|
||||||
end
|
end
|
||||||
|
|
||||||
# Ruby >= 2.1 has String#scrub, which is faster than the workaround used for < 2.1.
|
|
||||||
# Rubinius' String#scrub, however, doesn't support ASCII-incompatible chars.
|
# Rubinius' String#scrub, however, doesn't support ASCII-incompatible chars.
|
||||||
if '<3'.respond_to?(:scrub) && !defined?(Rubinius)
|
if !defined?(Rubinius)
|
||||||
# Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent
|
# Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent
|
||||||
# resulting in a valid UTF-8 string.
|
# resulting in a valid UTF-8 string.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue