Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Dec 10, 2025

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 : )

rwstauner and others added 8 commits December 9, 2025 20:29
This adds comments to the hir dump output like this:

  v13:BasicObject = SendWithoutBlock v6, :test, v11 # SendFallbackReason: Complex argument passing
Previously, if an argument splat and keywords are provided by
the caller, it did not check whether the method/proc accepted
keywords before avoiding the allocation. This is incorrect,
because if the method/proc does not accept keywords, the
keywords passed by the caller are added as a positional
argument, so there must be an allocation to avoid mutating
the positional splat argument.

Add a check that if the caller passes keywords, the
method/proc must accept keywords in order to optimize.
If the caller passes a keyword splat, either the
method/proc must accept keywords, or the keyword splat must
be empty in order to optimize.

If keywords are explicitly disallowed via `**nil`, the
optimization should be skipped, because the array is mutated
before the ArgumentError exception is raised.

In addition to a test for the correct behavior, add an
allocation test for a method that accepts an anonymous splat
without keywords.

Fixes [Bug #21757]
Previously, this didn't work correctly, resulting in a
SystemStackError. This fixes the issue by finding the related
superclass method entry, and updating the orig_me in the
refinement method to point to the superclass method.

Fixes [Bug #21446]
With the following code:

```ruby
object = []
object.singleton_class
object.freeze
object.instance_variable_set(:@A, 42)
```

The previous error message was:

```
can't modify frozen #<Class:#<Array:0x00000631d1308f78>>: []
```

With this change, the error message is:

```
can't modify frozen Array: []
```

Since we show the inspect value of the affected object, I think
including the singleton class instead of the actual class if it
exists makes the error message harder to understand.
This provides information on the class of the frozen object. It also
results in a much simpler implementation.

Fixes [Bug #21374]
* ZJIT: Add dump to file for --zjit-stats

* ZJIT: Rename --zjit-stats=quiet to --zjit-stats-quiet
Fix typo in thread_pthread.c: threre -> there
As the markers for spec/mspec/tool/remove_old_guards.rb.
@pull pull bot locked and limited conversation to collaborators Dec 10, 2025
@pull pull bot added the ⤵️ pull label Dec 10, 2025
@pull pull bot merged commit f9eb0d8 into turkdevops:master Dec 10, 2025
1 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants