Created
December 18, 2018 15:40
-
-
Save cyrilchampier/30393f1a34990ec87ef4e1d15b2236da to your computer and use it in GitHub Desktop.
broken consts
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
> MY_CONST = 'truc' | |
=> "truc" | |
> MY_CONST.capitalize! | |
=> "Truc" | |
> MY_CONST = { a: 1 } | |
(irb):8: warning: already initialized constant MY_CONST | |
(irb):6: warning: previous definition of MY_CONST was here | |
=> {:a=>1} | |
> MY_CONST[:b] = 2 | |
=> 2 | |
> MY_CONST | |
=> {:a=>1, :b=>2} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment