The Elements of Style in Ruby #11: Invoking Lambdas/Procs
There are whopping 4 ways to invoke a lambda (or a proc) in Ruby:
There are whopping 4 ways to invoke a lambda (or a proc) in Ruby:
Most Rubyists know they can use literals, classes, ranges and regular expressions in the when branches of a case expression:
For better or for worse Perl had significant influence over Ruby’s initial design. A lot of things were directly borrowed from Perl, but over the years the R...
Ruby’s Enumerable module is pretty extensive, but from time to time I wish it had some extra methods, that are available in the standard libraries of other l...
String#gsub is one of the most used Ruby methods in the wild. Just about every Ruby programmer knows about the method and uses it fairly regularly.