RUBY MAGIC
summary
Live IRB demo builds a tiny gem that monkey patches core classes and then breaks obvious code: arrays modeled as cups shuffle works, a Box class with contents works, but redefining Array#join makes splitting and rejoining a "Donald Trump" string fail unexpectedly. Shows how ActiveSupport adds helpers like Array#second, causing surprising provenance of methods, cites Ernie Miller’s intervention, and argues for explicit alternatives such as dry-rb and trailblazer instead of pervasive magic.
AI-written summary · about
chapters (6)
- 0:00Introduction to Ruby magic
- 2:48Live coding cup trick
- 5:24Box class and Trump string trick
- 8:44Critique of Ruby magic
- 12:06Explicit vs implicit code
- 14:14Conclusion and Q&A








