From: warhero Date: 2006-12-01T04:50:06+09:00 Subject: Re: simple question, looping through each character in a string does it make sense to have a method for String in a file called jcode.rb? I'm just getting into ruby, I haven't had to do a lot yet where I needed t require some other libraries. is all of ruby have weird names for where code is? On Nov 30, 2:29 pm, James Edward Gray II wrote: > On Nov 30, 2006, at 1:13 PM, dbl...@wobblini.net wrote: > > > You can also do: > > > word.split(//).each {|char| puts char }Or without the Array: > > word.scan(/./m) { |char| ... } > > Or you can load the each_char() method from the standard library: > > require "jcode" > word.each_char { |char| ... } > > James Edward Gray II