Skip to content

Instantly share code, notes, and snippets.

@aditya
Created August 20, 2009 14:24
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 aditya/171091 to your computer and use it in GitHub Desktop.
Save aditya/171091 to your computer and use it in GitHub Desktop.
s = "mutable"
arr = [s]
hsh = { arr => "object" }
s.upcase!
p hsh[arr] # -> nil (maybe not what was expected)
hsh.rehash
p hsh[arr] # -> "object"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment