← Back to archive

Stdle #37 · mutability · 2026-07-13

What does this Ruby snippet output?

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

a = {x: 1}
a.freeze
b = a.clone
c = a.dup
puts b.frozen?
puts c.frozen?
Mutability
2 lines
4 attempts left

Answer & explanation