summaryrefslogtreecommitdiff
path: root/ext/bigdecimal
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-10 08:56:05 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-10 08:56:05 +0000
commit42a677c895f82bcd611db2773fbe68b0558b142d (patch)
tree0179e2da7b958e6af1ea510298c061f62c4f6119 /ext/bigdecimal
parent30540c567569d3486ccbf59b59d903d5778f04d5 (diff)
bigdecimal: version 1.3.0.pre.2
Import bigdecimal version 1.3.0.pre.2. The full commit log is here: https://github.com/ruby/bigdecimal/compare/v1.3.0.pre...v1.3.0.pre.2 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal')
-rw-r--r--ext/bigdecimal/bigdecimal.c40
-rw-r--r--ext/bigdecimal/bigdecimal.gemspec2
2 files changed, 21 insertions, 21 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index dd8f0f9d85..34817304e8 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -4003,26 +4003,6 @@ VpAlloc(size_t mx, const char *szVal)
return vp;
}
- /* Check on Inf & NaN */
- if (StrCmp(szVal, SZ_PINF) == 0 || StrCmp(szVal, SZ_INF) == 0 ) {
- vp = VpAllocReal(1);
- vp->MaxPrec = 1; /* set max precision */
- VpSetPosInf(vp);
- return vp;
- }
- if (StrCmp(szVal, SZ_NINF) == 0) {
- vp = VpAllocReal(1);
- vp->MaxPrec = 1; /* set max precision */
- VpSetNegInf(vp);
- return vp;
- }
- if (StrCmp(szVal, SZ_NaN) == 0) {
- vp = VpAllocReal(1);
- vp->MaxPrec = 1; /* set max precision */
- VpSetNaN(vp);
- return vp;
- }
-
/* Skip all '_' after digit: 2006-6-30 */
ni = 0;
buf = rb_str_tmp_new(strlen(szVal) + 1);
@@ -4048,6 +4028,26 @@ VpAlloc(size_t mx, const char *szVal)
}
szVal = psz;
+ /* Check on Inf & NaN */
+ if (StrCmp(szVal, SZ_PINF) == 0 || StrCmp(szVal, SZ_INF) == 0 ) {
+ vp = VpAllocReal(1);
+ vp->MaxPrec = 1; /* set max precision */
+ VpSetPosInf(vp);
+ return vp;
+ }
+ if (StrCmp(szVal, SZ_NINF) == 0) {
+ vp = VpAllocReal(1);
+ vp->MaxPrec = 1; /* set max precision */
+ VpSetNegInf(vp);
+ return vp;
+ }
+ if (StrCmp(szVal, SZ_NaN) == 0) {
+ vp = VpAllocReal(1);
+ vp->MaxPrec = 1; /* set max precision */
+ VpSetNaN(vp);
+ return vp;
+ }
+
/* check on number szVal[] */
ipn = i = 0;
if (szVal[i] == '-') { sign=-1; ++i; }
diff --git a/ext/bigdecimal/bigdecimal.gemspec b/ext/bigdecimal/bigdecimal.gemspec
index 98e0125904..e01649f2fe 100644
--- a/ext/bigdecimal/bigdecimal.gemspec
+++ b/ext/bigdecimal/bigdecimal.gemspec
@@ -1,5 +1,5 @@
# coding: utf-8
-_VERSION = '1.3.0.pre'
+_VERSION = '1.3.0.pre.2'
Gem::Specification.new do |s|
s.name = "bigdecimal"