Skip to content

Instantly share code, notes, and snippets.

@spadidar
Created February 20, 2013 06:45
Show Gist options
  • Save spadidar/4993467 to your computer and use it in GitHub Desktop.
Save spadidar/4993467 to your computer and use it in GitHub Desktop.
Why does this piece of code performs the way it does?
h = {}
n = h
n[:a] = {}
puts h.to_s
{:a => {}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment