Yes, &…: Ruby’s Secret Talent for Improvisation
summary
Explains concrete Ruby behavior: blocks use yield and are ephemeral so you get one block at a time and extra block args become nil; ampersand converts a block to a Proc and you call it with .call; Procs are first‑class, storable closures but proc returns out of method (can cause LocalJumpError if defined outside); lambdas are Procs with method‑like strict arity and lambda enforces arg count and return only from themselves, useful for predictable control flow and captured context.
AI-written summary · about
chapters (10)
- 0:00Welcome
- 1:30Improv principle Yes and in Ruby
- 2:55Passing control with blocks
- 10:24Blocks as scene partners
- 10:44Accepting offers with flexible args
- 15:22Procs vs lambdas in improv
- 21:39Encapsulating behavior with lambdas
- 22:01Sweeping the scene with returns
- 25:55Procs vs lambdas differences
- 26:36Ruby’s improv mindset








