From: Tor Erik Linnerud Date: 2010-01-18T11:03:29+09:00 Subject: Re: What is the equivalent of C++ "this"? lalawawa wrote: In Ruby, "this" is called self. def quote length.times {|i| self[i] = "'" + self[i].to_s + "'" end A more idiomatic Ruby way to achieve the same thing would be use map or map!. The later method will replace each element of the array with the value produced in the block given. def quote map!{|element| "'#{element}'"} end Tor Erik -- Posted via http://www.ruby-forum.com/.