summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-20 00:23:01 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-20 00:23:01 (GMT)
commitdb885d0850653425b2c7896f9e6730c57b030ab1 (patch)
tree260eac03069a731723cedfe6daa81e8f9ee9ec65 /range.c
parentad5a6aa790068a323f9129e92b383c9685700b51 (diff)
range.c: step in bignum
* range.c (range_step): honor step in bignum addition. [Feature #12912] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'range.c')
-rw-r--r--range.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/range.c b/range.c
index 71d81fa..67ead72 100644
--- a/range.c
+++ b/range.c
@@ -408,7 +408,7 @@ range_step(int argc, VALUE *argv, VALUE range)
} while (FIXABLE(i));
b = LONG2NUM(i);
- for (;; b = rb_funcallv(b, id_succ, 0, 0))
+ for (;; b = rb_big_plus(b, step))
rb_yield(b);
}
else if (FIXNUM_P(b) && FIXNUM_P(e) && FIXNUM_P(step)) { /* fixnums are special */