From: Bertram Scharpf Date: 2009-12-14T10:44:14+09:00 Subject: Re: case with && not working compared to using if, works! Hi, Am Montag, 14. Dez 2009, 05:22:00 +0900 schrieb Derek Smith: > > hasval = pidhash.value?(7) ### store true/false > case hasval > when true > then > puts("Running PID == PID in File > ".+(d.to_s).+(t.hour.to_s).+(t.min.to_s)) > when (false && File.size(PIDF) == 1) > then > puts "2nd. PID not active yet file exists", PIDF > when (false && File.size(PIDF) == 0) > then > puts "3rd" > else > puts "no con met" > exit > end Why use case or elsif at all? What you meant is probably: if pidhash.value? 7 then puts "1st: Running PID == PID in File #{d} #{t}" else if File.size(PIDF).nonzero? then puts "2nd: PID not active yet file exists: #{PIDF}" else puts "3rd" end end Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany * Discover String#notempty? at .