From: matz@... (Yukihiro Matsumoto) Date: 2004-02-05T09:31:27+09:00 Subject: Re: case with multiple expressions Hi, In message "case with multiple expressions" on 04/02/05, Hal Fulton writes: |Is there anything wrong with this kind of solution? | | case [x,y,z] | when [1,2,3] then #... | when [1,2,4] then #... | when [2,2,3] then #... | else ... | end Hmm, if we define Array#=== as def ===(other) self.all?{|item| item === other} end You can do case [x, y] when [0..50, 150..200] color = white when [0..100, 0..50] color = blue when [50..100, 50..200] color = gray else color = black end Just an idea... matz.