本文简要介绍ruby语言中  Array.replace  的用法。
用法
replace(other_array) → self将 self 的内容替换为 other_array 的内容;返回 self :
a = [:foo, 'bar', 2]
a.replace(['foo', :bar, 3]) # => ["foo", :bar, 3]相关用法
- Ruby Array.replace()用法及代码示例
- Ruby Array.repeated_permutation()用法及代码示例
- Ruby Array.repeated_permutation用法及代码示例
- Ruby Array.repeated_combination()用法及代码示例
- Ruby Array.repeated_combination用法及代码示例
- Ruby Array.reject!用法及代码示例
- Ruby Array.reject用法及代码示例
- Ruby Array.reverse用法及代码示例
- Ruby Array.reverse!用法及代码示例
- Ruby Array.reverse_each用法及代码示例
- Ruby Array.rassoc(obj)用法及代码示例
- Ruby Array.rotate()用法及代码示例
- Ruby Array.rindex用法及代码示例
- Ruby Array.rotate!用法及代码示例
- Ruby Array.rassoc用法及代码示例
- Ruby Array.rrindex()用法及代码示例
- Ruby Array.rotate用法及代码示例
- Ruby Array.rassoc()用法及代码示例
- Ruby Array.push用法及代码示例
- Ruby Array.hash用法及代码示例
- Ruby Array.to_a用法及代码示例
- Ruby Array.to_h用法及代码示例
- Ruby Array.to_s用法及代码示例
- Ruby Array.array + other_array用法及代码示例
- Ruby Array.take()用法及代码示例
注:本文由纯净天空筛选整理自ruby-lang.org大神的英文原创作品 Array.replace。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
