Using the first bit of code below I receive two warning messages:
warning: string literal in condition
x2
if input == \"N\" || \"n\"
#do this
else
I was also looking for the answer to this question, and thanks to a friend found a few other solutions.
1) Change the case for the input so you only have to make one test:
if input.downcase == "n"
2) Use a more sophisticated check on the input data:
if %w{n N}.include?(input) or
if ['n', 'N'].include?(input)
The second one allows for far more flexibility with your checking , especially if there are groups of entry you are looking for.
Hope what I found helps others.