From aa995e5168fee67c2700025fbfcedadad14b2f28 Mon Sep 17 00:00:00 2001 From: TonyCTHsu Date: Sun, 24 Nov 2024 22:20:33 +0100 Subject: [PATCH] Merge pull request #4156 from DataDog/psych-fix-real psych fix attempt #3 --- spec/datadog/core/environment/execution_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/datadog/core/environment/execution_spec.rb b/spec/datadog/core/environment/execution_spec.rb index 9169eb4ae4b..b48dc3dab0d 100644 --- a/spec/datadog/core/environment/execution_spec.rb +++ b/spec/datadog/core/environment/execution_spec.rb @@ -169,6 +169,15 @@ def test_it_does_something_useful let(:script) do <<-'RUBY' + # Under Ruby 3.0 through 3.2 there is a weird error that occurs + # in CI where two copies of psych get loaded in the same process, + # and even more strangely the first version is a newer one from + # gem and the second one is the older one from Ruby standard + # library. Try to work around this situation by forcing psych + # to be loaded from (some) gem. + # We still don't know exactly what is causing the original issue. + gem 'psych' + require 'bundler/inline' gemfile(true) do