aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/lib/active_support/core_ext/string.rb1
-rw-r--r--activesupport/lib/active_support/core_ext/string/iterators.rb13
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb11
3 files changed, 0 insertions, 25 deletions
diff --git a/activesupport/lib/active_support/core_ext/string.rb b/activesupport/lib/active_support/core_ext/string.rb
index 6c52f12712..0365b6af1c 100644
--- a/activesupport/lib/active_support/core_ext/string.rb
+++ b/activesupport/lib/active_support/core_ext/string.rb
@@ -4,7 +4,6 @@ require 'active_support/core_ext/string/multibyte'
require 'active_support/core_ext/string/starts_ends_with'
require 'active_support/core_ext/string/inflections'
require 'active_support/core_ext/string/access'
-require 'active_support/core_ext/string/iterators'
require 'active_support/core_ext/string/xchar'
require 'active_support/core_ext/string/behavior'
require 'active_support/core_ext/string/interpolation'
diff --git a/activesupport/lib/active_support/core_ext/string/iterators.rb b/activesupport/lib/active_support/core_ext/string/iterators.rb
deleted file mode 100644
index 2f8aa84024..0000000000
--- a/activesupport/lib/active_support/core_ext/string/iterators.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-unless '1.9'.respond_to?(:each_char)
- class String
- # Yields a single-character string for each character in the string.
- # When $KCODE = 'UTF8', multi-byte characters are yielded appropriately.
- def each_char
- require 'strscan' unless defined? ::StringScanner
- scanner, char = ::StringScanner.new(self), /./mu
- while c = scanner.scan(char)
- yield c
- end
- end
- end
-end
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index dd9e9e0ebb..ffcd086716 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -206,17 +206,6 @@ class StringInflectionsTest < Test::Unit::TestCase
# And changes the original string:
assert_equal original, expected
end
-
- if RUBY_VERSION < '1.9'
- def test_each_char_with_utf8_string_when_kcode_is_utf8
- with_kcode('UTF8') do
- '€2.99'.each_char do |char|
- assert_not_equal 1, char.length
- break
- end
- end
- end
- end
end
class StringBehaviourTest < Test::Unit::TestCase