You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Describe the bug
When using the
fr
locale; theFaker::Name.name
method sometimes errors with:I believe this is due to the
prefix
beingnil
and sometimesname
will choose the prefix version (#{prefix} #{first_name} #{last_name}
)To Reproduce
10 times calling
.name
works pretty consistentlyUse the reproduction script below to reproduce the issue:
Expected behavior
Either
prefix
is available; or the two options including aprefix
(name and middle) are removed fromhttps://github.com/faker-ruby/faker/blob/main/lib/locales/fr/name.yml
The text was updated successfully, but these errors were encountered: