← Back to archive

Stdle #156 · comparisons · 2026-11-09

What does this Ruby snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

Point = Struct.new(:x, :y)
puts Point.new(1, 2) == Point.new(1, 2)
puts Point.new(1, 2) == Point.new(1, 3)
Comparisons
2 lines
4 attempts left

Answer & explanation