diff --git a/lib/ruby_installer/build/msys2_installation.rb b/lib/ruby_installer/build/msys2_installation.rb index 0bc75843..bc4efedd 100644 --- a/lib/ruby_installer/build/msys2_installation.rb +++ b/lib/ruby_installer/build/msys2_installation.rb @@ -77,7 +77,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