From: Ben Bleything Date: 2008-06-27T05:32:07+09:00 Subject: Re: question about defined? and y On Fri, Jun 27, 2008, alandacosta@gmail.com wrote: > The "!!" should take care of your nil situation when you want a true/ > false. If "defined?(y)" is returning "method", that means you > previously def'ed y ... maybe even in your .irbrc file (if called from > irb). But I'm not sure when you ever actually *care* that it's either true or false. nil is false, false is false, everything else is true. The result is that you generally needn't care what defined? returns. I've never seen a case where this isn't true, but of course that does not mean they don't exist :) Ben