summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index 102665f8dff..91d5c97edba 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1100,7 +1100,7 @@ static VALUE
fix_rev(num)
VALUE num;
{
- unsigned long val = FIX2ULONG(num);
+ long val = FIX2LONG(num);
val = ~val;
return rb_int2inum(val);