Continuing the "Hidden features of …" meme, let's share the lesser-known but useful features of Ruby programming language.
Try to limit this discussion with core Ruby, without any Ruby on Rails stuff.
See also:
- Hidden features of C#
- Hidden features of Java
- Hidden features of JavaScript
- Hidden features of Ruby on Rails
- Hidden features of Python
(Please, just one hidden feature per answer.)
Thank you
Best Answer
From Ruby 1.9 Proc#=== is an alias to Proc#call, which means Proc objects can be used in case statements like so: