Custom string iterators
Methods
Instance Public methods
Yields a single-character string for each character in the string. When $KCODE = ‘UTF8’, multi-byte characters are yielded appropriately.
Source: show
# File rails/activesupport/lib/active_support/core_ext/string/iterators.rb, line 10 def each_char scanner, char = StringScanner.new(self), %r./u loop { yield(scanner.scan(char) || break) } end