From: Farrel Lifson Date: 2006-08-10T01:29:25+09:00 Subject: Re: Why is this returning nil? On 09/08/06, Dark Ambient wrote: > class User > > def initialize(level, status) > @level = level > @status = status > end > > def finda > if @status == "active" > print #{@level} > else > puts "user not exist" > end > end > end > > user1 = User.new(1, "active") > user2 = User.new(1, "inactive") > user3 = User.new(2, "active") > user4 = User.new(3, "inactive") > > user1.finda > > Something wrong ..not sure > TIA > Stuart > > print and puts return nil. As they are the last commands executed their return statuses are returned. Farrel