lib/lite/validators/sedol_validator.rb in lite-validators-1.3.2 vs lib/lite/validators/sedol_validator.rb in lite-validators-1.4.0
- old
+ new
@@ -15,9 +15,9 @@
def valid_checksum?
total = 0
digits = value.chars.map { |dgt| /[A-Z]/.match?(dgt) ? (dgt.ord - 55) : dgt.to_i }
digits.each_with_index { |dgt, idx| total += (WEIGHTS[idx] * dgt) }
- (10 - total % 10) % 10
+ (10 - (total % 10)) % 10
end
end