gets.chomp という method を二つ組み合わせたものを使うと、ユーザの入力部分 文字列 + \n を gets (GET String, 文字列を取ってくる) し、改行文字 \n を chomp (噛み取る) という 組み合わせた動作 を行った。
gets.chomp
gets
\n
chomp
変数 = gets.chomp