From: David Stanislaus Date: 2008-06-11T02:02:54+09:00 Subject: Re: Random Number Stuff David A. Black wrote: > Hi -- > > On Tue, 10 Jun 2008, David Stanislaus wrote: > >> >> >> Something about wrong identifier. > > puts "no not since #{1930 + rand(21)}" > > You don't need to assign it to a variable (unless you're going to use > it again), and hanging an assignment off the end of a puts statement > won't work anyway -- so you might as well just embed it in the string > you're printing. > > puts "SPEAK up, Sonny, I can't hear you." talk = gets.chomp while command != 'bye' if talk == talk.upcase puts 'no not since' 1930 + rand(21) else puts 'What? Sonny, speak louder! Like THIS.' end end so how would you fix that? -- Posted via http://www.ruby-forum.com/.