I see people use the following code:
gets.chomp.to_i
or
gets.chomp.to_f
I don't understand why, when the result of those lines are always the same as when there is no chomp
after gets
.
Is gets.chomp.to_i
really necessary, or is gets.to_i
just enough?