Skip to content

Commit cb3a967

Browse files
geetfunclaude
andcommitted
Fix Ruby 2.7 CI failure by conditionally requiring stdlib gems
The uri, json, and logger gems are default gems in Ruby 2.7-3.3 and cannot be overridden. Only add them as explicit dependencies for Ruby 3.4+ where they're being extracted from stdlib. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e0b040d commit cb3a967

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

checkend-ruby.gemspec

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ Gem::Specification.new do |spec|
2727

2828
spec.require_paths = ['lib']
2929

30-
# Ruby stdlib gems that are being extracted (future-proofing for Ruby 3.5+)
31-
spec.add_dependency 'json'
32-
spec.add_dependency 'logger'
33-
spec.add_dependency 'uri'
30+
# Ruby stdlib gems being extracted in Ruby 3.4+/3.5+
31+
# Only add as dependencies for Ruby versions where they're no longer bundled
32+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4')
33+
spec.add_dependency 'json'
34+
spec.add_dependency 'logger'
35+
spec.add_dependency 'uri'
36+
end
3437
end

0 commit comments

Comments
 (0)