From: Chad Perrin Date: 2006-08-11T05:01:38+09:00 Subject: Re: good writing in Ruby... On Fri, Aug 11, 2006 at 01:20:08AM +0900, Josselin wrote: > I know I can write it the 'ugly common way' (loop) > but I'd like to see how it can be done the Ruby way ... (I am a newbie...) > > here is an array > roles = [ "a", "b", "c", "d", "e" ] Do the "roles" have to be those letters, or did you just use them to illustrate what you're doing? If you can use numbers for "roles" instead, a whole new realm of possibilities opens up using comparison operators. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] Ben Franklin: "As we enjoy great Advantages from the Inventions of others we should be glad of an Opportunity to serve others by any Invention of ours, and this we should do freely and generously."