Since all objects in Ruby (including numbers and strings), any array that you create is an array of objects that does not have restrictions on the types of objects that it can hold. There are no integer arrays or widget arrays in Ruby. Arrays are just arrays.
my_array = [24, :a_symbol, 'a string', Object.new, [1,2,3]]
As you can see, an array can contain anything, even another array.
source share