instance method Array#replace
replace(another) -> self
-
配列の内容を配列 another の内容で置き換えます。
- [PARAM] another:
- 配列を指定します。
a = [1, 2, 3] a.replace [4, 5, 6] p a #=> [4, 5, 6]
class Array
replace(another) -> self
配列の内容を配列 another の内容で置き換えます。
a = [1, 2, 3] a.replace [4, 5, 6] p a #=> [4, 5, 6]