Hijacking Ruby Syntax in Ruby
summary
Shows concrete hacks that add syntax like method modifiers and resource blocks by combining Binding, TracePoint, Refinements and Ripper to capture and replay local context. Implements final/abstract/override checks, a table style test DSL, a with block for multi resource allocation and a defer stack; gems (binding_ninja style, with, defer) run in development and can be disabled in production but are fragile. Demonstrates how TracePoint plus source mapping locates s expressions and that these techniques work but complicate debugging.
AI-written summary · about
chapters (11)
- 0:00Introduction and speaker intro
- 1:37Ruby bindings and local variables
- 4:54TracePoint for code execution hooks
- 7:00Finalizer and method override prevention
- 13:26Advanced TracePoint usage
- 17:10Combining Ripper and TracePoint
- 19:04Binding Ninja for implicit context
- 23:09Ruby quiz on method removal
- 24:33Resource management with with
- 30:33Deferred execution with TracePoint
- 34:13Summary and warnings








