SyntaxFix
Write A Post
Hire A Developer
Questions
Oneliner:
array = [] << 1 << 2 << 3 #this is for fixnums.
or
a = %w| 1 2 3 4 5 |
a = [*'1'..'3']
a = Array.new(3, '1')
a = Array[*'1'..'3']