From: Alexey Vakhov Date: 2006-08-10T01:31:02+09:00 Subject: Re: Why is this returning nil? Hello! You forgot quotes in line print #{@level}. Change it to "print #{@level}" please. 2006/8/9, Dark Ambient : > 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 > > -- Alexey Vakhov mailto:vakhov@gmail.com