From: Yohanes Santoso Date: 2002-01-24T14:35:40+09:00 Subject: Re: Array.last Weirdness > to print "hello world", but instead I get errors like "undefined method > `last=' for ["hello"]:Array (NameError)". This doesn't seem too good... Array.last += " world" resolves to: Array.last=(Array.last + " world) But Array.last= is not a built-in method to Array. You've got to define and includ it yourself. Note that last= has an ambigious meaning. Do you mean _replace_ or _set_ the last element to something? The example below assumes replacing the last element. module XArray def last=(obj) self.pop self.push(obj) end end class Array include XArray end a=["hello"] a.last+=" world" YS.