Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[42] pry(main)> f = Hash.new { [] }
=> {}
[43] pry(main)> f[:foo] << :bar
=> [:bar]
[44] pry(main)> f
=> {}
[45] pry(main)> f.keys
=> []
[46] pry(main)> f[:bar]
=> []
[47] pry(main)> f[:foo]
=> []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment