social_security_number 0.1.2 → 0.1.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
2
  SHA1:
3
- metadata.gz: 002517d505f4660414a052b3ee596dddbfc85c68
4
- data.tar.gz: 1e20c95d9ef3860ffe65d73181a51ca9ebbd6e37
3
+ metadata.gz: 378d7a24acce37a5892f40b48ee957780f883e02
4
+ data.tar.gz: d921f7b1548049a44e2e9ef6ab1fa7d34b68f6b4
5
5
  SHA512:
6
- metadata.gz: 25b17f298f7ea0d07a8c258fef265d402fdc006d12a938f61831220f979547f93028ec4ab414cab2294f1a079eb4658ad3ec205050de660241a3666b81f88b0c
7
- data.tar.gz: 8656d975fedd1776e53b78e74178d65cf304ae6130fd2d5bb51c1b86bab8ec1992fbbc0c053454ab1eee7691cd838ebc3f6485977724852389f5908405d990be
6
+ metadata.gz: d76a21a8530caf46b2d6e87e6c10581d71b59987577779a421f4f75d8bcabb319537ad00effa5e8866d5e18f03b2da726b800851757a30272ece668f85606c93
7
+ data.tar.gz: bcc2bbae831a6fa32c6ccc81ba7c50d9252bf40cf4ad9df4c5f7a309f948eaee954abd2961b925b0b8d8029c2227d35fb5e3be07e3f952ad647fe732e0457df4
@@ -43,7 +43,7 @@ module SocialSecurityNumber
43
43
  def checksum(operation)
44
44
  i = 0
45
45
  compare_method = operation == :even ? :== : :>
46
- digit_number[0..8].reverse.split('').reduce(0) do |sum, c|
46
+ digit_number[2..10].reverse.split('').reduce(0) do |sum, c|
47
47
  n = c.to_i
48
48
  weight = (i % 2).send(compare_method, 0) ? n * 2 : n
49
49
  i += 1
@@ -1,3 +1,3 @@
1
1
  module SocialSecurityNumber
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_security_number
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - SameSystem