Comment on Yoda ConditionsparentComments−yellowapple9yTo 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;
Comments
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:
versus: