Blocks, Procs, and & operator in Ruby

Blocks, procs, and &amp; operator are something that’s used by Ruby developers daily. While used along with enumerators, we see cool statements like ["ant", "bat"].map(&amp;:upcase). Let’s peek behind the abstractions and try to understand what happens behind. Block Block is a chunk of code enclosed in curly braces or do...end that you can pass to a method. def say_something yield if block...