Last active
June 29, 2016 14:22
-
-
Save netshade/b7e6be552d7257d274f5988b857ecdcc to your computer and use it in GitHub Desktop.
wtf
This file contains 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):001:0> h = Hash.new(Hash.new(0)) | |
=> {} | |
irb(main):002:0> h[:foo][:bar] += 1 | |
=> 1 | |
irb(main):003:0> h | |
=> {} | |
irb(main):004:0> h.empty? | |
=> true | |
irb(main):005:0> h[:foo] | |
=> {:bar=>1} | |
irb(main):006:0> h.each { |k, v| puts [k, v].inspect } | |
=> {} | |
irb(main):007:0> RUBY_VERSION | |
=> "2.2.2" | |
irb(main):012:0> RUBY_PLATFORM | |
=> "x86_64-darwin14" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah,