Skip to content

Instantly share code, notes, and snippets.

@cyrilchampier
Created December 18, 2018 15:40
Show Gist options
  • Save cyrilchampier/30393f1a34990ec87ef4e1d15b2236da to your computer and use it in GitHub Desktop.
Save cyrilchampier/30393f1a34990ec87ef4e1d15b2236da to your computer and use it in GitHub Desktop.
broken consts
> 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