From: Avi Bryant Date: 2001-05-23T04:56:20+09:00 Subject: [ruby-talk:15551] Re: array.last and array[array.size - 1] not equivalent? On Wed, 23 May 2001 04:43:16 +0900 Colin Steele wrote: > > a = ['a', 'b', 'c'] > a[a.size - 1] += 'd' # ok > a.last += 'x' # not ok > > Why aren't these two equivalent? Seems... weird. Well, a.last += 'x' a.last = a.last + 'x' a.send("last=", a.last + 'x') and there's no "last=" method in Array. Or are you saying there should be? However, a.last << 'x' works fine.