Age | Commit message (Collapse) | Author |
---|
| `dev_t` is already 64-bit in glibc, but on some platforms like Alpine Linux and Android NDK, `makedev` is defined as more than 32-bit ( promoting to `unsigned long long` then left-shifting by 32bit), while `dev_t` is still 32-bit. Notes: Merged: https://.com/ruby/ruby/pull/13607 |
| Since https://.com/ruby/ruby/commit/18a036a6133bd141dfc25cd48ced9a2b78826af6 building on alpine fails because usage of `__u32`, which is not portable. > file.c: In function 'rb_stat_new': > file.c:546:33: error: '__u32' undeclared (first use in this function) > # define CP_32(m) .stx_ ## m = (__u32)st->st_ ## m Notes: Merged: https://.com/ruby/ruby/pull/13562 |
| Notes: Merged: https://.com/ruby/ruby/pull/13474 |
| Notes: Merged-By: ioquatix <[email protected]> |
| wasi-libc 22 and later support realpath(3) (https://.com/WebAssembly/wasi-libc/pull/463) but the underlying host syscall may return ENOTSUP. This is typically the case when using incomplete WASI polyfills on web browsers. For such cases, we should fallback to the emulated realpath. Notes: Merged: https://.com/ruby/ruby/pull/13124 |
| Fixes: 2c6512fe67a275ce4d251f3c5d304bc523597f42 Notes: Merged: https://.com/ruby/ruby/pull/13032 |
| https://bugs.ruby-lang.org/issues/20971 Notes: Merged: https://.com/ruby/ruby/pull/12542 |
| Notes: Merged-By: tompng <[email protected]> |
| Notes: Merged: https://.com/ruby/ruby/pull/12496 |
| macOS 15.0 24A5331b seems to have a weird issue that `CFStringCreateWithBytesNoCopy` does not return `NSTaggedPointerString` instance for the first call. This issue is fixed in macOS 15.1 but we need to workaround it for macOS 15.0. Notes: Merged: https://.com/ruby/ruby/pull/11849 |
| Notes: Merged: https://.com/ruby/ruby/pull/11835 |
| This does not change any actual behaviour, but provides a choke point for blocking IO operations. * Update `IO::Buffer` to use `rb_io_blocking_region`. * Update `File` to use `rb_io_blocking_region`. * Update `IO` to use `rb_io_blocking_region`. Notes: Merged-By: ioquatix <[email protected]> |
| 8350b48cfa7d344d9e2dc9748c26607c1b89d7df introduced a memory bug. Will fix [Bug #20773] `loop { File.realpath("foo") }` caused memory . Notes: Merged: https://.com/ruby/ruby/pull/11736 |
| From duplicate code in `rb_CFString_class_initialize_before_fork` and `rb_str_append_normalized_ospath`. Notes: Merged: https://.com/ruby/ruby/pull/11695 |
| Notes: Merged: https://.com/ruby/ruby/pull/11690 |
| Do not release GVL around get{pwuid,pwnam,grgid,grnam} calls, as doing so is not thread-safe. Another C extension could have a concurrent call, and derefencing the returned pointer from these calls could result in a segfault. Have rb_home_dir_of call rb_getpwdirnam_for_login if available, so it can use getpwnam_r and release GVL in a thread-safe manner. This is related to GVL releasing work in [Bug #20587]. Notes: Merged: https://.com/ruby/ruby/pull/11202 |
| getlogin can return NULL, and this can avoid a segfault in that case. Mentioned as an issue in comment to bug 20586. Notes: Merged: https://.com/ruby/ruby/pull/11427 |
| As `__has_attribute` macro is always defined in internal/compilers.h, gcc warns `-Wunguarded-availability-new` as unknown option. Check if the warning option is usable instead. |
| * Release GVL for fdopendir calls * Release GVL for readdir calls * Release GVL for chdir call in dir_chdir0 * Release GVL for fchdir call in dir_fchdir * Release GVL for chroot calls * Release GVL for lstat calls * Release GVL for stat calls * Release GVL for fstatat calls * Release GVL for getpwnam call in rb_home_dir_of (technically in file.c, but called from dir.c) This does not release GVL for readdir/stat/lstat on Windows, as that causes issues because the emulation functions that are called in win32.c require the GVL. This also removes some explicit casts either to or from void *, which are allowed implicitly. The remaining casts to or from void * are part of function pointer casts, which are not allowed implicitly and will generate a warning. |
| |
| Signed-off-by: cui fliter <[email protected]> |
| |
| |
| |
| |
| [Feature #16495] |
| |
| File.expand_path s the dir if the encodings are not compatible. For example: Encoding.default_external = Encoding::UTF_16BE 10.times do 100_000.times do File.expand_path("./a") rescue end puts `ps -o rss= -p #{$$}` end Before: 12288 15488 18656 21872 25056 28240 31392 34688 37856 41056 After: 9680 9728 9728 9792 9792 9792 9792 9792 9792 |
| |
| |
| |
| Inside HTML is not markdown. |
| |
| |
| Method documentation must be placed immediately before each implementation, without any other functions or preprocessor directives. |
| They are very short lived and fit in a 160B slot. |
| Now the documentation that was already in the codebase for `File::Stat#directory?` shows up. |
| |
| |
| Notes: Merged-By: peterzhu2118 <[email protected]> |
| Notes: Merged: https://.com/ruby/ruby/pull/8296 |
| Notes: Merged: https://.com/ruby/ruby/pull/8213 |
| Updated output examples to current format since the output format has changed since version 2.2.0.dev https://.com/rubygems/rubygems/commit/48d98f906a |
| Notes: Merged-By: peterzhu2118 <[email protected]> |
| Notes: Merged: https://.com/ruby/ruby/pull/8050 |
| Notes: Merged-By: peterzhu2118 <[email protected]> |
| This retries the compatible parts of the previously reverted PR so we can continue to update related code without breaking backwards compatibility. Notes: Merged-By: ioquatix <[email protected]> |
| 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. |
| * Add rb_io_path and rb_io_open_descriptor. * Use rb_io_open_descriptor to create PTY objects * Rename FMODE_PREP -> FMODE_EXTERNAL and expose it FMODE_PREP I believe refers to the concept of a "pre-prepared" file, but FMODE_EXTERNAL is clearer about what the file descriptor represents and aligns with language in the IO::Buffer module. * Ensure that rb_io_open_descriptor closes the FD if it fails If FMODE_EXTERNAL is not set, then it's guaranteed that Ruby will be responsible for closing your file, eventually, if you pass it to rb_io_open_descriptor, even if it raises an exception. * Rename IS_EXTERNAL_FD -> RUBY_IO_EXTERNAL_P * Expose `rb_io_closed_p`. * Add `rb_io_mode` to get IO mode. --------- Co-authored-by: KJ Tsanaktsidis <[email protected]> Notes: Merged-By: ioquatix <[email protected]> |
| |