From: Colin Steele Date: 2001-05-23T05:05:25+09:00 Subject: [ruby-talk:15552] array.last and array[array.size - 1] not equivalent? Avi Bryant wrote: >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? No. Just from the intuitive standpoint - least surprise principle - that a.last += 'x' should do what a[a.size - 1] += 'x' does. Or is this just me? :) -- Colin Steele colin@webg2.com / www.colinsteele.org / www.rubycookbook.org From "The Hacker's Dictionary": peta-: /pe't@/ pref. Multiplier, 10 ^ 15 or [proposed] 2 ^ 50. See {kilo-}.