From: Sun Park Date: 2007-06-03T19:50:46+09:00 Subject: Re: Looking for an array method ------=_Part_18502_13919147.1180867847247 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks :) do we have such method in String class, too? 2007/6/3, Daniel Lucraft : > > Sun Park wrote: > > Are there any methods which work exactly like []= but return the changed > > array, different from []= which returns void? > > Array#fill? > > a = [0, 1, 2, 3] > => [0, 1, 2, 3] > > irb(main):006:0> a.fill("x", 2..2) > => [0, 1, "x", 3] > > -- > Posted via http://www.ruby-forum.com/. > > ------=_Part_18502_13919147.1180867847247--