From: Austin Ziegler Date: 2006-09-12T06:58:50+09:00 Subject: Re: Combine @item.foo.nil? || @item.foo.empty? ? On 9/9/06, Marshall T. Vandegrift wrote: > class NilClass > def empty?; true; end > end Because nil isn't empty. It isn't a container. It's not an array, hash, or string. Rails has a #blank? method -- which I've used this weekend -- but nil.empty? is a false question. -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca