attr_typed 1.0.2 → 1.0.3

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
- SHA256:
3
- metadata.gz: 73a2eec13850755d4b6707cb1036b0315b526bb499f6d3845d87454028e16a5c
4
- data.tar.gz: 73ed16225a358c075f69ca0e4c0df75d5a30811c1ae3ebaa83227e5b97f666cb
2
+ SHA1:
3
+ metadata.gz: 501dbacb5b454c928d5c5ec632670f4b4d6f380d
4
+ data.tar.gz: d180ae99d5503d7ed1ab696a2dec98355324c254
5
5
  SHA512:
6
- metadata.gz: f41e721cbe0bd58b2616fb8183d83cd69fc062bb765435189f8cc590ad0cbd592a268b810e8b3084f7af080c40050ba62a7d5eed041e699a4af443d5f559a68b
7
- data.tar.gz: 3a17f30005773f30945673235a7fd2bb3c3c2de29be9afee998b086c4ba451065e3bbbacaffe5f51987d53c489e73f6a7bc096ab2b5133a6437994107c1b4579
6
+ metadata.gz: 9a20972524b5bc82a43a4c9f69da979cf931f1eb725c65c41e1d9ea7fcadd291f9d4cae9d989774f2fafda700cb929430ea03b6c3054322c2d887e01931b6fe5
7
+ data.tar.gz: bee107282a4a528bc64381ff197909dc4e6c052d2ff3d3608ee5b87c0f053804236e4b8959987d964babfcee3a7c0ff71deebbc18af34d2f49d80edc5230589b
@@ -1,3 +1,3 @@
1
1
  module AttrTyped
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
data/lib/attr_typed.rb CHANGED
@@ -49,8 +49,7 @@ module AttrTyped
49
49
 
50
50
  def parse_strict_integer(value)
51
51
  return value if value.nil? || value.is_a?(Integer)
52
- # remove any leading zeroes to ensure Integer converts via base 10
53
- Integer(value.to_s.strip.gsub(/^0*([1-9][0-9]*|0)$/,'\1'))
52
+ Integer(value, 10)
54
53
  rescue ArgumentError
55
54
  nil
56
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attr_typed
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Langhorne
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-07-31 00:00:00.000000000 Z
12
+ date: 2018-08-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: monetize
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.7.3
107
+ rubygems_version: 2.6.11
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Enforce attribute types at assignment time