# Require Hooks: Filling the Gap in Ruby's Extensibility

- URL: https://evilmartians.com/events/require-hooks-rubykaigi
- Date: 2026-04-22T00:00:00.000Z
- Conference: RubyKaigi 2026
- City: Hakodate, Hokkaido, Japan
- Speakers: Vladimir Dementyev
- Event website: https://rubykaigi.org/2026
- Video: https://www.youtube.com/watch?v=QhIX0X-lfBA
- Slides: https://speakerdeck.com/player/6c97174c08b04c3796deedf7f9b0cdfa

---

Ruby is famously extensible: open classes, `included`, `inherited` and such, TracePoint, and more. Yet when it comes to intercepting the process of loading (or requiring) source code, we're left without a standard mechanism to do so.

Transpilers, load flow analyzers, runtime type checkers—all of these could benefit from having a standard API for hijacking require calls. What if we had one? Actually, we do.

Let me introduce the `require-hooks` gem, which brings a universal interface for intercepting `require` (and `load`) calls in Ruby, allowing you to perform source transformations and more.
