aboutsummaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-30 06:05:57 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-30 06:05:57 +0000
commit6f6cf042d2e348e73504258fe36f4bd27694a640 (patch)
treef4c60ff021b9912c7e78d867c7102abf218c8633 /numeric.c
parente1e3d642bfaf8f8c1a94687442cf51c897f8abdf (diff)
downloadruby-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 'numeric.c')
-rw-r--r--numeric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index 1221eafa9e..a1090ff85d 100644
--- a/numeric.c
+++ b/numeric.c
@@ -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;