diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-04-22 09:10:14 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-04-22 09:10:48 -0700 |
commit | 42a06d2d6253eed3b9f4fb4edfa251c9508a2e20 (patch) | |
tree | b842a72ac3cdd144375fb140686fff71cd69befe /activesupport/lib/active_support/core_ext/string/iterators.rb | |
parent | ca49299434bc764b667cd86846d892e91a150ef3 (diff) | |
download | rails-42a06d2d6253eed3b9f4fb4edfa251c9508a2e20.tar.gz rails-42a06d2d6253eed3b9f4fb4edfa251c9508a2e20.tar.bz2 rails-42a06d2d6253eed3b9f4fb4edfa251c9508a2e20.zip |
stdlib autoloads were hanging on 1.9.1
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string/iterators.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/iterators.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/iterators.rb b/activesupport/lib/active_support/core_ext/string/iterators.rb index 472de7bc24..2f8aa84024 100644 --- a/activesupport/lib/active_support/core_ext/string/iterators.rb +++ b/activesupport/lib/active_support/core_ext/string/iterators.rb @@ -1,11 +1,10 @@ unless '1.9'.respond_to?(:each_char) - autoload :StringScanner, 'strscan' unless defined? :StringScanner - 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 - scanner, char = StringScanner.new(self), /./mu + require 'strscan' unless defined? ::StringScanner + scanner, char = ::StringScanner.new(self), /./mu while c = scanner.scan(char) yield c end |