Skip to content

Fix double-load warning by changing load to require#2

Merged
lvangool merged 1 commit intomainfrom
hotfix/load-to-require
Apr 7, 2026
Merged

Fix double-load warning by changing load to require#2
lvangool merged 1 commit intomainfrom
hotfix/load-to-require

Conversation

@lvangool
Copy link
Copy Markdown
Contributor

@lvangool lvangool commented Apr 7, 2026

Summary

  • lib/roleback.rb used load() to glob all .rb files, which re-executed version.rb that was already loaded via require. This produces warning: already initialized constant Roleback::VERSION on Ruby 4.0+.
  • Changed load(f) to require(f) so already-loaded files are skipped.
  • Bumped version to 0.2.1.

Test plan

  • All 55 rspec examples pass

lib/roleback.rb used load() to glob all .rb files, which re-executed
version.rb that was already required. Switch to require() to prevent
the "already initialized constant" warning. Bump to 0.2.1.
@lvangool lvangool merged commit c483e0c into main Apr 7, 2026
2 checks passed
@lvangool lvangool deleted the hotfix/load-to-require branch April 7, 2026 19:07
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.

1 participant