From: Brian Candler Date: 2009-08-19T16:04:14+09:00 Subject: Re: if defined on var Bertram Scharpf wrote: > Ugh, I did not know that `y' is a method. Only if you "require 'yaml'" One other thing to note. Deciding whether something is a local variable happens at parse time, independent of whether the line is actually excuted or not. So: if false x = 123 end p defined? x # "local_variable" p x # nil -- Posted via http://www.ruby-forum.com/.