diff --git a/spec/datadog/di/code_tracker_spec.rb b/spec/datadog/di/code_tracker_spec.rb index 4be51712101..3b1c95f8ebc 100644 --- a/spec/datadog/di/code_tracker_spec.rb +++ b/spec/datadog/di/code_tracker_spec.rb @@ -27,7 +27,7 @@ load File.join(File.dirname(__FILE__), "code_tracker_test_class_1.rb") expect(tracker.send(:registry).length).to eq(1) - path = tracker.send(:registry).each.to_a.first.first + path = tracker.send(:registry).to_a.dig(0, 0) # The path in the registry should be absolute. expect(path[0]).to eq "/" # The full path is dependent on the environment/system