From: Sebastian Hungerecker Date: 2007-12-28T04:58:19+09:00 Subject: Re: Add Array#first= and Array#last= to std lib MonkeeSage wrote: > On Dec 27, 1:38 pm, Sebastian Hungerecker wrote: > > MonkeeSage wrote: > > > IOW, #pop returns a value, and this is just what #last does. > > > > How is [] different in that regard? That only returns a value, too. > > Exactly. It's not... [] = 3 => syntax error... That [] there is an emtpy array. That's not the [] I was talking about. I'm sorry if I wasn't clear, let me rephrase: You seemed to say that while there is a method Array#[]= (which I assume, you're ok with, since you haven't stated otherwise), there shouldn't be a method Array#last= since Array#last only returns a value like Array#pop does. Now my question to you is: How is Array#[] different in that regard than Array#last? I mean some_array[-1] also only returns a value. But you don't have a problem with people being able to write some_array[-1] = some_value do you? -- Jabber: sepp2k@jabber.org ICQ: 205544826