ruby-changes:27682
From: takano32 <ko1@a...>
Date: Tue, 12 Mar 2013 17:05:29 +0900 (JST)
Subject: [ruby-changes:27682] takano32:r39734 (trunk): * date_core.c: clearly specify operator precedence.
takano32 2013-03-12 17:05:16 +0900 (Tue, 12 Mar 2013) New Revision: 39734 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39734 Log: * date_core.c: clearly specify operator precedence. Modified files: trunk/ChangeLog trunk/ext/date/date_core.c Index: ChangeLog =================================================================== --- ChangeLog (revision 39733) +++ ChangeLog (revision 39734) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Mar 12 17:02:53 2013 TAKANO Mitsuhiro <tak@n...> + + * date_core.c: clearly specify operator precedence. + Tue Mar 12 17:00:45 2013 TAKANO Mitsuhiro <tak@n...> * insns.def: fix condition. Index: ext/date/date_core.c =================================================================== --- ext/date/date_core.c (revision 39733) +++ ext/date/date_core.c (revision 39734) @@ -679,7 +679,7 @@ c_julian_leap_p(int y) https://github.com/ruby/ruby/blob/trunk/ext/date/date_core.c#L679 inline static int c_gregorian_leap_p(int y) { - return MOD(y, 4) == 0 && y % 100 != 0 || MOD(y, 400) == 0; + return (MOD(y, 4) == 0 && y % 100 != 0) || MOD(y, 400) == 0; } static int -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/