From: jake kaiden Date: 2011-08-10T08:05:23+09:00 Subject: Re: Problem in typical code hi Amir, "self" can be a bit confusing at times, but you can think of it as representing whatever class (or instance of that class) you are dealing with... for example: here, "self" is whatever Fixnum you happen to use with the #double method class Fixnum def double p self * 2 end end 3.double => 6 here, "self" is whatever Array you happen to create and use with the #double method... class Array def double self.each_with_index{|entry, index| new = entry * 2 self[index] = new } end end foo = ["a", "b", "c"] foo.double p foo => ["aa", "bb", "cc"] - j -- Posted via http://www.ruby-forum.com/.