From: Brad Phelan Date: 2006-12-20T01:15:07+09:00 Subject: Re: Problem with string comparison Lucas Holland wrote: > Hi! > > The following code: > > name = gets.comp.to_s > if name == "Bill" or name == "Steve" > puts "Wow, you're pretty smart!" > end > > yields this error, once executed: > > NoMethodError: undefined method ‘comp’ for "Bill":String > > What is wrong with the code? > > Thanks in advance, > > chell > Try > name = gets.chomp