Age | Commit message (Collapse) | Author |
|
Saves the work of installing Rust for most jobs. Keep a job on each
platform that tests 1.85.0, the minimum supported version, though.
|
|
|
|
This tells RDoc to not automatically link to the `ZJIT` module so we
don't need to keep escaping the word ZJIT in the documentation/comments.
|
|
* ZJIT: Add --zjit-exec-mem-size
* Add a comment about the limit
|
|
Co-authored-by: Alexander Momchilov <alexander.momchilov@shopify.com>
|
|
|
|
Co-authored-by: Stan Lo <stan001212@gmail.com>
|
|
Co-authored-by: Max Bernstein <tekknolagi@gmail.com>
|
|
|
|
|
|
gc_config_set returned rb_gc_impl_config_get, but gc_config_get also added
the implementation key to the return value. This caused the return value
of GC.config to differ depending on whether the optional hash argument is
provided or not.
|
|
Add locations to struct `RNode_IN`.
memo:
```bash
> ruby -e 'case 1; in 2 then 3; end' --parser=prism --dump=parsetree
@ ProgramNode (location: (1,0)-(1,24))
+-- locals: []
+-- statements:
@ StatementsNode (location: (1,0)-(1,24))
+-- body: (length: 1)
+-- @ CaseMatchNode (location: (1,0)-(1,24))
+-- predicate:
| @ IntegerNode (location: (1,5)-(1,6))
| +-- IntegerBaseFlags: decimal
| +-- value: 1
+-- conditions: (length: 1)
| +-- @ InNode (location: (1,8)-(1,19))
| +-- pattern:
| | @ IntegerNode (location: (1,11)-(1,12))
| | +-- IntegerBaseFlags: decimal
| | +-- value: 2
| +-- statements:
| | @ StatementsNode (location: (1,18)-(1,19))
| | +-- body: (length: 1)
| | +-- @ IntegerNode (location: (1,18)-(1,19))
| | +-- IntegerBaseFlags: decimal
| | +-- value: 3
| +-- in_loc: (1,8)-(1,10) = "in"
| +-- then_loc: (1,13)-(1,17) = "then"
+-- else_clause: nil
+-- case_keyword_loc: (1,0)-(1,4) = "case"
+-- end_keyword_loc: (1,21)-(1,24) = "end"
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Because ruby/setup-ruby is affected to test result.
|
|
|
|
It is used in more steps than `sh`.
|
|
`echo off` affects the batch files called from this file as well.
|
|
|
|
|
|
In such case the pointer need to be casted.
|
|
https://github.com/ruby/stringio/commit/ac6292c17f
|
|
https://github.com/ruby/stringio/commit/29b9133332
|
|
https://github.com/ruby/stringio/commit/113dd5a55e
|
|
on null device
(https://github.com/ruby/stringio/pull/137)
Fixes segmentation fault when calling `seek` with `SEEK_END` on null
device StringIO created by
`StringIO.new(nil)`.
```bash
ruby -e "require 'stringio'; StringIO.new(nil).seek(0, IO::SEEK_END)"
```
I tested with below versions.
```bash
[koh@Kohs-MacBook-Pro] ~
% ruby -v;gem info stringio;sw_vers
ruby 3.4.5 (2025-07-16 revision https://github.com/ruby/stringio/commit/20cda200d3) +PRISM [arm64-darwin24]
*** LOCAL GEMS ***
stringio (3.1.2)
Authors: Nobu Nakada, Charles Oliver Nutter
Homepage: https://github.com/ruby/stringio
Licenses: Ruby, BSD-2-Clause
Installed at (default): /Users/koh/.local/share/mise/installs/ruby/3.4.5/lib/ruby/gems/3.4.0
Pseudo IO on String
ProductName: macOS
ProductVersion: 15.5
BuildVersion: 24F74
[koh@Kohs-MacBook-Pro] ~
%
```
https://github.com/ruby/stringio/commit/9399747bf9
|
|
|
|
doc currently indicates the return value as `new_array` but then in the first sentence explains "always returns +self+ (never a new array)".
|
|
Small fix for a typo in the regular expression docs. The line of code above this change does not produce the output shown in the docs. With this change the docs will show the correct output for this example of using regex quantifiers.
|
|
Previously, if GC was in progress when we're initially building the
id2ref table, it could see the empty table and then crash when trying to
remove ids from it. This commit fixes the bug by only publishing the
table after GC is done.
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
|
|
In rb_ractor_sched_wait() (ex: Ractor.receive), we acquire
RACTOR_LOCK(cr) and then thread_sched_lock(cur_th). However, on wakeup
if we're a dnt, in thread_sched_wait_running_turn() we acquire
thread_sched_lock(cur_th) after condvar wakeup and then RACTOR_LOCK(cr).
This lock inversion can cause a deadlock with rb_ractor_wakeup_all()
(ex: port.send(obj)), where we acquire RACTOR_LOCK(other_r) and then
thread_sched_lock(other_th).
So, the error happens:
nt 1: Ractor.receive
rb_ractor_sched_wait() after condvar wakeup in thread_sched_wait_running_turn():
- thread_sched_lock(cur_th) (condvar) # acquires lock
- rb_ractor_lock_self(cr) # deadlock here: tries to acquire, HANGS
nt 2: port.send
ractor_wakeup_all()
- RACTOR_LOCK(port_r) # acquires lock
- thread_sched_lock # tries to acquire, HANGS
To fix it, we now unlock the thread_sched_lock before acquiring the
ractor_lock in rb_ractor_sched_wait().
Script that reproduces issue:
```ruby
require "async"
class RactorWrapper
def initialize
@ractor = Ractor.new do
Ractor.recv # Ractor doesn't start until explicitly told to
# Do some calculations
fib = ->(x) { x < 2 ? 1 : fib.call(x - 1) + fib.call(x - 2) }
fib.call(20)
end
end
def take_async
@ractor.send(nil)
Thread.new { @ractor.value }.value
end
end
Async do |task|
10_000.times do |i|
task.async do
RactorWrapper.new.take_async
puts i
end
end
end
exit 0
```
Fixes [Bug #21398]
Co-authored-by: John Hawthorn <john.hawthorn@shopify.com>
|
|
rb_gc_impl_writebarrier_remember is not Ractor safe because it writes to
bitmaps and also pushes onto the mark stack during incremental marking.
We should acquire the VM lock to prevent race conditions.
In the case that the object is not old, there is no performance impact.
However, we can see a performance impact in this microbenchmark where the
object is old:
4.times.map do
Ractor.new do
ary = []
3.times { GC.start }
10_000_000.times do |i|
ary.push(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
ary.clear
end
end
end.map(&:value)
Before:
Time (mean ± σ): 682.4 ms ± 5.1 ms [User: 2564.8 ms, System: 16.0 ms]
After:
Time (mean ± σ): 5.522 s ± 0.096 s [User: 8.237 s, System: 7.931 s]
Co-Authored-By: Luke Gruber <luke.gruber@shopify.com>
Co-Authored-By: John Hawthorn <john@hawthorn.email>
|
|
These `...` ISEQs have a special calling convention in the interpreter
and our stubs and JIT calling convention don't deal well. Reject for now.
Debugged with help from `@tekknolagi` and `tool/zjit_bisect.rb`.
Merely avoiding direct sends is enough to pass the attached test, but also
avoid compiling ISEQs with `...` parameter to limit exposure for now.
`SendWithoutBlock`, which does dynamic dispatch using interpreter code,
seems to handle calling into forwardable ISEQs correctly, so they are
fine -- we can't predict where these dynamic sends land anyways.
|
|
|
|
This is moderately useful just in stdout (copy and paste into a renderer) but potentially more useful alongside a tool that parses stdout looking for `digraph G { ... }` and renders those automatically.
|
|
Otherwise dealing with garbage objects is tricky.
|
|
|
|
This reverts commit 8e9ea4c202fb104d7c17ad1f3cc59d697120501a.
The environment variable is converted internally.
|
|
|
|
|
|
|
|
|
|
|
|
This reverts commit 79d8a3159f60d32396c8281fe438e86ab97e3daa.
The second argument of `find_executable0` in mkmf is `path`, not
arguments to the program like as `EnvUtil.find_executable`.
|
|
https://github.com/ruby/optparse/commit/2f9c7500a3
|
|
Bumps [actions/cache](https://github.com/actions/cache) from 4.2.3 to 4.2.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/5a3ec84eff668545956fd18022155c47e93e2684...0400d5f644dc74513175e3cd8d07132dd4860809)
---
updated-dependencies:
- dependency-name: actions/cache
dependency-version: 4.2.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|