Good points. I got distracted by real work, then came back and had
forgotten he was looking for the value if it wasn't empty/nil.

Yes, it's easy to implement.

On Nov 2, 10:49    򮮮
> G_ F_ wrote:
> > On Oct 30, 4:11 am, Bertram Scharpf <li... / bertram-scharpf.de> wrote:
> > [...]
> >> By the way: Still I'm convinced that there should be a
> >> `String#notempty?' method corresponding to `Numeric#nonzero?'.
>
> >> Bertram
>
> >> --
> >> Bertram Scharpf
> >> Stuttgart, Deutschland/Germanyhttp://www.bertram-scharpf.de
>
> > Maybe I'm totally missing the point here,
>
> You are.
>
> > but I thought String.any?
> > was good enough to tell whether a string has contents:
>
> > 'asdf'.any? # => true
> > ''.any? # => false
>
> > 'asdf'.empty? # => false
> > ''.empty? # => true
>
> No. Bertram's idea was a bit different as far as I can tell.   
> was saying that just as we have
> 5.nonzero? # => 5
> we should have
> 'foo'.notempty? # => 'foo'
>
> I think it's a good idea, but since it's so trivial to implement, I
> doubt that it needs to be a core extension.
> Best,
> --
> Marnen Laibow-Koserhttp://www.marnen.org
> mar... / marnen.org
>
> --
> Posted viahttp://www.ruby-forum.com/.