From: Hasan Ozgan Date: 2007-11-13T21:21:06+09:00 Subject: Re: case when when ------=_Part_69_10013306.1194956469662 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline case x when 5..9: puts 'a' # 5,6,7,8,9 when 10...14: puts 'b' # 10,11,12,13 else puts 'c' end # x = 5 then |> a # x = 10 then |> b # x = 14 then |> c On 11/12/07, Peter Szinek wrote: > > Hi Shuaib, > > > I know that when provides conditions and I can use them but I am just > > wondering what is the way because i did not find it in books and online > > case x > when 5,6,7: puts 'a' > when 10,11: puts 'b' > end > > HTH, > Peter > ___ > http://www.rubyrailways.com > http://scrubyt.org > > > > > ------=_Part_69_10013306.1194956469662--