From: Phrogz Date: 2005-05-12T08:30:27+09:00 Subject: Re: object loops and what they return Eric Mahurin wrote: > Enumerable says nothing about the return value or each. > Array.each says it returns an Array, but not what's in that > Array. Before testing, I was thinking it might be the same as > map/collect. The integer loops also say they return an > integer, but not what it is. You seem to be not so much interested in whether or not people use this feature, as instead convincing them that they shouldn't use them, because you'd like to see the feature go away. (Which is fine...expressing one's opinions and attempting to sway others' it one fine use of the mailing list :) However, I fail to see as valid the argument that we should not be using a feature just because the documentation is incomplete. Instead, the documentation should be fixed. There may certainly to be some side-effects of idiosyncracies of the language implementation upon which one should not rely, but that specific self return value of certain methods smells far more like an intentional feature than a bug. Your argument that they should return nil for consistency certainly has some merit. I counter-argue that if you're always going to return the same value from a method, returning the receiver is usually preferable over returning nil. I vote: don't take away my feature just because you don't like it, and don't like that I use chaining across blocks which (to some) looks ugly. :)