Skip to content

Instantly share code, notes, and snippets.

@boxxxie
Last active December 17, 2015 05:09
Show Gist options
  • Save boxxxie/5555945 to your computer and use it in GitHub Desktop.
Save boxxxie/5555945 to your computer and use it in GitHub Desktop.
hash map of hash keys in ruby
irb(main):205:0> a
{{1 => 5} => 2}
irb(main):206:0> a.put ( Hamster.hash (3 => 3) , 3)
SyntaxError: (irb):206: syntax error, unexpected tASSOC, expecting ')'
a.put ( Hamster.hash (3 => 3) , 3)
^
from /usr/bin/irb:12:in `<main>'
a.put { Hamster.hash (3 => 3) , 3}
SyntaxError: (irb):207: syntax error, unexpected tASSOC, expecting ')'
a.put { Hamster.hash (3 => 3) , 3}
^
from /usr/bin/irb:12:in `<main>'
a.put Hamster.hash(3 => 3), 3
{{1 => 5} => 2, {3 => 3} => 3}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment