Skip to content

fix(deps): update dependency ruby to v4#53

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/ruby-4.x
Open

fix(deps): update dependency ruby to v4#53
renovate[bot] wants to merge 1 commit intomainfrom
renovate/ruby-4.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Apr 18, 2026

This PR contains the following updates:

Package Update Change
ruby (source) major 3.4.94.0.2

Release Notes

ruby/ruby (ruby)

v4.0.2: 4.0.2

Compare Source

What's Changed

Note: This list is automatically generated by tool/gen-github-release.rb. Because of this, some commits may be missing.

Full Changelog

v4.0.1: 4.0.1

Compare Source

What's Changed

Note: This list is automatically generated by tool/gen-github-release.rb. Because of this, some commits may be missing.

Full Changelog

v4.0.0: 4.0.0

See also:

What's Changed

Note: This list is automatically generated by tool/gen-github-release.rb. Because of this, some commits may be missing.

Full Changelog

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@github-actions
Copy link
Copy Markdown

Renovate PR Review Results

⚖️ Safety Assessment: ✅ Safe

🔍 Release Content Analysis

This PR updates Ruby from 3.4.9 to 4.0.2, a major version upgrade spanning three releases (4.0.0, 4.0.1, 4.0.2).

Major Changes in Ruby 4.0

New Features:

  • Ruby Box: Isolation/separation of monkey patches, global/class variables, and class/module definitions
  • ZJIT Compiler: Next-generation JIT compiler (requires Rust 1.85.0+ to build, currently experimental)
  • Ractor::Port: New messaging system replacing previous Ractor communication methods
  • Set as Core Class: Set moved from stdlib to core, now implemented in C for better performance

Breaking Changes:

  1. Set Class Changes: Set#inspect output format changed from #<Set: {1, 2, 3}> to Set[1, 2, 3]. Code depending on internal @hash variable will break
  2. Removed Stdlib: CGI library removed from default gems (only cgi/escape remains), SortedSet requires separate gem installation
  3. Process Creation: Kernel#open and IO with leading | removed (must use Kernel.system, backticks, or Open3)
  4. Ractor API: Ractor.yield, #take, #close_outgoing, #close_incoming removed in favor of Ractor::Port
  5. Binding API: Numbered parameters (_1, _2) and it no longer reported as local variables
  6. Net::HTTP: No longer automatically sets Content-Type: application/x-www-form-urlencoded for requests with bodies
  7. Process::Status: Operators & and >> removed (deprecated in 3.3)
  8. *nil Unpacking: Now treated as "no arguments" without calling nil.to_a

Bug Fixes (4.0.1 → 4.0.2):

  • Fixed local variable becomes nil when YJIT enabled mid-method with fork/signal/ensure (Bug #21941)
  • Fixed segfault with argument forwarding combined with splat & positional arg (Bug #21832)
  • Fixed binding.irb LoadError under bundle exec (Bug #21723)
  • Fixed crash on signal raise (Bug #21865)
  • Fixed GC crash in String#% (Bug #21931)
  • Fixed "Cannot allocate memory" with M:N threads/Ractors on low RAM Linux (Bug #21944)
  • Fixed Prism parser issues with pattern matching and lambda argument forwarding
  • Fixed Timeout.timeout not using Timeout::ExitException with Fiber scheduler (Bug #21947)
  • Fixed Rails performance degradation (20% slowdown) in memory allocator (Bug #21838)
  • Fixed UnboundMethod#== returning false for methods from included/extended modules (Bug #21873)

Security Considerations

  • No specific CVEs addressed in 4.0.0-4.0.2
  • Note: Concurrent releases of Ruby 3.2.11 and 3.3.11 included zlib gem fix for CVE-2026-27820 (not directly related to this update)

🎯 Impact Scope Investigation

Usage Analysis in Codebase

Ruby Runtime Configuration:

  • Location: Dockerfile:43, internal/sandbox/runtime.go:221-268
  • Changes Required: Version number update only (handled by this PR)
  • Installation Method: mise with ruby.compile=false setting

Current Ruby Usage:

  1. Runtime Definition (internal/sandbox/runtime.go:221-268):

    • Command: /mise/installs/ruby/current/bin/ruby [entryFile]
    • Resource limits: 1024 MiB AS, 64 MiB Fsize, 256 MiB memory, 32 max PIDs
    • No restricted files
    • No dependency on Ruby stdlib features being removed
  2. E2E Test Coverage (e2e/tests/runtime/ruby.yml):

    • 16 test cases covering: basic I/O, error handling, JSON, classes, blocks, strings, regex
    • Features Used: puts, require_relative, require 'json', JSON.parse/generate, Math::PI, exception handling, array/hash operations, string manipulation, regex
    • No Breaking Changes Detected: None of the test cases use Set, CGI, Process::Status#&/#>>, Ractor, pipe-based Kernel#open, or other removed features
  3. Security Test Coverage (e2e/tests/security/*.yml):

    • Ruby used in various security tests (filesystem, network, syscall filtering)
    • Basic Ruby execution only, no advanced features

Dependency Impact:

  • No other runtime dependencies on Ruby
  • Go codebase only invokes Ruby binary via nsjail
  • No shared libraries or FFI dependencies
  • Mise tool supports Ruby 4.0.2 (confirmed available via mise-versions.jdx.dev)

Breaking Changes vs. Codebase Analysis

Breaking Change Impact on Sandbox Risk Level
Set API changes ❌ Not used None
CGI/SortedSet removal ❌ Not used None
Process creation via | ❌ Not used None
Ractor API changes ❌ Not used None
Binding API changes ❌ Not used None
Net::HTTP changes ❌ Not used None
Process::Status operators ❌ Not used None
*nil unpacking ❌ Not used None

Compatibility Verification:

  • All E2E test features (JSON, Math, require_relative, exception handling) remain fully compatible
  • Ruby stdlib features used in tests (json, math) are unaffected by breaking changes
  • Basic language features (classes, blocks, iterators, strings, regex) have no breaking changes

💡 Recommended Actions

Immediate Actions

  1. Merge PR: The update is safe to merge
  2. Run E2E Tests: Execute docker compose down && docker compose up --build -d && go test -tags e2e ./e2e/... to verify all Ruby tests pass with 4.0.2
  3. Monitor CI: Ensure all automated tests pass in CI/CD pipeline

Post-Merge Validation

  1. Verify Ruby runtime installation completes successfully via mise in Docker build
  2. Confirm all 16 Ruby E2E tests in e2e/tests/runtime/ruby.yml pass
  3. Validate security tests using Ruby runtime continue to work as expected

No Migration Required

  • No code changes needed in Go codebase
  • No changes needed in Ruby test files
  • No changes needed in nsjail configuration
  • No changes needed in resource limits

Optional Future Considerations

  • Monitor Ruby 4.0.x patch releases for additional bug fixes
  • Consider documenting supported Ruby version for users submitting code via API
  • Future: Evaluate ZJIT compiler when it reaches production stability (currently experimental)

🔗 Reference Links

Release Notes:

Documentation:

Bug Tracking:

Generated by koki-develop/claude-renovate-review

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.

0 participants