From: "Scott M." Date: 2013-04-02T22:09:49+09:00 Subject: Re: Recursion with Hash Love U Ruby wrote in post #1104060: > tamouse mailing lists wrote in post #1104059: >> On Mon, Apr 1, 2013 at 1:41 PM, Love U Ruby >> wrote: >>> tamouse mailing lists wrote in post #1103993: > >> What do you mean by 'return the whole modified array' ? > > I want : > > [1,2,3][-1] = 12 returns 12 on same update it would return - `[1,2,12]` > instead of 12, i.e. the whole updated array. > > Thanks How about: (a = [1, 2, 3])[-1] = 12; a ? -- Posted via http://www.ruby-forum.com/.