Skip to content

Instantly share code, notes, and snippets.

@marcric
Created February 13, 2010 17:13
Show Gist options
  • Save marcric/303565 to your computer and use it in GitHub Desktop.
Save marcric/303565 to your computer and use it in GitHub Desktop.
puts '==========='
puts :ZigZag.object_id #=> 199098
puts :ZigZag.object_id #=> 199098
puts '==========='
puts "ZigZag".to_sym.object_id #=> 199098
puts "ZigZag".to_sym.object_id #=> 199098
puts '==========='
puts :ZigZag == :ZigZag
# We get this true due to just one comparision
puts '==========='
puts "ZigZag" == "ZigZag"
# We get this true due to six comparisions
puts '==========='
puts :ZigZag.to_s
puts '==========='
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment