dohutil 0.2.35 → 0.2.36

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: 8d66300f50d9f8ea89c003c35b3fec70ca40bf57
4
- data.tar.gz: a27ae18f53104bc8680070d27808e09f11ba6ce1
2
+ SHA256:
3
+ metadata.gz: f03cfa2550664f0eee00b17e22f92ceeef4b26347aae0b769620733dc22ed5df
4
+ data.tar.gz: 8be7c030fe500c4bd5c25aa5197a566f3c291299fa4400cb7de57dc7a9d9938a
5
5
  SHA512:
6
- metadata.gz: 0ebb176f90a1ccef83b7edc1c2eb53111f335a1a4b637713d333733df37daa849fd1c3652eb9eab5c8a1e3fd743b890e88be0fa98966d38dea8d20dc61678216
7
- data.tar.gz: 22e827a397d020065f7c8c9848f679c010cd16075f7c079b19e705bd7977d70dd24e760fcbec5a02a8348abf4e0d8cc0079cdf1edf79b925094a4f88d76e547d
6
+ metadata.gz: 45a7eb23f741eb5c3f679a79bca40920d85334b55cf3446a978ac324df81844f15381c55cbc95e6c34d90757ffaf70b2b721a677ea5d946c5e3ab518f9db43e3
7
+ data.tar.gz: cba3e36d2ebbb79cc7a1a0e4727f047412396669c243ce5ff1dcc951b1d7157e2c9927c105c1510af8e1ea543bc14a6d28e9b9581dcbfb0bad9cd6d9160470f3
@@ -1,4 +1,4 @@
1
- Copyright (c) 2007 Makani Mason, Kem Mason
1
+ Copyright (c) 2007 ATPSoft
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -2,7 +2,7 @@ require 'bigdecimal'
2
2
  require 'bigdecimal/util'
3
3
 
4
4
  class Integer
5
- unless method_defined?(:to_d)
5
+ if !method_defined?(:to_d)
6
6
  def to_d
7
7
  BigDecimal(self)
8
8
  end
@@ -10,7 +10,7 @@ class Integer
10
10
  end
11
11
 
12
12
  class BigDecimal
13
- unless method_defined?(:to_d)
13
+ if !method_defined?(:to_d)
14
14
  def to_d
15
15
  self
16
16
  end
@@ -22,7 +22,7 @@ class BigDecimal
22
22
  end
23
23
 
24
24
  def to_dig(digits_after_decimal = 2)
25
- raise ArgumentError.new("digits_after_decimal must be >= 0") unless digits_after_decimal >= 0
25
+ raise ArgumentError.new("digits_after_decimal must be >= 0") if digits_after_decimal < 0
26
26
  if nan? || infinite?
27
27
  return '0' if digits_after_decimal == 0
28
28
  return '0.' + ('0' * digits_after_decimal)
@@ -43,7 +43,9 @@ end
43
43
  class NilClass
44
44
  NIL_ZERO_BIGD = BigDecimal(0)
45
45
 
46
- def to_d
47
- NIL_ZERO_BIGD
46
+ if !method_defined?(:to_d)
47
+ def to_d
48
+ NIL_ZERO_BIGD
49
+ end
48
50
  end
49
51
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dohutil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.35
4
+ version: 0.2.36
5
5
  platform: ruby
6
6
  authors:
7
- - Makani Mason
8
- - Kem Mason
7
+ - ATPSoft
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2017-09-25 00:00:00.000000000 Z
11
+ date: 2020-05-20 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: dohroot
@@ -138,8 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
137
  - !ruby/object:Gem::Version
139
138
  version: '0'
140
139
  requirements: []
141
- rubyforge_project:
142
- rubygems_version: 2.6.13
140
+ rubygems_version: 3.1.3
143
141
  signing_key:
144
142
  specification_version: 4
145
143
  summary: assorted tiny utilities