Skip to content

Instantly share code, notes, and snippets.

@josephruscio
Created February 22, 2011 18:12
Show Gist options
  • Save josephruscio/839089 to your computer and use it in GitHub Desktop.
Save josephruscio/839089 to your computer and use it in GitHub Desktop.
Symbols are not always interchangeable with strings
ree-1.8.7-2010.02 :014 > k = "1"
=> "1"
ree-1.8.7-2010.02 :015 > k.to_i
=> 1
ree-1.8.7-2010.02 :016 > k = "1".to_sym
=> :"1"
ree-1.8.7-2010.02 :017 > k.to_i
=> 16943
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment