Skip to content

Instantly share code, notes, and snippets.

## Simple example that generates the hash key/iterator error:
## RuntimeError: can't add a new key into hash during iteration
h = Hash.new
h[:a] = 'a'
h[:b] = 'ab'
h[:c] = 'abc'
p = h.each.next