From f25523d4b27f27d8f322c47297b302a663ca78f3 Mon Sep 17 00:00:00 2001 From: Neel Shah Date: Mon, 23 Feb 2026 13:32:40 +0100 Subject: [PATCH] Fix CGI imports for ruby 4.x --- CHANGELOG.md | 1 + sentry-ruby/lib/sentry/baggage.rb | 2 +- sentry-ruby/lib/sentry/configuration.rb | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d934782f..c6e678bc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ ### Bug Fixes - Fix `MetricEvent` timestamp serialization to float ([#2862](https://github.com/getsentry/sentry-ruby/pull/2862)) +- Fix CGI imports for ruby 4.x ([#2863](https://github.com/getsentry/sentry-ruby/pull/2863)) ## 6.3.1 diff --git a/sentry-ruby/lib/sentry/baggage.rb b/sentry-ruby/lib/sentry/baggage.rb index dc02dd8e6..e849c7bcb 100644 --- a/sentry-ruby/lib/sentry/baggage.rb +++ b/sentry-ruby/lib/sentry/baggage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require "cgi" +require "cgi/escape" module Sentry # A {https://www.w3.org/TR/baggage W3C Baggage Header} implementation. diff --git a/sentry-ruby/lib/sentry/configuration.rb b/sentry-ruby/lib/sentry/configuration.rb index b09f8ad62..a3938c1ac 100644 --- a/sentry-ruby/lib/sentry/configuration.rb +++ b/sentry-ruby/lib/sentry/configuration.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +require "cgi/escape" require "concurrent/utility/processor_counter" require "sentry/utils/exception_cause_chain"