roadmap
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
Prepare for Ruby interviews on current Ruby 4.0: blocks, Enumerable, objects and modules, metaprogramming, errors, I/O and concurrency, plus Bundler, RubyGems, RSpec, Minitest, RuboCop and Rack.
559 of 559 questions in your plan: 0 known, 0 in progress, 0 due, 0 skipped, 559 new. 0 cut, outside your plan.
Ruby is seldom interviewed on its own. It usually arrives as the working language of a Rails backend loop, and sometimes of a tooling team that writes its scripts in it. The pairing exercise or take-home is written in Ruby and read for idiom as much as correctness: an `each` loop pushing into an array where `map` or `group_by` would say it in one line, a hand-written value class where `Struct` or `Data` fits. A language conversation, often folded into the technical round, then picks at the semantics underneath the framework. Those questions come as small puzzles. What happens when a proc calls `return` after the method that created it has already returned? Why does `Hash.new([])` leave every missing key sharing one array? Where does `prepend` put a module in the ancestor chain, and what does a bare `super` pass up it? Why does `rescue Exception` swallow Ctrl-C? Saying what a snippet prints carries a candidate through the lower bands. Further up the level range, interviewers want cost and consequence: why threads speed up a batch of HTTP calls but not a CPU-bound job while the GVL is held, when a reopened core class should have been a refinement, and how to find the line that is producing the garbage.
The opening section is how a script starts and what its lines mean: [interpreters and releases](/topics/lang-ruby-runtime), `require` and the load path, then syntax. Values & Flow follows because Ruby's surprises begin small: `case`/`in` pattern matching among the [control structures](/topics/lang-ruby-control-flow), then [truthiness](/topics/lang-ruby-types-nil-truthiness), where only `nil` and `false` count as false, and [strings](/topics/lang-ruby-text) that stay mutable unless frozen. Collections and [Enumerable](/topics/lang-ruby-enumerable-collections) come before the plan explains how a method takes a block, on purpose: you call `map` and `select` long before you write a method that calls `yield`. [Methods and their arguments](/topics/lang-ruby-methods) then sit just ahead of [callable objects](/topics/lang-ruby-blocks-procs-lambdas), the module that names what you were passing all along: procs, lambdas and the scope they close over. Designing Classes runs from [object anatomy](/topics/lang-ruby-objects-classes) through [mixins](/topics/lang-ruby-modules-mixins) to [metaprogramming](/topics/lang-ruby-metaprogramming), and that sequence is the method lookup chain itself: a ghost method makes sense only once you know which ancestors are searched, in what order. After the [exception hierarchy](/topics/lang-ruby-errors), the security module returns to the metaprogramming tools from the other side, since `eval` or `send` handed user input is an [injection sink](/topics/lang-ruby-security-sinks). The plan then looks outward, at files, formats and the standard library, and then at load: [concurrency](/topics/lang-ruby-concurrency) sets threads under the GVL beside fibers, Ractors and forking, and speed and memory asks what the garbage collector and the JIT make of it. The last three sections leave the language for the code around it: version managers and [Bundler](/topics/dev-bundler) decide what a process loads, the test frameworks and RuboCop check what a team wrote, and the close is [Rack](/topics/be-rack), the `call(env)` contract Rails and Sinatra both sit on, followed by Sinatra itself.
A Rails developer often knows more Ruby than they can explain, and some of it is not Ruby: `blank?` and `3.days.ago` come from Active Support and fail in a plain `irb` session. That reader's hours belong in Code You Can Call and Designing Classes, where callbacks, concerns and `has_many` get their mechanisms. Someone arriving from Python or JavaScript should start at the top and slow down in Values & Flow, where truthiness and mutable strings turn old habits into confident wrong answers. If the loop is a few days off, shorten the queue from two sides: keep only must know in the importance range, and end the level range at the band you are applying for. Left on by frequency, study order then tends to bring blocks, Enumerable and the object model up before the toolchain. A longer runway suits the printed sequence, which is what by topics gives you; alongside it, package one small gem with a gemspec, a lockfile, specs RuboCop passes and a bare Rack app that serves it, so the closing sections describe something you have run. Active Record, routing, migrations and the rest of the framework most Ruby postings name sit past this plan's edge, in the [Ruby on Rails roadmap](/roadmaps/ruby-on-rails).
Ruby is seldom interviewed on its own. It usually arrives as the working language of a Rails backend loop, and sometimes of a tooling team that writes its scripts in it. The pairing exercise or take-home is written in Ruby and read for idiom as much as correctness: an each loop pushing into an array where map or group_by would say it in one line, a hand-written value class where Struct or Data fits. A language conversation, often folded into the technical round, then picks at the semantics underneath the framework.
Those questions come as small puzzles. What happens when a proc calls return after the method that created it has already returned? Why does Hash.new([]) leave every missing key sharing one array? Where does prepend put a module in the ancestor chain, and what does a bare super pass up it? Why does rescue Exception swallow Ctrl-C?
Saying what a snippet prints carries a candidate through the lower bands. Further up the level range, interviewers want cost and consequence: why threads speed up a batch of HTTP calls but not a CPU-bound job while the GVL is held, when a reopened core class should have been a refinement, and how to find the line that is producing the garbage.
The opening section is how a script starts and what its lines mean: interpreters and releases, require and the load path, then syntax. Values & Flow follows because Ruby's surprises begin small: case/in pattern matching among the control structures, then truthiness, where only nil and false count as false, and strings that stay mutable unless frozen.
Collections and Enumerable come before the plan explains how a method takes a block, on purpose: you call map and select long before you write a method that calls yield. Methods and their arguments then sit just ahead of callable objects, the module that names what you were passing all along: procs, lambdas and the scope they close over.
Designing Classes runs from object anatomy through mixins to metaprogramming, and that sequence is the method lookup chain itself: a ghost method makes sense only once you know which ancestors are searched, in what order. After the exception hierarchy, the security module returns to the metaprogramming tools from the other side, since eval or send handed user input is an injection sink.
The plan then looks outward, at files, formats and the standard library, and then at load: concurrency sets threads under the GVL beside fibers, Ractors and forking, and speed and memory asks what the garbage collector and the JIT make of it. The last three sections leave the language for the code around it: version managers and Bundler decide what a process loads, the test frameworks and RuboCop check what a team wrote, and the close is Rack, the call(env) contract Rails and Sinatra both sit on, followed by Sinatra itself.
A Rails developer often knows more Ruby than they can explain, and some of it is not Ruby: blank? and 3.days.ago come from Active Support and fail in a plain irb session. That reader's hours belong in Code You Can Call and Designing Classes, where callbacks, concerns and has_many get their mechanisms. Someone arriving from Python or JavaScript should start at the top and slow down in Values & Flow, where truthiness and mutable strings turn old habits into confident wrong answers.
If the loop is a few days off, shorten the queue from two sides: keep only must know in the importance range, and end the level range at the band you are applying for. Left on by frequency, study order then tends to bring blocks, Enumerable and the object model up before the toolchain. A longer runway suits the printed sequence, which is what by topics gives you; alongside it, package one small gem with a gemspec, a lockfile, specs RuboCop passes and a bare Rack app that serves it, so the closing sections describe something you have run.
Active Record, routing, migrations and the rest of the framework most Ruby postings name sit past this plan's edge, in the Ruby on Rails roadmap.