From: James Date: 2005-02-11T18:45:02+09:00 Subject: [Newbie] Efficient method lookup from integer Hi, I've done much OO coding in perl 5 and I'm making the move over to ruby. Gosh, don't your programs get shorter! What would be a good ruby idiom to move efficiently from a positive integer in the range 0 to ~2000 to a specific method call? A case / when statement would do this simply, but in perl I sped this up by building a lookup table using an array containing references to the appropriate perl subs. Best Wishes, James -- "Be excellent to each other", Bill & Ted