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 /numeric.c | |
parent | e1e3d642bfaf8f8c1a94687442cf51c897f8abdf (diff) |
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 'numeric.c')
-rw-r--r-- | numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2481,7 +2481,7 @@ num_truncate(int argc, VALUE *argv, VALUE num) return flo_truncate(argc, argv, rb_Float(num)); } -static double +double ruby_float_step_size(double beg, double end, double unit, int excl) { const double epsilon = DBL_EPSILON; |