First, Michael, the original pull request was opened by @clifton, whose app was broken by this change.
Second, to lay out the question as I see it: how should predicates behave? They can either:
- Always return only true or false. (Nobody’s position, as far as I know)
- Generally return true/false, but may return other values instead if there is a good reason to, such as the ability to conveniently provide pertinent information (The core lib’s position, my position and the position of basically everyone else AFAICT)
- Return anything for any reason or no reason, so long as results are truthy and falsey at the right times (fxn’s position, and maybe tenderlove’s position)
I think it’s nifty that #nonzero? returns the number, or that #world_readable? returns the permissions bits. But to have #xhr? returns 0 rather than true, for no articulable reason, as a random side-effect of the implementation - well basically it hurts my brain.
Finally, I think the interest in this change is primarily driven by the nature and content of the response.
When valid pull requests and attempts at compromise are closed for reasons which are clearly unpersuasive to a significant number of rubyists, by the one core member who created of the issue, it makes me wonder. Shouldn’t we just settle this by openly choosing the best of the 3 options above, or some as-yet unarticulated option?