base = [1,2,3]
added = base.push(4)
p added
# => [1, 2, 3, 4]
p base
# => [1, 2, 3, 4]
base = [1,2,3]
base.push(4,5)
# => [1, 2, 3, 4, 5]
other = [6,7]
base.push(other)
# => [1, 2, 3, 4, 5, [6, 7]]
base.push(*other)
# => [1, 2, 3, 4, 5, [6, 7], 6, 7]
base = [1,2,3]
added = base << 4
p added
# => [1, 2, 3, 4]
p base
# => [1, 2, 3, 4]
base = [1,2,3]
base << 4, 5
# => syntax error
other = [4,5]
base << other
# => [1, 2, 3, [4, 5]]
base << *other
# => syntax error
base.<<(*other)
# => ArgumentError: wrong number of arguments (2 for 1)
base = [1,2,3]
added = base + [4]
p added
# => [1, 2, 3, 4]
p base
# => [1, 2, 3]
base = [1,2,3]
base + 4
# => TypeError: no implicit conversion of Fixnum into Array
base + [4]
# => [1, 2, 3, 4]
base + [5, 6]
# => [1, 2, 3, 4, 5, 6]