diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-12 07:35:42 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-12 07:35:42 +0000 |
commit | 11ff6569eaefc5fb3845a37c73857e507399382a (patch) | |
tree | f057b9104129bfdb15416e2dc320014da16f3c39 /enumerator.c | |
parent | f677ba887158758c48b4f8e1df092c6aacfe6621 (diff) |
enumerator.c: Fix ArithmeticSequence for complex step
Make sure Enumerator::ArithmeticSequence#each to work well
for a complex step value.
This reverts commit ca47fb329a1d48af3e1009620bdb18e931c9f188.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enumerator.c')
-rw-r--r-- | enumerator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/enumerator.c b/enumerator.c index 2c115aa740..ad76564484 100644 --- a/enumerator.c +++ b/enumerator.c @@ -2661,7 +2661,7 @@ arith_seq_each(VALUE self) s = arith_seq_step(self); x = arith_seq_exclude_end_p(self); - if (ruby_float_step(c, e, s, x, TRUE)) { + if (!RB_TYPE_P(s, T_COMPLEX) && ruby_float_step(c, e, s, x, TRUE)) { return self; } |