aboutsummaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/numeric.c b/numeric.c
index 81d48c1a35..8b5423b884 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2801,10 +2801,7 @@ fix_le(VALUE x, VALUE y)
static VALUE
fix_rev(VALUE num)
{
- long val = FIX2LONG(num);
-
- val = ~val;
- return LONG2NUM(val);
+ return ~num | FIXNUM_FLAG;
}
static VALUE