------art_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   then   |> a
# x  0 then |> b
# x  4 then |> c


On 11/12/07, Peter Szinek <peter / rubyrailways.com> 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
>
>
>
>
>

------art_69_10013306.1194956469662--