Skip to main content
Journey Uncommon Logo
JourneyUncommon

Ruby Interview Questions (557 to practise)

Ruby is a dynamic, deeply reflective language best known through Rails. Its metaprogramming is both the draw and the trap.

Method lookup through modules and prepend, blocks versus procs versus lambdas and their return behaviour, method_missing, mutation of frozen objects, and the singleton class.

Total questions
557
Easy
50
Medium
247
Hard
260

Where it shows up: Rails product companies, internal tooling, and startups that value shipping speed.

Sample Ruby questions

Twenty real Ruby questions from the library, code snippet included. Nothing here is paraphrased for search engines. It is the same text a signed-in user sees.

Sign in to answer

Everything above is free to read. Answering needs a free account.

We keep the correct answer, the explanation and the scoring behind sign-in so the platform stays honest, which is why the answer options and the worked explanation for every Ruby question stay behind a free account. Signing in is free and takes a few seconds.

Ruby topics covered

60 distinct Ruby topics are tagged across the library. These are the real topic labels stored on the questions, not a hand-written list.

  • method_missing and respond_to_missing (23)
  • method lookup and ancestors (23)
  • method_missing dispatch internals (20)
  • Proc vs lambda return and arity (19)
  • mark-sweep and GC.compact (19)
  • Comparable and spaceship (18)
  • freeze and immutability (17)
  • refinements using (17)
  • include prepend extend on the chain (17)
  • Enumerable and custom each (16)
  • Struct and Data (16)
  • the GVL global VM lock (16)
  • YARV bytecode (15)
  • send and public_send (15)
  • singleton eigenclass (15)
  • Proc vs lambda usage (15)
  • dup vs clone (14)
  • blocks procs lambdas binding (14)
  • fibers and the scheduler (14)
  • define_method (13)
  • lazy enumerators (13)
  • keyword arguments and double splat (12)
  • pattern matching case in (12)
  • frozen string dedup (11)
  • MRI garbage collection (11)
  • Binding objects (11)
  • module_function and extend self (10)
  • prepend vs include (10)
  • gems Bundler require (10)
  • object memory RVALUE embedded strings (10)
  • Threads vs Ractors vs fibers (10)
  • C extension boundary (9)
  • tap and then (8)
  • custom exceptions (8)
  • const_missing included inherited hooks (8)
  • the object model classes are objects (7)
  • symbols vs strings (5)
  • arrays push map select (5)
  • hashes literals and fetch (5)
  • everything is an object nil true false (5)
  • classes initialize attr_accessor (4)
  • truthiness only nil false falsy (4)
  • instance vs class variables (4)
  • string interpolation and methods (3)
  • object model classes are objects (3)
  • each map select reduce (3)
  • modules as namespaces include (2)
  • blocks do end and braces (2)
  • exceptions begin rescue ensure raise (2)
  • Mark-sweep (2)
  • symbol to proc (2)
  • GVL global VM lock (2)
  • times upto each_with_index (1)
  • puts p inspect (1)
  • if unless case (1)
  • ranges (1)
  • classes are objects (1)
  • GC.compact (1)
  • include prepend extend (1)
  • object model: classes are objects (1)

Search and filter every Ruby question

Difficulty