提交 afcd2522 编写于 作者: X Xavier Noria

removes code written for Ruby < 1.8.7

上级 4327ad51
......@@ -49,13 +49,6 @@ def mb_chars
def is_utf8?
ActiveSupport::Multibyte::Chars.consumes?(self)
end
unless '1.8.7 and later'.respond_to?(:chars)
def chars
ActiveSupport::Deprecation.warn('String#chars has been deprecated in favor of String#mb_chars.', caller)
mb_chars
end
end
else
def mb_chars #:nodoc
self
......
......@@ -230,18 +230,6 @@ def test_string_should_recognize_utf8_strings
assert !BYTE_STRING.is_utf8?
end
if RUBY_VERSION < '1.8.7'
def test_core_ext_adds_chars
assert UNICODE_STRING.respond_to?(:chars)
end
def test_chars_warns_about_deprecation
assert_deprecated("String#chars") do
''.chars
end
end
end
if RUBY_VERSION < '1.9'
def test_mb_chars_returns_self_when_kcode_not_set
with_kcode('none') do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册