removes code written for Ruby < 1.8.7

This commit is contained in:
Xavier Noria
2010-04-17 15:16:38 -07:00
parent 4327ad51ab
commit afcd252205
2 changed files with 0 additions and 19 deletions

View File

@@ -49,13 +49,6 @@ class String
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

View File

@@ -230,18 +230,6 @@ class CoreExtStringMultibyteTest < ActiveSupport::TestCase
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