method

each_char

v1_8_6_287 - Show latest stable - Class: String
each_char()
public

No documentation available.

# File lib/jcode.rb, line 209
  def each_char
    if block_given?
      scan(/./m) do |x|
        yield x
      end
    else
      scan(/./m)
    end
  end

1Note

NoMethodError: undefined method `each_char'

Aleran ยท May 4, 20092 thanks

For some reason the each_char method on String is not available by default in Ruby 1.8.6 and you will be presented with a NoMethodError.

You can resolve this by requiring the jcode lib:

require 'jcode'