# the parameter references the caller's array def append_zero(list) list << 0 end nums = [1, 2] append_zero(nums) p nums
a method sees the same object