diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-30 06:05:57 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-30 06:05:57 +0000 |
commit | 6f6cf042d2e348e73504258fe36f4bd27694a640 (patch) | |
tree | f4c60ff021b9912c7e78d867c7102abf218c8633 /internal.h | |
parent | e1e3d642bfaf8f8c1a94687442cf51c897f8abdf (diff) | |
download | ruby-6f6cf042d2e348e73504258fe36f4bd27694a640.tar.gz |
enumerator.c: fix arith_seq_first for Infinity
* enumerator.c (arith_seq_first): fix for Float::INFINITY.
* test/ruby/test_arithmetic_sequence.rb: add tests.
* numeric.c (ruby_float_step_size): export for internal use.
* internal.h: add prototype declaration of ruby_float_step_size.
[ruby-core:90937][Bug #15518]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/internal.h b/internal.h index 36e03ff9df..77f9a3202f 100644 --- a/internal.h +++ b/internal.h @@ -1639,6 +1639,7 @@ enum ruby_num_rounding_mode { int rb_num_to_uint(VALUE val, unsigned int *ret); VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl); +double ruby_float_step_size(double beg, double end, double unit, int excl); int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless); double ruby_float_mod(double x, double y); int rb_num_negative_p(VALUE); |