ary.replace(other_ary) â ary
Instance Public methods
Replaces the contents of self
with the contents of
other_ary
, truncating or expanding if necessary.
1 2 3 | a = [ "a" , "b" , "c" , "d" , "e" ] a.replace([ "x" , "y" , "z" ]) #=> ["x", "y", "z"] a #=> ["x", "y", "z"] |
Please login to continue.