3 ms·
To clarify a bit: postfix conditionals actually originate from Perl, and are one of several things that Ruby inherited as a Perl descendant. In Perl: if (
by yellowapple 10y ago
To clarify a bit: postfix conditionals actually originate from Perl, and are one of several things that Ruby inherited as a Perl descendant.
In Perl:
if ($x > 0) { $y += $x }
versus:
$y += $x if $x > 0;