Last active
December 17, 2015 05:09
-
-
Save boxxxie/5555945 to your computer and use it in GitHub Desktop.
hash map of hash keys in ruby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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