On Jul 11, 2007, at 8:00 AM, tobyclemson / gmail.com wrote: > Well it was actually quite a small one off script but it led me to > wondering... Yes John, I want it to fall through like C - is that > possible? Thanks Robert for the useful alternative method. I'm pretty > new to Ruby and haven't actually got so far as to thinking of > everything in terms of classes so this was just a small script written > procedurally rather than in a class based way. > > Nope. That's why I asked. The fall through in C's switch-case block is exactly something that doesn't happen in Ruby. The Ruby switch-case is of course different, perhaps that's why Matz changed the naming of it to case-when. It has no fall through. case-when(s)-else-end The else provides a default if no matching 'when' It's not quite the same as a fall through. It's different from C, but this control mechanism is usually different in different languages, it seems. C's switch-case block is really nothing more than a series of if-else statements. C's else is sometimes more like 'also' (as far as I remember, it's been a while) Ruby's case-when is not the same.