Skip to content

Ruby 4 Compatibility + Version Bump to 1.2.0#9

Open
deliverists-io wants to merge 2 commits into
amberbit:masterfrom
deliverists-io:master
Open

Ruby 4 Compatibility + Version Bump to 1.2.0#9
deliverists-io wants to merge 2 commits into
amberbit:masterfrom
deliverists-io:master

Conversation

@deliverists-io

Copy link
Copy Markdown

Summary

This PR adds Ruby 4 compatibility fixes and bumps the gem version to 1.2.0.

Changes

Ruby 4 Compatibility

  • Frozen string literals: Replaced empty string literals ('') with String.new to avoid frozen string errors in Ruby 4
  • Integer formatting: Changed sprintf('%09.0f', number) to format('%09d', number) for proper integer formatting without float conversion

Version Bump

  • Updated gem version from 1.1.1 to 1.2.0

Testing

All existing tests pass with these changes. The modifications are backward compatible with Ruby 3.x.

Motivation

Ruby 4 introduces stricter frozen string literal handling. These changes ensure the gem works correctly on Ruby 4 while maintaining
compatibility with Ruby 3.0+.

- Fix frozen string literals by using String.new instead of ''
- Use format('%09d') instead of sprintf('%09.0f') for pure integer formatting
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