Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Confident Code. Parent comment
You can override ! (see http://www.rubyinside.com/rubys-unary-operators-and-how-to-r... from earlier this week) so !!obj can evaluate to false. But there is still this to solve:
ruby-1.9.3-p0 :008 > obj ? true : false => true ruby-1.9.3-p0 :009 >
(For the record: yuck).
There are no comments on this comment yet.
You can override ! (see http://www.rubyinside.com/rubys-unary-operators-and-how-to-r... from earlier this week) so !!obj can evaluate to false. But there is still this to solve:
If only there was a #to_bool to override...(For the record: yuck).