Hi -- On Wed, 19 Jul 2006, Morton Goldberg wrote: > There are two forms of case block and you have sort of mixed them up. Either > of the following defs of double_it will work. I think the first, using a case > without a target, is probably what you want, but the second, a case with a > target (compares target to pattern with ===), can be made to work, too. That's a more thorough answer than mine, since I didn't think of the non-targeted case. But I realize that I never think of it, because I'm not clear on what its advantages are over a bunch of ifs. I guess with multiple things you can do: case when a == 1, a == 2 etc. David -- http://www.rubypowerandlight.com => Ruby/Rails training & consultancy http://www.manning.com/black => RUBY FOR RAILS (reviewed on Slashdot, 7/12/2006!) http://dablog.rubypal.com => D[avid ]A[. ]B[lack's][ Web]log dblack / wobblini.net => me