Posted by Jason Green
The Ruby Case statement differs slightly from other languages, and for some reason it is something I always have trouble remembering the exact syntax for.
case n
when 0 then
puts ‘Nothing’
when 2, 7, 10 then
puts ‘Other Numbers’
else
puts ‘There is [...]