-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
Description
Describe the bug
When using the fr locale; the Faker::Name.name method sometimes errors with:
no implicit conversion of nil into String (TypeError)
I believe this is due to the prefix being nil and sometimes name will choose the prefix version (#{prefix} #{first_name} #{last_name})
To Reproduce
10 times calling .name works pretty consistently
Use the reproduction script below to reproduce the issue:
require "faker"
10.times do
I18n.with_locale :fr do
Faker::Name.name
end
end
Expected behavior
Either prefix is available; or the two options including a prefix (name and middle) are removed from https://github.com/faker-ruby/faker/blob/main/lib/locales/fr/name.yml