aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-04-17 15:16:38 -0700
committerXavier Noria <fxn@hashref.com>2010-04-17 15:16:38 -0700
commitafcd252205d84ebf5ffd0659301c604a7beba2bb (patch)
tree3bf108c88d96c6559abc84624e2dbdd0e0348cba
parent4327ad51abfddde822766702d154df11bd5b47a3 (diff)
downloadrails-afcd252205d84ebf5ffd0659301c604a7beba2bb.tar.gz
rails-afcd252205d84ebf5ffd0659301c604a7beba2bb.tar.bz2
rails-afcd252205d84ebf5ffd0659301c604a7beba2bb.zip
removes code written for Ruby < 1.8.7
-rw-r--r--activesupport/lib/active_support/core_ext/string/multibyte.rb7
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb12
2 files changed, 0 insertions, 19 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/multibyte.rb b/activesupport/lib/active_support/core_ext/string/multibyte.rb
index 13208c6ee2..42e053d0f8 100644
--- a/activesupport/lib/active_support/core_ext/string/multibyte.rb
+++ b/activesupport/lib/active_support/core_ext/string/multibyte.rb
@@ -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
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index 234e41c772..58ca215970 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -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