Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Sep 15, 2024

Conversation

stevegeek
Copy link
Contributor

@stevegeek stevegeek commented Sep 3, 2024

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
Copy link
Contributor Author

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
Copy link
Collaborator

radar commented Sep 15, 2024

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

@radar radar merged commit d718ed4 into ruby-i18n:master Sep 15, 2024
27 checks passed
@stevegeek
Copy link
Contributor Author

Thanks very much @radar !

@stevegeek stevegeek deleted the fix_load_rb_with_pathname branch September 16, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Loading RB files with Pathname in load_path raises TypeError
2 participants