From: Codeblogger Date: 2007-12-10T19:24:28+09:00 Subject: Re: new to ruby ------=_Part_21174_33365134.1197282272882 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Because gets.chomp.to_i will never be an empty string (''). ''.to_i --> 0 nil.to_i --> 0 Regards, Nicolai ------=_Part_21174_33365134.1197282272882--