aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string/iterators.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string/iterators.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/string/iterators.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/iterators.rb b/activesupport/lib/active_support/core_ext/string/iterators.rb
index 73114d9d5f..66a08a5cd0 100644
--- a/activesupport/lib/active_support/core_ext/string/iterators.rb
+++ b/activesupport/lib/active_support/core_ext/string/iterators.rb
@@ -5,6 +5,10 @@ module ActiveSupport #:nodoc:
module String #:nodoc:
# Custom string iterators
module Iterators
+ def self.append_features(base)
+ super unless '1.9'.respond_to?(:each_char)
+ end
+
# Yields a single-character string for each character in the string.
# When $KCODE = 'UTF8', multi-byte characters are yielded appropriately.
def each_char