def extensions(path_ext = ENV['PATHEXT'])
      return [''] unless path_ext
      path_ext.split(::File::PATH_SEPARATOR).select { |part| part.include?('.') }
    end
def extensions(path_ext = ENV['PATHEXT'])
      return [''] unless path_ext
      path_ext.split(::File::PATH_SEPARATOR).select { |part| part.include?('.') }
    end
All possible file extensions

 @example
   extensions('.exe;cmd;.bat')
   # => ['.exe','.bat']

 @param [String] path_ext
   a string of semicolon separated filename extensions

 @return [Array[String]]
   an array with valid file extensions

 @api private