[pull] master from ruby:master#1215
Merged
Merged
Conversation
This adds the following predicate methods to IPAddr objects: * `#multicast?`: whether the ip address is multicast * `#link_local_multicast?`: whether the ip address is a link-local multicast it also alias `IPAddr#link_local?` as `IPAddr#link_local_unicast?`, which is more accurate (whether the original should be deprecated is probably a separate discussion). ruby/ipaddr@332ae1ffbf
This flag is now entirely redundant with the shape_id layout bits.
Return a new Range with its begin and end clamped to given bounds, either as `clamp(min, max)` or `clamp(range)`.
(ruby/erb#123) The example was updated to assign the ERB instance to `erb` instead of `template`, but the following line still called `template.src`. Since `template` is a String there, the example raises NoMethodError. ruby/erb@fbe832ac5c Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Makes methods look more like `Array#[]` than just `[]`. Also use a thunk instead of allocating the string all the time.
Numerous codepath have the same `switch/case` with very little differing logic compared to `rb_obj_fields`, might as well use it everywhere and share more code.
We only have one `Send` HIR opcode now. Let's not count everything separately.
A couple of things to fix, notably that we relied on the stream returning strings and relied on it not lying about how much was being written. Now we no longer trust either and we verify instead. ruby/prism@70147e5b44 Co-authored-by: Sutou Kouhei <kou@clear-code.com>
It's basrely used.
It's barely used.
``` $ ips --ruby 'ruby-dev --yjit' --ruby 'ruby-master --yjit' -e 'Time.at(1_700_000_000, in: 0)' ruby 4.1.0dev (2026-07-15T17:09:20Z master 6cd755d) +YJIT +PRISM [arm64-darwin25] Time.at(1_700_000_000, in: 0): 8.920M i/s (± 2.0%, GC 3.3%) ruby 4.1.0dev (2026-07-15T17:09:20Z master 6cd755d) +YJIT +PRISM [arm64-darwin25] Time.at(1_700_000_000, in: 0): 5.894M i/s (± 0.5%, GC 4.2%) Summary ruby ruby-dev --yjit ran 1.51 ± 0.03 times faster than ruby ruby-master --yjit ``` Other callers of zone_localtime use maybe_tzobj_p to short circuit the utc_to_local respond_to?/call, but this one didn't.
``` $ ips --ruby 'ruby-maybe --yjit' --ruby 'ruby-dev --yjit' -e 'Time.at(1_700_000_000, in: 0)' ruby 4.1.0dev (2026-07-15T17:09:20Z master 6cd755d) +YJIT +PRISM [arm64-darwin25] Time.at(1_700_000_000, in: 0): 8.944M i/s (± 0.7%, GC 3.2%) ruby 4.1.0dev (2026-07-15T17:09:20Z master 6cd755d) +YJIT +PRISM [arm64-darwin25] Time.at(1_700_000_000, in: 0): 10.925M i/s (± 0.9%, GC 4.0%) Summary ruby ruby-dev --yjit ran 1.22 ± 0.01 times faster than ruby ruby-maybe --yjit ``` utc_offset_arg checks whether its argument can be to_str'd, which Integer's (should) not be, so we can fast path it to speed it up
Previously we needed to check every object to determine whether or not it might have an entry in the geniv table. This commit adds a function, rb_gc_vm_weak_table_essential_p, which allows gc.c to decide which tables to always handle in batch. MMTK will continue to call rb_gc_vm_weak_table_foreach on all tables. This only changes the default GC to sweep the "essential" tables first, but continue to call rb_gc_obj_free_vm_weak_references on other objects. This makes the geniv table "essental", as it's usually small and needs to be tested on every type of object. It leaves the fstring table, symbol table, callinfo table, and overloaded CME table as-is because those tables are (mostly) larger and are only needed by specific object types.
For T_DATA objects which use declarative marking or have a NULL dmark function, we can avoid taking the VM lock to iterate their children. This is probably most significant for objects like Time.
For consistency.
to skip remote connection tests.
When an object is moved to another Ractor with `Ractor.send(obj, move: true)`, the moved-out source is neutralized into a RactorMovedObject husk by move_leave. The husk stays in the object's original, possibly larger, slot, but its shape was reset to 0, losing the capacity. Shape 0 implies the smallest slot, so the husk ended up with rb_obj_shape_slot_size(husk) != rb_gc_obj_slot_size(husk). Since re-embeddable T_OBJECT fields landed, compaction requires every live object to satisfy rb_gc_obj_slot_size == rb_obj_shape_slot_size (asserted in gc_ref_update_object under RGENGC_CHECK_MODE). A GC.compact in the receiving Ractor walks the husk and trips the assertion; in a release build it updates references with a mismatched slot width and can corrupt the slot. Give the husk an empty, frozen, RObject-layout shape while preserving its SHAPE_ID_CAPACITY_MASK, so the slot size still matches and no field is exposed. Co-Authored-By: Jean Boussier <jean.boussier@gmail.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Moving an unshareable object graph with duplicate references failed to preserve aliasing because the traversal checked the `rec` table too late. On a move path, `move_leave` replaces the original object with a `Ractor::MovedObject` tombstone. Because `move_enter` classifies this tombstone as shareable, the second visit returned `traverse_skip` before the visited `rec` lookup was reached. Fix this by performing the `st_lookup` on `data->rec` at the top of `obj_traverse_replace_i`, before calling `enter_func`. We guard the lookup with a NULL check on `data->rec` to avoid allocating `rec_hash` for simple graphs.
Some fast_fallback tests inject an artificial delay to test timing-sensitive behavior. Under CI's parallel test execution, threadscheduling jitter can make the delay longer than expected, and in that case these tests may fail to connect to the server process they are actually supposed to connect to. For example: 1. The IPv6 name resolution is artificially delayed by 25ms, so the IPv4 name resolution succeeds first. 2. If the IPv6 name resolution succeeds within 25ms, the client starts connecting to the `::1` server process and the test passes. However, if the IPv6 name resolution is delayed by more than 50ms for some reason, fast_fallback starts connecting to `127.0.0.1` instead, by design. 3. If another test happens to have a server listening on `127.0.0.1` with the same port number, the connection accidentally succeeds. 4. The `::1` server process is left waiting, and the thread cleanup hangs. To address this, the listening server process now receives the result of `accept` through a local variable instead of `Thread#value`. On success, it joins the thread with a short timeout; otherwise, it terminates the thread with `Thread#kill.join`. This change is expected to prevent hangs even when such a wrong connection occurs.
The Windows CE port was removed long ago and no supported toolchain defines `_WIN32_WCE`.
Windows NT for Alpha was discontinued before Windows 2000 and no MSVC that satisfies the required `_MSC_VER >= 1900` targets Alpha. Since b5ecfd1 the inline file for `-generic-` had lost its own terminator and swallowed the whole `-alpha-` rule up to its `<<`, feeding an `#error` line to the preprocessor whose failure was silently discarded by the `findstr` pipe. Removing the block also restores that `<<` as the terminator of the `-generic-` inline file.
win32/Makefile.sub already errors on `_MSC_VER < 1900`, but setup.mak only rejected pre-VC8 compilers and let 1400..1899 pass silently. Fail at the setup pass with the actual minimum.
The `sh` architecture existed only for the Windows CE port.
GCC removed the `-mno-cygwin` option in the 4.x series, so any GCC recent enough to build Ruby rejects it and the dllwrap path for `--disable-shared` builds fails with it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )