method

initialize_copy

v1_8_7_72 - Show latest stable - Class: Array
initialize_copy(p1)
public

Replaces the contents of self with the contents of other_array, truncating or expanding if necessary.

   a = [ "a", "b", "c", "d", "e" ]
   a.replace([ "x", "y", "z" ])   #=> ["x", "y", "z"]
   a                              #=> ["x", "y", "z"]