From: Robert Klemme Date: 2010-07-07T02:20:33+09:00 Subject: Re: WTF? Case statement disfunctional? 2010/7/6 Pieter Hugo : > Once again thanks for your patience with me. I have been programming in > ruby for about 1.5 years now and would like to start thinking that I'm > not quite a newbie anymore, but then something like this ups and smacks > me on the chin. I'm on track again though and loving it. Just making sure we do not overlook anything: you are aware of the other form of case, are you? irb(main):001:0> case irb(main):002:1* when 1 > 2 then puts "silly" irb(main):003:1> when 1 > 20 then puts "extraordinary silly" irb(main):004:1> when 1 > 0 then puts "that's just right" irb(main):005:1> else irb(main):006:1* puts "now what?" irb(main):007:1> end that's just right => nil irb(main):008:0> Note, I am not saying that this would be more appropriate in your case - just trying to take care of your chin. :-) Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/