From: Tom Cloyd Date: 2009-07-17T01:49:11+09:00 Subject: case statement puzzle I'm missing something here, and cannot see the problem: x='1' (1..5).include? x.to_i # => true But... x='1' case when x =='0' puts '0' when (1..5).include? x.to_i puts '1' end ...won't even compile. Can someone tell me why? (and maybe how to fix it...) What I'm having to do is this, which works: ... when (1,,5).to_a & [x.to_i].length > 0 ... but it seems over-wrought. t. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist Bellingham, Washington, U.S.A: (360) 920-1226 << tc@tomcloyd.com >> (email) << TomCloyd.com >> (website) << sleightmind.wordpress.com >> (mental health weblog) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~