Skip to content

Instantly share code, notes, and snippets.

@DeltaWhy
Created April 19, 2013 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeltaWhy/5420358 to your computer and use it in GitHub Desktop.
Save DeltaWhy/5420358 to your computer and use it in GitHub Desktop.
Fun with Ruby hashes
1.9.3p362 :001 > h = {}
=> {}
1.9.3p362 :002 > h[:h] = h
=> {:h=>{...}}
1.9.3p362 :003 > h
=> {:h=>{...}}
1.9.3p362 :004 > h[:h]
=> {:h=>{...}}
1.9.3p362 :005 > h[:h][:h]
=> {:h=>{...}}
1.9.3p362 :006 > h[:h][:h][:h]
=> {:h=>{...}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment