1, String
Quotation marks
[code]
"new string" or 'new string'
[/code]
2, Symbol
Leading colon
[code]
:symbol or :"symbol with spaces"
[/code]
3, Array
Square brackets
[code]
[1, 2, 3, 4, 5]
[/code]
4, Hash
Curly braces
[code]
{"New York" => "NY", "Oregon" => "OR"}
[/code]
5, Range
Two or three dots
[code]
0...10 or 0..9
[/code]
6, Regexp
Forward slashes
[code]
/([a-z]+)/
[/code]
Quotation marks
[code]
"new string" or 'new string'
[/code]
2, Symbol
Leading colon
[code]
:symbol or :"symbol with spaces"
[/code]
3, Array
Square brackets
[code]
[1, 2, 3, 4, 5]
[/code]
4, Hash
Curly braces
[code]
{"New York" => "NY", "Oregon" => "OR"}
[/code]
5, Range
Two or three dots
[code]
0...10 or 0..9
[/code]
6, Regexp
Forward slashes
[code]
/([a-z]+)/
[/code]