Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- os: 2025-vs2026
test_task: test-bundled-gems
- os: 11-arm
test_task: 'btest test-basic test-tool' # check and test-spec are broken yet.
test_task: check
target: arm64
fail-fast: false

Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ Ruby 4.0 bundled RubyGems and Bundler version 4. see the following links for det
* Building Ruby with MSVC now requires Visual Studio 2017 version 15.8
(`_MSC_VER` 1915) or later.

* Ruby built with MSVC now requires Windows 10 version 1809 (build 17763)
or Windows Server 2019 or later. Earlier Windows 10 releases and Windows
Server 2016 are no longer supported.

## Compatibility issues

* A class or module can now be modified only by the Ractor which created it,
Expand Down
34 changes: 0 additions & 34 deletions dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,13 @@ char *strchr(char*,char);

#define USE_NAME_ON_FS_REAL_BASENAME 1 /* platform dependent APIs to
* get real basenames */
#define USE_NAME_ON_FS_BY_FNMATCH 2 /* select the matching
* basename by fnmatch */

#ifdef HAVE_GETATTRLIST
# define USE_NAME_ON_FS USE_NAME_ON_FS_REAL_BASENAME
# define RUP32(size) ((size)+3/4)
# define SIZEUP32(type) RUP32(sizeof(type))
#elif defined _WIN32
# define USE_NAME_ON_FS USE_NAME_ON_FS_REAL_BASENAME
#elif defined DOSISH
# define USE_NAME_ON_FS USE_NAME_ON_FS_BY_FNMATCH
#else
# define USE_NAME_ON_FS 0
#endif
Expand Down Expand Up @@ -134,12 +130,6 @@ char *strchr(char*,char);
#ifdef _WIN32
# undef chdir
# define chdir(p) rb_w32_uchdir(p)
# undef mkdir
# define mkdir(p, m) rb_w32_umkdir((p), (m))
# undef rmdir
# define rmdir(p) rb_w32_urmdir(p)
# undef opendir
# define opendir(p) rb_w32_uopendir(p)
# define ruby_getcwd() rb_w32_ugetcwd(NULL, 0)
# define IS_WIN32 1
#else
Expand Down Expand Up @@ -2183,10 +2173,6 @@ has_magic(const char *p, const char *pend, int flags, rb_encoding *enc)
#ifdef _WIN32
case '.':
break;

case '~':
hasalpha = 1;
break;
#endif
default:
if (IS_WIN32 || ISALPHA(c)) {
Expand Down Expand Up @@ -3041,21 +3027,7 @@ glob_helper(
if (magical || recursive) {
rb_dirent_t *dp;
DIR *dirp;
# if USE_NAME_ON_FS == USE_NAME_ON_FS_BY_FNMATCH
char *plainname = 0;
# endif
IF_NORMALIZE_UTF8PATH(int norm_p);
# if USE_NAME_ON_FS == USE_NAME_ON_FS_BY_FNMATCH
if (cur + 1 == end && (*cur)->type <= ALPHA) {
plainname = join_path(path, pathlen, dirsep, (*cur)->str, strlen((*cur)->str));
if (!plainname) return -1;
dirp = do_opendir(fd, basename, plainname, flags, enc, funcs->error, arg, &status);
GLOB_FREE(plainname);
}
else
# else
;
# endif
dirp = do_opendir(fd, baselen, path, flags, enc, funcs->error, arg, &status);
if (dirp == NULL) {
# if FNM_SYSCASE || NORMALIZE_UTF8PATH
Expand Down Expand Up @@ -3193,12 +3165,6 @@ glob_helper(
*new_end++ = p->next;
break;
case ALPHA:
# if USE_NAME_ON_FS == USE_NAME_ON_FS_BY_FNMATCH
if (plainname) {
*new_end++ = p->next;
break;
}
# endif
case PLAIN:
case MAGICAL:
if (dirent_match(p->str, enc, name, dp, flags))
Expand Down
2 changes: 1 addition & 1 deletion doc/distribution/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ sh ../../ruby/configure -C --disable-install-doc --with-opt-dir=C:\Users\usernam

### Requirement

1. Windows 10/Windows Server 2016 or later.
1. Windows 10 version 1809 (build 17763)/Windows Server 2019 or later.

2. Visual C++ 14.15 (Visual Studio 2017 version 15.8) or later.

Expand Down
Loading