Hi,

Is there a better way to test if a variable|instance is empty ?
I usually use :

@name = 'Guest' if @name.empty?

There's no way to have a trick like the following ?
@name ||= 'Guest' # except here @name need to be 'nil' or 'false' not 
empty

Thank you very much for you replies.

/Nathan

Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>