Hi,

Am Donnerstag, 31. Jan 2008, 22:47:22 +0900 schrieb Peter Hickman:
> Jari Williamsson wrote:
> if (temp == 'cat')
>  x = 1
> elsif(temp == 'dog')
>  x = 2
> elsif(temp == 'banana')
>  x = 3
> else
>  x = nil
> end

  x = if cond1 then
    1
  elsif  cond2 then
    2
  elsif  cond3 then
    3
  end

The else clause is superfluous.

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de