From: orlovdn@... (Dmitry N Orlov) Date: 2003-11-17T10:22:11+09:00 Subject: Re: Return object orlovdn@rambler.ru (Dmitry N Orlov) wrote in message news:<45323c22.0311092310.56710a4e@posting.google.com>... > gabriele renzi wrote in message news:... > I just want return object of the class from object-method times(). See > TDD, please, to understand me :) Sorry. It's fine class Dollar attr_reader :amount def initialize(amount) @amount = amount end def times(multiplier) return Dollar.new(@amount * multiplier) #?????????? end end five = Dollar.new(5) product = five.times(6) #Now product is a Instance of Dollar p product.inspect p five.inspect p (product.times(10).inspect) p product.inspect p five.inspect # # # # #