Ruby Block-Local Variable

Ruby’s variable-scoping rules can be a little surprising if you’re coming from a C-like language. Learn how to introduce variable “shadowing” to Ruby blocks, and…

Numbered Parameters

In a language full of expressive little shorthands, it's time to meet a new idiom! This one makes simple blocks even more concise.

Function Composition Operators

Ruby's support for functional programming has expanded and matured. Join guest chef Devon Estes and learn to use some features added in Ruby 2.6 to qu…

Block Inherited

Learning the rules of Ruby's inheritance callbacks, in order to do defensive metaprogramming.

Thread Interruptions

In this episode we finally discover why the Timeout module is unsafe, and a facility new in Ruby 2.0 that makes dealing with thread interruptions much…

Testing Blocks With Rspec

Last episode we looked at a simple way to test if a method executes a block as intended that will work in any test framework. But if your tool of choi…

Testing Blocks

Today's episode answers the question: how do you test that a block passed to a method is executed as intended?

Catch And Throw

A refactoring episode, showing how to replace exceptions-as-flow-control with the "catch" and "throw" methods.

Splat Group

Today we take a look at a related feature to Ruby's "splat" operator: the ability to recursively destructure arrays using grouped assignment.

Implicit Splat

Delving further into Ruby's destructuring assignment, or "splat", mechanism, today we look at some cases where Ruby performs splatting without an expl…