Skip to content

Conversation

@HParker
Copy link
Contributor

@HParker HParker commented Jan 6, 2025

Previously String#% was overridden on versions after Ruby 1.9 to match the 1.8 behavior where missing keys in the expanded format are ignored and not replaced. This is likely suprising behavior in modern Ruby. This removes the previous patch, but still allows overriding this behavior optionally by calling FastGettext.allow_invalid_keys!.

This is less surprising behavior, but still allows a migration path for people who rely on the current missing key behavior. Let me know if this seems reasonable! Thanks!

…nt behavior

Previously String#% was overridden on versions after Ruby 1.9 to match the 1.8 behavior where missing keys in the expanded format are ignored and not replaced. This is likely suprising behavior in modern Ruby. This removes the previous patch, but still allows overriding this behavior optionally by calling `FastGettext.allow_invalid_keys!`.
@grosser
Copy link
Owner

grosser commented Jan 6, 2025

good stuff, thx!

@grosser grosser merged commit c2bba50 into grosser:master Jan 6, 2025
5 of 7 checks passed
@grosser
Copy link
Owner

grosser commented Jan 6, 2025

4.0.0

@grosser
Copy link
Owner

grosser commented Jan 6, 2025

FYI released 4.1.0 with racc dependency and less eol rubies

@HParker HParker deleted the make-string-patch-optional branch January 7, 2025 17:10
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.

2 participants