ruby-changes:70489
From: Kenta <ko1@a...>
Date: Fri, 24 Dec 2021 02:30:31 +0900 (JST)
Subject: [ruby-changes:70489] 0b8638cd74 (master): [ruby/bigdecimal] Add TODO comment
https://git.ruby-lang.org/ruby.git/commit/?id=0b8638cd74 From 0b8638cd7439570bc553ed1684a9f59da7d9c103 Mon Sep 17 00:00:00 2001 From: Kenta Murata <mrkn@m...> Date: Thu, 9 Dec 2021 21:50:46 +0900 Subject: [ruby/bigdecimal] Add TODO comment https://github.com/ruby/bigdecimal/commit/ef9cf4e69e --- ext/bigdecimal/bigdecimal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index 36173f35532..c648616b7a7 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -1943,6 +1943,9 @@ BigDecimal_div2(VALUE self, VALUE b, VALUE n) https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/bigdecimal.c#L1943 GUARD_OBJ(cv, VpCreateRbObject(mx + VpBaseFig(), "0", true)); GUARD_OBJ(av, GetVpValue(self, 1)); + /* TODO: I want to refactor this precision control for a float value later + * by introducing an implicit conversion function instead of + * GetVpValueWithPrec. */ if (RB_FLOAT_TYPE_P(b) && b_prec > BIGDECIMAL_DOUBLE_FIGURES) { b_prec = BIGDECIMAL_DOUBLE_FIGURES; } -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/