News for hackers. Stuff that matters.
Re:IF-less programming by gizzlon on Friday December 28, 2012 @07:49AM (#4977482)
Absolutely! And in the second example, what happens if "property" is 0 ? (My Ruby is rusty)
Re:IF-less programming by paradoja on Friday December 28, 2012 @09:29AM (#4977760)
0 evaluates to true in Ruby. Only nil and false evaluate to false in Ruby, so it'd work as intended.