Skip to content

Instantly share code, notes, and snippets.

@marcric
Created February 13, 2010 17:10
Show Gist options
  • Save marcric/303560 to your computer and use it in GitHub Desktop.
Save marcric/303560 to your computer and use it in GitHub Desktop.
puts '==========='
FIXED = 'MROS'
puts FIXED
puts FIXED.object_id #=> 25986580
puts '==========='
# after a while you may have a more flexible constant
FIXED = 'MarcRic'
# Ruby only show you a warning: already initialized constant FIXED
puts FIXED
puts FIXED.object_id #=> 25986550
puts '==========='
FIXED = 'MROS'
puts FIXED
puts FIXED.object_id #=> 25986510
puts '==========='
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment