← Back to archive

Stdle #106 · blocks · 2026-09-20

What does this Ruby snippet output?

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

l = lambda { |a, b| puts "#{a}, #{b}" }
begin
l.call(1, 2, 3)
rescue ArgumentError => e
puts e.message
end
l.call(1, 2)
Blocks
2 lines
4 attempts left

Answer & explanation