From 6f6cf042d2e348e73504258fe36f4bd27694a640 Mon Sep 17 00:00:00 2001 From: mrkn Date: Wed, 30 Jan 2019 06:05:57 +0000 Subject: 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 --- numeric.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numeric.c') 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; -- cgit v1.2.3