From 9733e246e402254c3d57af364bb2831109188678 Mon Sep 17 00:00:00 2001 From: Alex Woods Date: Fri, 9 Aug 2024 13:58:28 -0700 Subject: [PATCH] Add protection against autoload from alternative paths --- gems/aws-sdk-core/lib/aws-sdk-sso.rb | 3 +++ gems/aws-sdk-core/lib/aws-sdk-ssooidc.rb | 3 +++ gems/aws-sdk-core/lib/aws-sdk-sts.rb | 3 +++ 3 files changed, 9 insertions(+) diff --git a/gems/aws-sdk-core/lib/aws-sdk-sso.rb b/gems/aws-sdk-core/lib/aws-sdk-sso.rb index 44bfa75096b..9a85959bb8f 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-sso.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-sso.rb @@ -7,6 +7,9 @@ # # WARNING ABOUT GENERATED CODE +if Aws.autoload?(:SSO) + Aws.autoload(:SSO, __FILE__) +end unless Module.const_defined?(:Aws) require 'aws-sdk-core' diff --git a/gems/aws-sdk-core/lib/aws-sdk-ssooidc.rb b/gems/aws-sdk-core/lib/aws-sdk-ssooidc.rb index ce7caf5133e..492ccd6f1c1 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-ssooidc.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-ssooidc.rb @@ -7,6 +7,9 @@ # # WARNING ABOUT GENERATED CODE +if Aws.autoload?(:SSOOIDC) + Aws.autoload(:SSOOIDC, __FILE__) +end unless Module.const_defined?(:Aws) require 'aws-sdk-core' diff --git a/gems/aws-sdk-core/lib/aws-sdk-sts.rb b/gems/aws-sdk-core/lib/aws-sdk-sts.rb index fed837858c8..4af78db6143 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-sts.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-sts.rb @@ -7,6 +7,9 @@ # # WARNING ABOUT GENERATED CODE +if Aws.autoload?(:STS) + Aws.autoload(:STS, __FILE__) +end unless Module.const_defined?(:Aws) require 'aws-sdk-core'