Revision: 3176 http://trac.macosforge.org/projects/ruby/changeset/3176 Author: vincent.isambart@gmail.com Date: 2009-12-28 18:56:25 -0800 (Mon, 28 Dec 2009) Log Message: ----------- fixed Fixnum#odd? and Fixnum#even? Modified Paths: -------------- MacRuby/trunk/numeric.c Modified: MacRuby/trunk/numeric.c =================================================================== --- MacRuby/trunk/numeric.c 2009-12-28 23:25:16 UTC (rev 3175) +++ MacRuby/trunk/numeric.c 2009-12-29 02:56:25 UTC (rev 3176) @@ -3283,7 +3283,7 @@ static VALUE fix_odd_p(VALUE num, SEL sel) { - if (num & 2) { + if (FIX2LONG(num) & 1) { return Qtrue; } return Qfalse; @@ -3299,7 +3299,7 @@ static VALUE fix_even_p(VALUE num, SEL sel) { - if (num & 2) { + if (FIX2LONG(num) & 1) { return Qfalse; } return Qtrue;
participants (1)
-
source_changes@macosforge.org