[macruby-changes] [3176] MacRuby/trunk/numeric.c
source_changes at macosforge.org
source_changes at macosforge.org
Mon Dec 28 18:56:25 PST 2009
Revision: 3176
http://trac.macosforge.org/projects/ruby/changeset/3176
Author: vincent.isambart at 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;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091228/f955f921/attachment.html>
More information about the macruby-changes
mailing list