From: matz@... (Yukihiro Matsumoto) Date: 2001-05-28T16:51:27+09:00 Subject: [ruby-talk:15836] Re: newbie question Hi, In message "[ruby-talk:15833] newbie question" on 01/05/28, Elton Li writes: |I thought it should print 60.0 in all three cases. Let me explain for each three cases: |@duration = (value*60).to_i assign 60*60 to an instance variable @duration. |self.duration = (value*60).to_i? invoke attribute write duration=(60*60), thus assigning an instance variable @duration as a result. |duration = (value*60).to_i? assign 60*60 to a LOCAL VARIABLE "duration", thus no effect happen to the receiver. Hope this helps. matz.