From: Robert Klemme Date: 2007-07-04T19:32:37+09:00 Subject: Re: Ruby case statement 2007/7/4, tobyclemson@gmail.com : > Hi, > > I've read through some of the other case statement posts but can't > find any that answer me this question. > > I know that the case doesn't allow the follow through aspect of case > statements from other languages but is the following valid: > > case type > when 1 > # do stuff for type 1 > when 1,2 > # do stuff for both type 1 and 2 > end > > If it isn't valid, what is the easiest way to obtain this > functionality Why don't you just try it out? Btw, what is the "type" that you are checking? I ask because if you want to do something based on the class of an instance there are different means. Kind regards robert -- Have a look: http://www.flickr.com/photos/fussel-foto/