ruby-i18n / i18n

Internationalization (i18n) library for Ruby
MIT License
986 stars 411 forks source link

Fix loading of .rb locale files when `load_path` is not a string #701

Closed stevegeek closed 1 month ago

stevegeek commented 2 months ago

Fixes #700

When load_path contains Pathname objects this is usually fine as things like File.open take them, however the one place is breaks is loading .rb locale files due to the 3rd param of Kernel#eval seemingly needing to be a String.

This fixes the issue by calling .to_s on the filename object before calling eval

stevegeek commented 1 month ago

Hey @radar , apologies for the poke, but just wondering if this PR needing anything else to get it merged? Thanks for maintaining the gem!

radar commented 1 month ago

Sorry to have missed this a few weeks back. Nothing else outstanding from my side here.

stevegeek commented 1 month ago

Thanks very much @radar !