Skip to content

2.7.1 - fix sorbet compatibility

Choose a tag to compare

@statsig-kong statsig-kong released this 20 Oct 20:10
· 6 commits to main since this release
375290a

Sorbet’s T::Sig monkey-patches Ruby’s Kernel#require, which breaks Statsig’s internal lazy-loading during Statsig.initialize. When extend T::Sig is used anywhere in a project, Statsig fails to load internal classes like Statsig::UserPersistentStorageUtils, causing silent initialization failures and incorrect gate checks.

This change replaces all internal require calls in the SDK with require_relative.
Using require_relative ensures internal files resolve correctly regardless of Sorbet’s patched require
External dependencies are untouched

thanks to simon jenkins of instacart for the thorough bug report and suggested fix

Included In This Release

  • a4afc23 tore-statsig
    • fix: sorbet compatibility for internal deps (#404)
  • 7db8d47 tore-statsig
    • fix: code coverage setup + tests (#405)

Full Changelog: 2.7.0...2.7.1