Rick Denatale wrote:
> I'm guessing you had this in a program AFTER something which defined x
> 

The two statements were probably typed sequentioally. Consider the 
outputs of two different irb sessions:

irb(main):001:0> y = true if !defined?(x)
=> true
irb(main):002:0> y
=> true
irb(main):003:0>

and

irb(main):001:0> x = true if !defined?(x)
=> nil
irb(main):002:0> x
=> nil
irb(main):003:0> y = true if !defined?(x)
=> nil
irb(main):004:0> y
=> nil
irb(main):005:0> x
=> nil
irb(main):006:0>

x was defined as nil.

js
-- 
Posted via http://www.ruby-forum.com/.