Harold Hausman
3/27/2007 9:03:00 AM
On 3/27/07, Sasaki <amin@e-sao.co.jp> wrote:
> Hi guys,
> I have a string variable named as 'last_name'. how can i check
> NULL(nil) of this veriable?
>
> as exapmle
> if ( empty(last_name) ) #*
> # code
> else
> #code
> end
>
>
Hi,
I think the .nil? method is the one you're looking for:
irb(main):001:0> some_nil = nil
=> nil
irb(main):002:0> some_nil.nil?
=> true
Hope that helps,
-Harold