>       if (reply !='yes' || reply != 'no' )
>           puts ' Please answer "yes" or "no".'


This is a problem.  No matter what answer you provide, at least one of
the two inequality conditions will be true, which means the ||
expression will always be true.

Try this instead:

if (reply != 'yes' && reply != 'no)
   puts 'Please answer "yes" or "no".'