6 试试这个: puts "In which city do you stay?" STDOUT.flush city = gets.chomp puts "The city is " + city 来源 2011-08-23 07:17:33