initialize_copy

ary.replace(other_ary) รข ary
Instance Public methods

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

a = [ "a", "b", "c", "d", "e" ]
a.replace([ "x", "y", "z" ])   #=> ["x", "y", "z"]
a                              #=> ["x", "y", "z"]
doc_ruby_on_rails
2015-03-30 17:38:10
Comments
Leave a Comment

Please login to continue.