Hi,

Am Dienstag, 14. MçÓ 2006, 00:55:33 +0900 schrieb Berger, Daniel:
> > From: Bertram Scharpf [mailto:lists / bertram-scharpf.de] 
> > Sent: Monday, March 13, 2006 2:34 AM
> > 
> > a method maybe `String#notempty?', [...]
> 
> Not needed:
> 
> unless string.empty?

How do you make the unless modifier return a string?

> For something like this you can just use Ruby's open classes:
> 
> class String
>    def not_empty?
>       !empty?
>    end
> end

This does the same and is probably faster: 

  class String
    alias not_empty? any?
  end

Still, I ask myself where you can see it returning a string.

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de