From 9ecec6cb5b18dcfef91c4041274483f6b4889556 Mon Sep 17 00:00:00 2001 From: Ahmed Hisham <104331123+octohisham@users.noreply.github.com> Date: Sat, 6 Sep 2025 03:32:53 +0300 Subject: [PATCH] fix: prevent scientific notation when generating bank account number --- lib/faker/default/bank.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/faker/default/bank.rb b/lib/faker/default/bank.rb index e19364474b..6c59e395b7 100644 --- a/lib/faker/default/bank.rb +++ b/lib/faker/default/bank.rb @@ -17,11 +17,7 @@ class << self # # @faker.version 1.9.1 def account_number(digits: 10) - output = '' - - output += rand.to_s[2..] while output.length < digits - - output[0...digits] + Array.new(digits) { rand(10) }.join end ##