Ruby’s Ancestor Chain: Why prepend Cuts the Line

June 7, 2026 When Ruby receives a method call, it follows a well-defined search path to determine where that method is implemented. Most developers learn inheritance early, but fewer take the time to understand the complete method lookup path, also known as the ancestor chain. Understanding this mechanism can make debugging easier, clarify how Rails … Continue reading Ruby’s Ancestor Chain: Why prepend Cuts the Line

MRI Internals: How Ruby Arrays Became a VM Playground

May 12, 2026 If you still think Ruby’s Array is “just a C struct with some methods on top,” you’re about 5 years out of date. Modern MRI tells a very different story. Today, Array sits at the intersection of: Ruby code (array.rb) VM intrinsics (Primitive.*) C runtime (array.c) JIT specialization (YJIT) And the result … Continue reading MRI Internals: How Ruby Arrays Became a VM Playground