On Monday, 26 March 2012 at 5:27 AM, Ben Woosley wrote:
> So there's been some angst recently about a certain predicate > returning 0 and nil rather than true and false. > > https://github.com/rails/rails/commit/0aa66f0 > https://github.com/rails/rails/pull/5329 > > My point is simply that, if you're not going to return true, don't say > the method "Returns true" in the docs. 0 is not "true", eve if it is > truthy. > > So I made a docfix pull which fxn closed, but I want some independent > eyes on this point, given how mixed up he is in the saga to date. > > https://github.com/rails/rails/pull/5572 > > Core team, what say you? In the absence of a particular bug which this difference causes, one not caused by a theoretical C programmer who writes != 0, then the entire discussion has already consumed more time than is justified by such a minor distinction. -- Cheers, Koz -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
