3 ms·
There's an older (but still interesting) post about case in Ruby here[1] and another here[2] with some extra insight into the MRI implementation. Having learned
by ics 13y ago
There's an older (but still interesting) post about case in Ruby here[1] and another here[2] with some extra insight into the MRI implementation. Having learned Ruby before most of the other stuff I play with these days, I always second-guess myself when using a switch/case construct in my code.
[1] http://www.skorks.com/2009/08/how-a-ruby-case-statement-works-and-what-you-can-do-with-it/ http://www.skorks.com/2009/08/how-a-ruby-case-statement-work...
[2] http://www.daniellesucher.com/2013/07/ruby-case-versus-if/ http://www.daniellesucher.com/2013/07/ruby-case-versus-if/
- SkyMarshal 13y agoNice writeups, thanks!