[前][次][番号順一覧][スレッド一覧]

ruby-changes:60340

From: Jeremy <ko1@a...>
Date: Mon, 9 Mar 2020 22:40:00 +0900 (JST)
Subject: [ruby-changes:60340] ecef163cf9 (master): Remove Float::ROUNDS

https://git.ruby-lang.org/ruby.git/commit/?id=ecef163cf9

From ecef163cf9bbdffcf1466addc39daa92084d6b53 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Sun, 8 Mar 2020 21:01:04 -0700
Subject: Remove Float::ROUNDS

Fixes [Bug #16044]

diff --git a/numeric.c b/numeric.c
index c880199..b418382 100644
--- a/numeric.c
+++ b/numeric.c
@@ -44,9 +44,6 @@ https://github.com/ruby/ruby/blob/trunk/numeric.c#L44
 #ifndef FLT_RADIX
 #define FLT_RADIX 2
 #endif
-#ifndef FLT_ROUNDS
-#define FLT_ROUNDS 1
-#endif
 #ifndef DBL_MIN
 #define DBL_MIN 2.2250738585072014e-308
 #endif
@@ -5703,23 +5700,6 @@ Init_Numeric(void) https://github.com/ruby/ruby/blob/trunk/numeric.c#L5700
     rb_undef_method(CLASS_OF(rb_cFloat), "new");
 
     /*
-     *  Deprecated, do not use.
-     *
-     *  Represents the rounding mode for floating point addition at the start time.
-     *
-     *  Usually defaults to 1, rounding to the nearest number.
-     *
-     *  Other modes include:
-     *
-     *  -1::	Indeterminable
-     *	0::	Rounding towards zero
-     *	1::	Rounding to the nearest number
-     *	2::	Rounding towards positive infinity
-     *	3::	Rounding towards negative infinity
-     */
-    rb_define_const(rb_cFloat, "ROUNDS", INT2FIX(FLT_ROUNDS));
-    rb_deprecate_constant(rb_cFloat, "ROUNDS");
-    /*
      *	The base of the floating point, or number of unique digits used to
      *	represent the number.
      *
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]