Jed Kowalski wrote: > hi, > Can You tell me please why this instruction doesn't want to work > properly? > It only repeats the: > puts "Buy drink: press 1" > puts "Print money report: press 2" > puts "Print drink report: press 3" > puts "Exit: press 0" > but nothing more > > while q!=0 > puts "What to do?" > puts "Buy drink: press 1" > puts "Print money report: press 2" > puts "Print drink report: press 3" > puts "Exit: press 0" > > q = gets > puts q > puts q > > case q > > when 1: <snip> Kernel#gets returns a string. You are comparing the resulting value to integers. Try using gets.strip.to_i instead. -Justin