From: Shai Rosenfeld Date: 2007-08-08T23:24:35+09:00 Subject: Re: case statement Kaldrenon wrote: > On Aug 8, 10:05 am, Shai Rosenfeld wrote: >> Array#include is EXACTLY what i need, but syntaxtetically (if u get the >> -- >> Posted viahttp://www.ruby-forum.com/. > > include? takes an argument x, and is called on a collection n, so that > if n.include?(x) it returns true. > > http://www.whytheluckystiff.net/ruby/pickaxe/html/ref_c_array.html#Array.include_qm please read the post before posting yourself. what i need is the syntax of a case statement doing the following: case [a, b, c, d] when x: 'nothing happens' when y: 'nothing happens' when z: 'nothing happens' when a: 'render this option' end can anyone help me with a live code example of how to do this? many thanks. -- Posted via http://www.ruby-forum.com/.