mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
removes code written for Ruby < 1.8.7
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user