From: Aldric Giacomoni Date: 2009-12-11T02:48:30+09:00 Subject: Re: human-readable listing of array elements Robert Klemme wrote: > 2009/12/10 Aldric Giacomoni : >> Marnen Laibow-Koser wrote: >>> >>> Yes. �case won't handle <= conditions AFAIK. >> >> That is a very good point, though it does handle ranges, so "case 0..1" >> would fit this particular scenario. >> Your elsif statement is probably better suited here though. > > That point is not exactly true: while it doesn't out of the box... c:\>irb irb(main):001:0> RUBY_VERSION => "1.8.7" irb(main):002:0> 5.times { |a| case a; when 0..2 then puts "yow" else puts "nah" end } yow yow yow nah nah => 5 irb(main):003:0> Alright.. Well then, I'm confused. -- Posted via http://www.ruby-forum.com/.