From: sto.mar@... Date: 2013-03-30T07:33:56+09:00 Subject: Re: Nil or enter with no input Am 29.03.2013 16:55, schrieb Phil H.: > How can I tell if someone has enter nothing in a gets prompt, they only > press enter. I though maybe it was nil, but that doesn't seem to work. I > though this was going to work nicely, but doesn't. The string will be "\n" (a string that contains only a newline): if gets == "\n" or if gets.chomp.empty? will work. --