diff options
author | NARUSE, Yui <[email protected]> | 2023-06-01 08:43:22 +0900 |
---|---|---|
committer | NARUSE, Yui <[email protected]> | 2023-06-01 08:43:22 +0900 |
commit | 85dcc4866d9ff29834596e9186cc97d622ee06f8 (patch) | |
tree | d5daa60146c5c8c2de9a9459a05e6e771d934362 /win32/win32.c | |
parent | e4163112f6b99d9c205f6bc260878dcb00954a13 (diff) |
Revert "Hide most of the implementation of `struct rb_io`. (#6511)"
This reverts commit 18e55fc1e1ec20e8f3166e3059e76c885fc9f8f2.
fix [Bug #19704]
https://bugs.ruby-lang.org/issues/19704
This breaks compatibility for extension libraries. Such changes
need a discussion.
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c index c2d12a79f4..ec65f5383b 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -8269,7 +8269,10 @@ w32_io_info(VALUE *file, w32_io_info_t *st) tmp = rb_check_convert_type_with_id(*file, T_FILE, "IO", idTo_io); if (!NIL_P(tmp)) { - f = (HANDLE)rb_w32_get_osfhandle(rb_io_descriptor(tmp)); + rb_io_t *fptr; + + GetOpenFile(tmp, fptr); + f = (HANDLE)rb_w32_get_osfhandle(fptr->fd); if (f == (HANDLE)-1) return INVALID_HANDLE_VALUE; } else { |