Created
April 6, 2018 02:02
-
-
Save sugamasao/c2f849587075b183ebfedc09264c0c45 to your computer and use it in GitHub Desktop.
hash.default
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> foo = {} | |
=> {} | |
irb(main):002:0> foo.default = "a" | |
=> "a" | |
irb(main):003:0> foo[:z] | |
=> "a" | |
irb(main):004:0> foo[:z].upcase! | |
=> "A" | |
irb(main):005:0> foo[:x] | |
=> "A" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment