big_decimal_helper 2.0.5 → 2.0.6

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
2
  SHA1:
3
- metadata.gz: be78ac420a90935a9952743f015f7df974a78b2d
4
- data.tar.gz: b85f23947f9175fd50395becd3ba4d8d5877106d
3
+ metadata.gz: f5cb7c05e03c2b1f358615238f41469e36028278
4
+ data.tar.gz: 6844f77005261785f09eff876248b55ab87ac847
5
5
  SHA512:
6
- metadata.gz: 740bcd887c6b9927362abfc02b04645a86b2a6b63aa1b3bb40c5b16054716eedf6de4710a3549b45e9902db471ef9c60006fa889b9ae05a5752189a8730b3a03
7
- data.tar.gz: 1e56f6ae7e3e9333d58cdea4ad298f2fb7f6612c9a0553b8bfd2a9e6cdf6d589bc2b60fdad9c66f2dec1dec2b9e6d5e46394b02d19be7ec3c624cacc140fd635
6
+ metadata.gz: d49cb19038faffc190e449d648654cb1e9513ae83329eb8f02c3f32a6b5cc90019a2c37b933d0cd4be97e5c22a200add2da2fc8346869a987edaa338777ecf6e
7
+ data.tar.gz: bff4c71cbe2834e0296ab62767e110e999c686011cd02cd8d15f8a90267cf85215367c357b1053d775bb46905ee7ed6dc0861ef0d44b43fd518394267f9f072e
@@ -13,6 +13,7 @@ module BigDecimalHelper
13
13
  module ViaStringRepresentation
14
14
  def to_bd
15
15
  string_representation = to_s.gsub(/[^\-\d\.]/, '')
16
+ string_representation = "0" if string_representation =~ /^\s*$/ # convert blanks to zero
16
17
  BigDecimal.new(string_representation)
17
18
  end
18
19
  end
@@ -1,3 +1,3 @@
1
1
  module BigDecimalHelper
2
- VERSION = "2.0.5"
2
+ VERSION = "2.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: big_decimal_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Livingston-Gray