From: William James Date: 2008-09-22T07:37:04+09:00 Subject: Re: Iterating through a string Jody Glidden wrote: > If I try the following... > > "I love guitar playing".split {|s| s.capitalize}.join(" ") > > I would expect it to capitalize the first letter of each word but it > doesn't seem to work. "I love guitar playing".gsub( /\S+/ ){|s| s.capitalize} ==>"I Love Guitar Playing"