Cool, But... Why?
summary
Digging into Ruby internals, this shows measured surprises: Benchmark reveals for is slower than each despite its keyword form, and a block-based if is ~2x slower; method_missing adds an extra indirection, hides caller methods in traces, and Rails avoids that by defining methods on first use; define_method wraps a Proc so calls are slower and closures retain objects — experiments with object_space show ~10,081 bytes retained — and defining methods via class_eval creates real methods with no closure retention.
AI-written summary · about
chapters (16)
- 0:00Intro
- 2:09Learning Ruby
- 4:27Dont be a parrot
- 4:47Introduction
- 5:46Who am I
- 6:57Disclaimer
- 7:37For loops
- 8:39Benchmark
- 11:20Open Source
- 12:48Method Missing
- 15:06Benchmarking
- 16:31Failures
- 17:18Dynamic Matcher
- 18:03Define Method
- 28:12Lightning Round
- 31:35Dont Write Comments








