summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-23 18:32:01 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-23 18:32:01 +0000
commit8754b2391bae6e2e18b35fdcf614ff312f77a088 (patch)
tree3180b1472bd1480d9a4ecc018c9ac18ef1fe093e /ext
parentcd416f810e0bbc2b4c31c3be109c81dc9f89cfc4 (diff)
Import bigdecimal-1.4.0
* https://github.com/ruby/bigdecimal/compare/v1.4.0.pre.20181220a..v1.4.0 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/bigdecimal/bigdecimal.c14
-rw-r--r--ext/bigdecimal/bigdecimal.gemspec2
2 files changed, 9 insertions, 7 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 052fdc57b9..da1b24a631 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -2668,7 +2668,7 @@ BigDecimal_new(int argc, VALUE *argv)
}
/* call-seq:
- * BigDecimal(initial, digits)
+ * BigDecimal(initial, digits, exception: true)
*
* Create a new BigDecimal object.
*
@@ -2682,8 +2682,13 @@ BigDecimal_new(int argc, VALUE *argv)
* the number of significant digits is determined from the initial
* value.
*
- * The actual number of significant digits used in computation is usually
- * larger than the specified number.
+ * The actual number of significant digits used in computation is
+ * usually larger than the specified number.
+ *
+ * exception:: Whether an exception should be raised on invalid arguments.
+ * +true+ by default, if passed +false+, just returns +nil+
+ * for invalid.
+ *
*
* ==== Exceptions
*
@@ -3955,9 +3960,6 @@ VP_EXPORT size_t
VpInit(BDIGIT BaseVal)
{
/* Setup +/- Inf NaN -0 */
- VpGetDoubleNaN();
- VpGetDoublePosInf();
- VpGetDoubleNegInf();
VpGetDoubleNegZero();
/* Allocates Vp constants. */
diff --git a/ext/bigdecimal/bigdecimal.gemspec b/ext/bigdecimal/bigdecimal.gemspec
index c20dada329..fcf52f9a87 100644
--- a/ext/bigdecimal/bigdecimal.gemspec
+++ b/ext/bigdecimal/bigdecimal.gemspec
@@ -1,6 +1,6 @@
# coding: utf-8
-bigdecimal_version = '1.4.0.pre.20181220a'
+bigdecimal_version = '1.4.0'
Gem::Specification.new do |s|
s.name = "bigdecimal"