提交 36321d85 编写于 作者: A Arun Agrawal

Remove deprecated `String#encoding_aware?`

core extensions (`core_ext/string/encoding`).
上级 c9bbac46
* Remove deprecated `String#encoding_aware?` core extensions (`core_ext/string/encoding`).
*Arun Agrawal*
* Remove deprecated `Module#local_constant_names` in favor of `Module#local_constants`.
*Arun Agrawal*
......
require 'active_support/deprecation'
class String
def encoding_aware?
ActiveSupport::Deprecation.warn 'String#encoding_aware? is deprecated'
true
end
end
......@@ -8,7 +8,6 @@
end
require 'active_support/core_ext/kernel/reporting'
require 'active_support/core_ext/string/encoding'
silence_warnings do
Encoding.default_internal = "UTF-8"
......
......@@ -651,12 +651,6 @@ def to_s
assert_equal 'foo'.to_yaml, 'foo'.html_safe.to_yaml(:foo => 1)
end
test 'knows whether it is encoding aware' do
assert_deprecated do
assert 'ruby'.encoding_aware?
end
end
test "call to_param returns a normal string" do
string = @string.html_safe
assert string.html_safe?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册