Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/bane/compatibility.rb
Instance Method Summary collapse
-
#each_char ⇒ Object
copied from jcode in Ruby 1.8.6.
Instance Method Details
#each_char ⇒ Object
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 |