diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string/encoding.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/encoding.rb | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/encoding.rb b/activesupport/lib/active_support/core_ext/string/encoding.rb index d4781bfe0c..dc635ed6a5 100644 --- a/activesupport/lib/active_support/core_ext/string/encoding.rb +++ b/activesupport/lib/active_support/core_ext/string/encoding.rb @@ -1,11 +1,8 @@ +require 'active_support/deprecation' + class String - if defined?(Encoding) && "".respond_to?(:encode) - def encoding_aware? - true - end - else - def encoding_aware? - false - end + def encoding_aware? + ActiveSupport::Deprecation.warn 'String#encoding_aware? is deprecated', caller + true end -end
\ No newline at end of file +end |