Skip to content

Commit c29e8ae

Browse files
fix: prevent scientific notation when generating bank account number (#3118)
Co-authored-by: Ahmed Hisham <[email protected]>
1 parent 676b901 commit c29e8ae

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/faker/default/bank.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ class << self
1717
#
1818
# @faker.version 1.9.1
1919
def account_number(digits: 10)
20-
output = ''
21-
22-
output += rand.to_s[2..] while output.length < digits
23-
24-
output[0...digits]
20+
Array.new(digits) { rand(10) }.join
2521
end
2622

2723
##

0 commit comments

Comments
 (0)