0
Why this code always prints false??
2 Answers
+ 4
As pointed out by ifl, you have to 'eat' the last character.
b=gets.chomp
+ 3
because the end of line is included in your input, so a and b have different values.
add the following line to demonstrate it.
puts '='+b+'='