Recent Posts

Using Ruby’s gsub with a hash

less than 1 minute read

Recently we discussed how you can use String#gsub with a block. Today we’ll examine another somewhat unknown feature of the gsub method - the ability to supp...

Lambdas/Procs in Case Expressions

1 minute read

Most Rubyists know they can use literals, classes, ranges and regular expressions in the when branches of a case expression: