Skip to content

Commit 375290a

Browse files
authored
[release] 2.7.1 - fix sorbet compatibility (#407)
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)
1 parent a4afc23 commit 375290a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/statsig.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def self.get_client_initialize_response(
405405
def self.get_statsig_metadata
406406
{
407407
'sdkType' => 'ruby-server',
408-
'sdkVersion' => '2.7.0',
408+
'sdkVersion' => '2.7.1',
409409
'languageVersion' => RUBY_VERSION
410410
}
411411
end

statsig.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Gem::Specification.new do |s|
44
s.name = 'statsig'
5-
s.version = '2.7.0'
5+
s.version = '2.7.1'
66
s.summary = 'Statsig server SDK for Ruby'
77
s.description = 'Statsig server SDK for feature gates and experimentation in Ruby'
88
s.authors = ['Statsig, Inc']

0 commit comments

Comments
 (0)