From: Robert Klemme Date: 2008-06-15T22:14:12+09:00 Subject: Re: How !isset in Ruby On 15.06.2008 14:37, Martin Boese wrote: > you can use defined?, however it will also hit on constants (classes), methods > and probably more ..: For global variables testing for nil is probably better because they are always and implicitly defined: robert@fussel ~ $ ruby -e 'p $foo' nil robert@fussel ~ $ ruby -e 'p foo' -e:1: undefined local variable or method `foo' for main:Object (NameError) robert@fussel ~ $ ruby -e 'p @foo' nil Cheers robert