Skip to content

Upgrade to ruby 3.4#1583

Open
tyranja wants to merge 2 commits intomainfrom
upgrade-ruby-3.4
Open

Upgrade to ruby 3.4#1583
tyranja wants to merge 2 commits intomainfrom
upgrade-ruby-3.4

Conversation

@tyranja
Copy link
Copy Markdown
Member

@tyranja tyranja commented Apr 12, 2026

Upgrade to ruby 3.4

Breaking Changes

  • it is now a reserved keyword inside blocks (implicit first parameter like _1). Any code using it as a
    local variable in a block will silently change behavior or break.
  • Promoted gems must be explicit in Gemfile — base64, bigdecimal, csv, drb, logger, mutex_m, ostruct,
    fiddle are no longer auto-available. You'll get LoadError if they're used without an explicit Gemfile
    entry.
  • Error message format changed — single quotes instead of backticks, class name prefixed (e.g.
    'String#foo'). Any test assertions matching exception message strings may fail.
  • Hash#inspect output changed — {user: 1} instead of {:user=>1}. Affects tests comparing inspect output.
  • Default parser switched to Prism — slightly different error messages and edge-case parsing behavior.

Deprecation Warnings (future breaking changes)

  • Frozen string literal mutations will warn. Files without # frozen_string_literal: true that mutate
    strings will emit deprecation warnings. Run tests with -W:deprecated to surface these.

Removed APIs

  • Several Net::HTTP constants removed
  • Refinement#refined_class removed
  • Several C API functions removed (affects native gems — check gem compatibility)

Recommended steps

  1. Search codebase for it used as a local variable inside blocks
  2. Add base64, bigdecimal, csv, logger, ostruct to Gemfile if used
  3. Run test suite with -W:deprecated to catch frozen string literal issues
  4. Check gem compatibility with Ruby 3.4 (especially any with native extensions)
  5. Review any tests that assert on exception message strings

bullet changes: ⏺ The problem: in development, profile_image_link always returns avatar.png (early return on line 23-25) without ever accessing profile.image, so Bullet correctly flags the preloading as unused. But in production the preloading IS needed to avoid N+1.

tyranja added 2 commits April 12, 2026 19:56
ullet changes: ⏺ The problem: in development, profile_image_link always returns avatar.png (early return on line 23-25)  without ever accessing profile.image, so Bullet correctly flags the preloading as unused. But in production the preloading IS needed to avoid N+1.
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