From: Craig Demyanovich Date: 2008-06-12T06:31:56+09:00 Subject: Re: [Discuss] ruby, enum all? bug On Wed, Jun 11, 2008 at 4:01 PM, Daniel Parker wrote: > I agree, even though the docs do explain exactly what it does, it seems like > it shouldn't return true. Maybe returning nil would be more appropriate when > there are no elements. That the code does what the docs indicate is beside the point (though it's good that they're in agreement ;-) ). The behavior is definitely not what I would've expected, which is to return false. My vote is to just return false when there are no elements. I like to avoid nil whenever possible (which is almost always) because it forces client code to use a conditional to check for it. Regards, Craig