diff options
author | Xavier Noria <fxn@hashref.com> | 2009-11-09 21:39:32 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2009-11-09 22:16:51 +0100 |
commit | b6598c683bb8f8ef484f54755cced77a5d6200bb (patch) | |
tree | 75c288ece09c5a030e59c2589fb2874eb282edb1 /activesupport/lib | |
parent | c0bb4c6ed2f5a5676569746e7bfd70405346ef8f (diff) | |
download | rails-b6598c683bb8f8ef484f54755cced77a5d6200bb.tar.gz rails-b6598c683bb8f8ef484f54755cced77a5d6200bb.tar.bz2 rails-b6598c683bb8f8ef484f54755cced77a5d6200bb.zip |
String#each_char is not needed for Ruby >= 1.8.7
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/iterators.rb | 13 |
2 files changed, 0 insertions, 14 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 |