bigdecimal 1.3.4 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 809506d82cca1f6385d66ab03efa53a8fc63c56d
4
- data.tar.gz: f7528b2353d5e44055c3d2ed0f22badf972176ae
2
+ SHA256:
3
+ metadata.gz: 73213efa446db0aae9dc184b48255acbd670ac6dc1fff31c8e6361bba7288103
4
+ data.tar.gz: e092ee3be9410d2b888690e5c88b1c7f4e66307f2b01592512ef33f9cfb6ab00
5
5
  SHA512:
6
- metadata.gz: af0068aa8ac383fe3da838fab35e1df659138f4d54e2793c452c44cbd938d55333d896b069110d6ebf9cf63b4cfae09c3cec8eff87c3b3669502dd7f2b0ad662
7
- data.tar.gz: 01e793a0921a5b48e02a0ea05309718e46e4b5c68f33b9283c407adb45fd4a7eb4bee247fe8040e98145c9dc950c7a6441f8b6b2f5353833c5baa9b65d7180fd
6
+ metadata.gz: d314519b706ac6ddb2e8c71723138109ba09d1f399c150b0b1095ff5081b1fd5b96aef5ff4e896ba802b6a6dcb6f220dd41f058cb5796d469b3096b885d7459f
7
+ data.tar.gz: daadfc6a6d520ac15847cd57c75407b87a4884055f6ad24f42ad96194aa530d0461303a6c305790aaeea8ea98f93cca4be81e7143bcc27617061711ae22a914a
@@ -1,6 +1,6 @@
1
1
  # coding: utf-8
2
2
 
3
- bigdecimal_version = '1.3.4'
3
+ bigdecimal_version = '1.3.5'
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "bigdecimal"
@@ -34,6 +34,6 @@ Gem::Specification.new do |s|
34
34
  s.add_development_dependency "rake", "~> 10.0"
35
35
  s.add_development_dependency "rake-compiler", ">= 0.9"
36
36
  s.add_development_dependency "rake-compiler-dock", ">= 0.6.1"
37
- s.add_development_dependency "minitest", "~> 4.7.5"
37
+ s.add_development_dependency "minitest", "< 5.0.0"
38
38
  s.add_development_dependency "pry"
39
39
  end
@@ -110,7 +110,7 @@ rb_rational_num(VALUE rat)
110
110
  #ifdef HAVE_TYPE_STRUCT_RRATIONAL
111
111
  return RRATIONAL(rat)->num;
112
112
  #else
113
- return rb_funcall(rat, rb_intern("numerator"));
113
+ return rb_funcall(rat, rb_intern("numerator"), 0);
114
114
  #endif
115
115
  }
116
116
  #endif
@@ -122,7 +122,7 @@ rb_rational_den(VALUE rat)
122
122
  #ifdef HAVE_TYPE_STRUCT_RRATIONAL
123
123
  return RRATIONAL(rat)->den;
124
124
  #else
125
- return rb_funcall(rat, rb_intern("denominator"));
125
+ return rb_funcall(rat, rb_intern("denominator"), 0);
126
126
  #endif
127
127
  }
128
128
  #endif
@@ -227,7 +227,9 @@ extern VALUE rb_cBigDecimal;
227
227
  #define VP_SIGN_POSITIVE_INFINITE 3 /* Positive infinite number */
228
228
  #define VP_SIGN_NEGATIVE_INFINITE -3 /* Negative infinite number */
229
229
 
230
- #ifdef __GNUC__
230
+ #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
231
+ #define FLEXIBLE_ARRAY_SIZE /* */
232
+ #elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
231
233
  #define FLEXIBLE_ARRAY_SIZE 0
232
234
  #else
233
235
  #define FLEXIBLE_ARRAY_SIZE 1
@@ -17,8 +17,6 @@ bigdecimal_version =
17
17
 
18
18
  $defs << %Q[-DRUBY_BIGDECIMAL_VERSION=\\"#{bigdecimal_version}\\"]
19
19
 
20
- alias __have_macro__ have_macro
21
-
22
20
  have_func("labs", "stdlib.h")
23
21
  have_func("llabs", "stdlib.h")
24
22
  have_func("finite", "math.h")
@@ -132,3 +132,20 @@ class Rational < Numeric
132
132
  BigDecimal(self, precision)
133
133
  end
134
134
  end
135
+
136
+
137
+ class NilClass
138
+ # call-seq:
139
+ # nil.to_d -> bigdecimal
140
+ #
141
+ # Returns nil represented as a BigDecimal.
142
+ #
143
+ # require 'bigdecimal'
144
+ # require 'bigdecimal/util'
145
+ #
146
+ # nil.to_d # => 0.0
147
+ #
148
+ def to_d
149
+ BigDecimal(0)
150
+ end
151
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigdecimal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenta Murata
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-12-24 00:00:00.000000000 Z
13
+ date: 2018-06-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
@@ -58,16 +58,16 @@ dependencies:
58
58
  name: minitest
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - "~>"
61
+ - - "<"
62
62
  - !ruby/object:Gem::Version
63
- version: 4.7.5
63
+ version: 5.0.0
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - "~>"
68
+ - - "<"
69
69
  - !ruby/object:Gem::Version
70
- version: 4.7.5
70
+ version: 5.0.0
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: pry
73
73
  requirement: !ruby/object:Gem::Requirement
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  version: '0'
125
125
  requirements: []
126
126
  rubyforge_project:
127
- rubygems_version: 2.6.14
127
+ rubygems_version: 2.7.6
128
128
  signing_key:
129
129
  specification_version: 4
130
130
  summary: Arbitrary-precision decimal floating-point number library.