Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/bane/compatibility.rb

Instance Method Summary collapse

Instance Method Details

#each_charObject

copied from jcode in Ruby 1.8.6



4
5
6
7
8
9
10
11
12
# File 'lib/bane/compatibility.rb', line 4

def each_char
  if block_given?
    scan(/./m) do |x|
      yield x
    end
  else
    scan(/./m)
  end
end