aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/multibyte
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-04 15:46:42 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-04 15:55:28 -0300
commit065c20890a11a940e78078fc1c6488a655f41420 (patch)
treeb5353d9c0c96384fa076030dc5360c063206a196 /activesupport/lib/active_support/multibyte
parentdc6efd387faf7f11e93877cb6c74033d0b73e75f (diff)
downloadrails-065c20890a11a940e78078fc1c6488a655f41420.tar.gz
rails-065c20890a11a940e78078fc1c6488a655f41420.tar.bz2
rails-065c20890a11a940e78078fc1c6488a655f41420.zip
String already respond_to scrub at Ruby 2.2
Diffstat (limited to 'activesupport/lib/active_support/multibyte')
-rw-r--r--activesupport/lib/active_support/multibyte/unicode.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/multibyte/unicode.rb b/activesupport/lib/active_support/multibyte/unicode.rb
index 7ab6293b60..35efebc65f 100644
--- a/activesupport/lib/active_support/multibyte/unicode.rb
+++ b/activesupport/lib/active_support/multibyte/unicode.rb
@@ -211,9 +211,8 @@ module ActiveSupport
codepoints
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.
- if '<3'.respond_to?(:scrub) && !defined?(Rubinius)
+ if !defined?(Rubinius)
# Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent
# resulting in a valid UTF-8 string.
#