From: Belorion Date: 2005-01-08T03:41:40+09:00 Subject: Re: what's the Ruby way to do this? > def snippet(thought) > thought.match(/([^\s]+(\s+|$)){0,10}/)[0]+($'>""?"...":"") > end That is most certainly a precise and accurate solution, but to me the "Ruby Way" is short, conscise code which is *readable* In which case I would suppor the notion that > def snippet(thought) > thought.split[0..9].join(" ") + "..." > end is more the "Ruby Way"