lib/ffaker/identification_ec.rb in ffaker-2.22.0 vs lib/ffaker/identification_ec.rb in ffaker-2.23.0
- old
+ new
@@ -18,10 +18,10 @@
"#{FFaker.numerify('##')}#{rand(0..5)}#{FFaker.numerify('######')}"
end
def last_digit(digits)
mod = digits_sum(digits) % 10
- 10 - mod if mod > 0
+ 10 - mod if mod.positive?
end
def digits_sum(digits)
sum = 0
digits.chars.each_with_index do |char, index|