ruby-changes:56841
From: Nobuyoshi <ko1@a...>
Date: Wed, 7 Aug 2019 00:07:06 +0900 (JST)
Subject: [ruby-changes:56841] Nobuyoshi Nakada: e89d9f3deb (master): Deprecate Float::ROUNDS, which should not be a constant
https://git.ruby-lang.org/ruby.git/commit/?id=e89d9f3deb From e89d9f3debab353d1c5a5162752af8f201d98d49 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 7 Aug 2019 00:02:21 +0900 Subject: Deprecate Float::ROUNDS, which should not be a constant [Bug #16044] diff --git a/numeric.c b/numeric.c index 2f5da6f..d56b2d6 100644 --- a/numeric.c +++ b/numeric.c @@ -5687,7 +5687,9 @@ Init_Numeric(void) https://github.com/ruby/ruby/blob/trunk/numeric.c#L5687 rb_undef_method(CLASS_OF(rb_cFloat), "new"); /* - * Represents the rounding mode for floating point addition. + * 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. * @@ -5700,6 +5702,7 @@ Init_Numeric(void) https://github.com/ruby/ruby/blob/trunk/numeric.c#L5702 * 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/