From 1d00e9b6fbebd055874110fc639cde07334e775a Mon Sep 17 00:00:00 2001 From: shinokaro Date: Tue, 16 Jul 2024 21:43:41 +0900 Subject: [PATCH] Move attempt_load_autoload call before post_env definition - Rearranged the order of operations to call attempt_load_autoload before defining post_env. This change ensures that all changes to the Ruby environment due to user script execution occur before the build process. --- bin/ocran | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/ocran b/bin/ocran index b91da61..20d94b5 100644 --- a/bin/ocran +++ b/bin/ocran @@ -204,15 +204,15 @@ module Ocran end def Ocran.build_exe - post_env = RuntimeEnvironment.save - - ENV.replace(@pre_env.env) - # If the script was run and autoload is enabled, attempt to autoload libraries. if @option.force_autoload? attempt_load_autoload(@ignore_modules) end + post_env = RuntimeEnvironment.save + + ENV.replace(@pre_env.env) + # Store the currently loaded files (before we require rbconfig for # our own use). features = $LOADED_FEATURES.map { |feature| Pathname(feature) }