diff --git a/lib/ruby_installer/build/msys2_installation.rb b/lib/ruby_installer/build/msys2_installation.rb index 81c668222..f92ab2a1a 100644 --- a/lib/ruby_installer/build/msys2_installation.rb +++ b/lib/ruby_installer/build/msys2_installation.rb @@ -71,7 +71,7 @@ def iterate_msys_paths reg.each_key do |subkey| subreg = reg.open(subkey) begin - if subreg['DisplayName'] =~ /^MSYS2 / && File.directory?(il=subreg['InstallLocation']) + if subreg['DisplayName'] =~ /^MSYS2/ && File.directory?(il=subreg['InstallLocation']) yield il end rescue Encoding::InvalidByteSequenceError, Win32::Registry::Error