<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>Hi</span></div><div><br><span></span></div><div><span>I think Matthew is right - you are trying to use the case statement as an if statement.</span></div><div> "when" produces a positive even if the variable is nil. I think that somehow a nil @question is creeping into your methods.</div><div><br></div><div>I tried this in the IRB (which shows the negative positive being produced):<br></div><div><br></div><div>irb(main):001:0> question = nil<br>=> nil<br>irb(main):002:0> case<br>irb(main):003:1* when question<br>irb(main):004:1> print question<br>irb(main):005:1> end<br>=> nil<br>irb(main):006:0> case<br>irb(main):007:1* when no_quesiton<br>irb(main):008:1> print "no question"<br>irb(main):009:1> end<br>NameError: undefined local variable or method `no_quesiton' for
 main:Object<br>        from (irb):7<br>        from C:/Ruby192/bin/irb:12:in `<main>'</div><div><br></div><div><br></div><div>Cheers<br></div><div><span></span></div><div> </div><div><i>James Cumming, CFA</i></div><div>+44 7799 554468<br></div><br></div></body></html>