From: ara.t.howard@... Date: 2006-09-09T23:57:22+09:00 Subject: Re: Combine @item.foo.nil? || @item.foo.empty? ? On Sat, 9 Sep 2006, Marshall T. Vandegrift wrote: > ara.t.howard@noaa.gov writes: > >> tr{ tr @item.foo } unless @item.foo.to_s.empty? > > It makes sense to me that > > object.to_s.empty? # => true > > should imply > > object.empty? # => true > > So why not just do > > class NilClass > def empty?; true; end > end > > ? > > -Marshall def deep_in_some_other_unrelated_code begin should_always_be_empty = buggy_method abort unless should_always_be_empty.empty? # OOPS! transfer_four_million_euros_to_swiss_account rescue hours_of_debugging? ensure modify_builtins_with_care! end end -a -- what science finds to be nonexistent, we must accept as nonexistent; but what science merely does not find is a completely different matter... it is quite clear that there are many, many mysterious things. - h.h. the 14th dalai lama