A taxonomy of Ruby calls
summary
A practical classification of Ruby calls groups call pairs by the actual work of argument passing and shows concrete effects: specialization removes runtime checks and the interpreter’s fast path caches a function pointer per call pair; splat conversion can fail and fall back to an array-splat wrap (wrap in a one element array) instead of raising; symbol block shorthand does more than Symbol#to_proc because refinements and lexical scope change behaviour; forwarding passes hidden call info that inflates cache keys; allocations and GC interactions force surprising work (2^n keyword default paths, magic number 31); several crashes and a GC-marking bug surface.
AI-written summary · about
chapters (11)
- 0:00Introduction and speaker background
- 1:08Purpose of the talk
- 2:57Argument passing mechanics
- 7:51Stack handling and block arguments
- 13:39Conversion protocols for splat and keyword splat
- 16:26Symbol block argument shorthand
- 21:06Conversion complexity and implementation
- 22:11Hidden call data and miso
- 24:19Forwardable parameters and call info
- 26:49Allocation and memory management
- 30:19Conclusion and takeaways
related talks
28mWho You Gonna Call: Analyzing the Run-time Call-Site Behavior of Ruby Applications
49mHow are Method Calls Formed?
33mRuby: A Family History
52mHow Are Method Calls Formed?
53mRuby.inspect
28mSplitting: the Crucial Optimization for Ruby Blocks
34mHijacking Ruby Syntax in Ruby
27mYes, &…: Ruby’s Secret Talent for Improvisation
