Skip to content

Ruby code review tasks

Ruby tasks: find the bug or predict the output, then get your answer reviewed.

Fields in the report sometimes disappear

Code review · ruby · enumerator · hash · api · review
Medium

Daily summary sometimes mixes categories and changes after being read

Code review · ruby · review · easy · mutable-hash-defaults · aliasing
Easy

Batch webhook audit returns an incomplete result

Code review · ruby · review · hard · block return semantics
Hard

Summary by parameters sometimes corrupts fields

Code review · ruby · keyword-arguments · hash · api-contract
Medium

Notes in the archive behave unstably after saving

Code review · ruby · review · resource cleanup · io · tar · minitest
Easy

Shipping label bundle becomes unstable after build

Code review · ruby · review · hard · object aliasing
Hard

Participant status is sometimes displayed incompletely

Code review · ruby · review · thread synchronization
Easy

Publishing receipts sometimes leaves extra messages and loses the original error

Code review · ruby · review · exception propagation · resource cleanup
Medium

Summary by lines sometimes breaks with different encodings

Code review · ruby · string-encodings · normalization · immutability
Easy

The shared accumulator produces unexpected groups

Predict the output · ruby · hash · mutable-defaults · stdout · output
Easy

Cache keys sometimes do not match between identical requests

Code review · ruby · memoization keys · keyword arguments · resource cleanup · exception propagation
Medium

Local day windows sometimes produce extra records and shifted boundaries

Code review · ruby · review · hard · time-zone boundaries · timezone · aggregation · ordering
Hard

Exporting sessions sometimes distorts lists and labels

Code review · ruby · pattern-matching · enumeration · object-aliasing · keyword-arguments
Hard

Attachment index sometimes merges data from different documents

Code review · ruby · review · easy · mutable hash defaults · object aliasing
Easy

Preview window for the feed sometimes returns empty items and changes the result after a check

Code review · ruby · enumerator · enumerator-consumption · collections · review
Medium

Batch notification sending sometimes adds extra records and hides failures

Code review · ruby · review · hard · block return semantics · exception propagation
Hard

Session export sometimes leaves a temporary file and loses the original error

Code review · ruby · resource cleanup · tempfile · exception propagation · review
Easy

Routing summary sometimes corrupts fields and breaks repeated calls

Code review · ruby · keyword-arguments · object-aliasing · memoization
Medium

Summary by objects sometimes changes after reading

Code review · ruby · object-aliasing · hash · copying · snapshot
Hard

Queue shifts sometimes produce unexpected results

Code review · ruby · thread-synchronization · keyword-arguments · hash · snapshot
Easy

Event summary is sometimes truncated or mixes errors

Code review · ruby · exception-propagation · pattern-matching · enumerator
Medium

Booking splits by local days produce unexpected boundaries

Code review · ruby · review · hard · time-zone boundaries
Hard

Previewing the log sometimes crashes on mixed lines

Code review · ruby · review · easy · string encodings
Easy

Request preview sometimes returns an unexpectedly broad result

Code review · ruby · review · memoization keys · hash · aliasing
Medium

Audit event summary sometimes skips records and changes field structure

Code review · ruby · pattern matching · enumerator consumption · api contract · review
Hard

Attachment summary sometimes changes after reading

Code review · ruby · mutable hash defaults · object aliasing
Easy

Queue preview returns an incomplete total

Predict the output · ruby · enumerator · enumerable · output · medium
Medium

What output will a program with `yield` and `break` from a block produce

Predict the output · ruby · output · block return semantics · yield · break · ensure
Hard

What output will the program print on write and close errors

Predict the output · ruby · output · resource cleanup · exceptions · ensure
Easy

What output will the program with the routing summary print

Predict the output · ruby · keyword arguments · object aliasing · hash · output
Medium

Report snapshot changes after build

Predict the output · ruby · object-aliasing · deep-copy · arrays · hashes
Hard

What output will the program with nested counter synchronization print

Predict the output · ruby · threads · mutex · conditionvariable · output · easy
Easy

What output will the program with `Thread#value` and `join` print

Predict the output · ruby · threads · exception propagation · thread-value · join · output
Medium

What output will the program print at the boundary of local days

Predict the output · ruby · time-zone boundaries · output · datetime · hash
Hard

What output will the program print when cleaning strings with an invalid byte

Predict the output · ruby · string encodings · output · easy
Easy
Ruby interview questions