Loading…
0+ curated questions with the same answer shape every time: quick recap, deep dive, pitfalls, and follow-ups. Coverage includes .
Ruby OOP interview questions probe deeper than class and object basics. This module covers the questions mid-to-senior interviews actually ask: the full BasicObject → Object → Module → Class hierarchy, MRO method lookup order, open classes and monkey-patching (with risks), duck typing and respond_to? vs is_a?, self in different contexts, class variables (@@) vs class-level instance variables, attr_accessor internals, the Comparable mixin contract, and the difference between inheritance and composition in Ruby. Every answer includes an idiomatic Ruby code shape and surfaces the trade-off the interviewer is really listening for — when open classes become a maintenance problem, when duck typing breaks down, when inheritance is the wrong tool.
Full catalog
Topics are ordered for learning. Within each topic, rows are numbered 1–0 globally so you always know where you are. Collapse topics if you want a lighter view — use Expand all when you need the full list again.
Numbers 1–0 follow the order we recommend — click any row to open the full answer, or use the sticky Next link at the bottom of each page to go Q1 → Q0.