From: Lloyd Linklater Date: 2008-02-03T06:56:14+09:00 Subject: Re: Strings .each method Chris Hickman wrote: > I am using .each to pull apart a string at every space. Is there a way > to peek ahead to see what the next substring is without moving to the > next substring in the block? > > I have a ruby book and I was searching for this through google but have > had no luck so far. Didn't know if this was an easy answer for anybody. I am not sure what you mean but here is how to perform the task: a = "This is a big old string." p a.split => ["This", "is", "a", "big", "old", "string."] -- Posted via http://www.ruby-forum.com/.