Skip to content

Commit 065c208

Browse files
committed
String already respond_to scrub at Ruby 2.2
1 parent dc6efd3 commit 065c208

File tree

1 file changed

+1
-2
lines changed
  • activesupport/lib/active_support/multibyte

1 file changed

+1
-2
lines changed

activesupport/lib/active_support/multibyte/unicode.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,8 @@ def compose(codepoints)
211211
codepoints
212212
end
213213

214-
# Ruby >= 2.1 has String#scrub, which is faster than the workaround used for < 2.1.
215214
# Rubinius' String#scrub, however, doesn't support ASCII-incompatible chars.
216-
if '<3'.respond_to?(:scrub) && !defined?(Rubinius)
215+
if !defined?(Rubinius)
217216
# Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent
218217
# resulting in a valid UTF-8 string.
219218
#

0 commit comments

Comments
 (0)