Skip to content

Instantly share code, notes, and snippets.

@mrjaimisra
Last active April 13, 2016 00:07
Show Gist options
  • Save mrjaimisra/35fd80003e52af7ec5fdc0c386bf8977 to your computer and use it in GitHub Desktop.
Save mrjaimisra/35fd80003e52af7ec5fdc0c386bf8977 to your computer and use it in GitHub Desktop.
Data Types In Ruby

Basic Data Types In Ruby (string, symbol, integer, float, array, hash)

Object Type
“2” String
:2 Symbol
2 Integer
2.0 Float
[2] Array containing one element, 2, which is an Integer
{ :number => 2 } Hash with a key of :number, which is a Symbol,
and a value of 2, which is an Integer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment