From: Andrew Timberlake Date: 2008-01-21T00:10:50+09:00 Subject: Re: Methods and scope - (noob alert) > def > test_gets_positive p "gimme a number : " > ask = gets.chomp > n = ask.to_i > > case > when n < 0 > puts "this number is -ve. i ain't gonna play no more! STOP!" > exit > when n = 0 > print " this number is +ve! this it\'s square:" > p n*n > end > end > > test_gets_positive > > wtf has happened to n? > In this code the line: when n = 0 looks wrong Shouldn't it be: when n >= 0 Andrew Timberlake andrew@andrewtimberlake.com 082 415 8283 skype: andrewtimberlake "I have never let my schooling interfere with my education." --Mark Twain