| Age | Commit message (Collapse) | Author |
|
Avoid garbage reads from locals in eval.
Before the fix the test fails with
<"[\"x\", \"x\", \"x\", \"x\"]"> expected but was
<"[\"x\", \"x\", \"x\", \"x286326928\"]">.
|
|
|
|
ZJIT: Add stack support for CCalls
|
|
|
|
When debugging the fstring table, I found "UTF-8" to be the most common
interned strings in many benchmarks.
We have a fixed, limited number of these strings, so we might as well permanently
cache their fstrings.
|
|
Previously, the chain_depth>0 version of setlocal blocks did not
update the type of the local variable in the context. This can leave
the context with stale type information and trigger panics like in
[Bug #21772] or lead to miscompilation.
To trigger the issue, YJIT needs to see the same ISEQ before and after
environment escape and have tracked type info before the escape. To
trigger in ISEQs that do not send with a block, it probably requires
Kernel#binding or the use of include/ruby/debug.h APIs.
|
|
The changes are to `io.c` and `thread.c`.
I changed the API of 2 exported thread functions from `internal/thread.h` that
didn't look like they had any use in C extensions:
* rb_thread_wait_for_single_fd
* rb_thread_io_wait
I didn't change the following exported internal function because it's
used in C extensions:
* rb_thread_fd_select
I added a comment to note that this function, although internal, is used
in C extensions.
|
|
[Bug #21775]
|
|
|
|
Implement Array#rfind, which is the same as find except from the
other side of the Array. Also implemented Array#find (as opposed to
the generic one on Enumerable because it is significantly faster
and to keep the implementations together.
[Feature #21678]
|
|
|
|
|
|
It's just a nicety (they fit fine as CUInt32) but this makes printing
look nicer in real execution and also in tests (helps with #15489).
Co-authored-by: Randy Stauner <randy@r4s6.net>
|
|
Tests were failing in Flay under Prism.
https://github.com/ruby/prism/commit/af9b3640a8
|
|
is passed (#15530)
|
|
[Bug #21049]
|
|
|
|
[Bug #21049]
|
|
This changeset introduces:
* `Binding#implicit_parameters`
* `Binding#implicit_parameter_get`
* `Binding#implicit_parameter_defined?`
[Bug #21049]
|
|
`thread_sched_to_waiting_common0` is no longer needed.
|
|
|
|
Saves one more call to GET_EC()
|
|
It's more consistent with Mutex, but also the `#wait` method
benefits from receiving the execution context instead of having
to call `GET_EC`.
|
|
Bumps [actions/cache](https://github.com/actions/cache) from 4.3.0 to 5.0.0.
- [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/0057852bfaa89a56745cba8c7296529d2fc39830...a7833574556fa59680c1b7cb190c1735db73ebf0)
---
updated-dependencies:
- dependency-name: actions/cache
dependency-version: 5.0.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
Bumps [actions/cache](https://github.com/actions/cache) from 4.3.0 to 5.0.0.
- [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/0057852bfaa89a56745cba8c7296529d2fc39830...a7833574556fa59680c1b7cb190c1735db73ebf0)
---
updated-dependencies:
- dependency-name: actions/cache
dependency-version: 5.0.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
https://github.com/ruby/timeout/commit/4ae8631acf
|
|
|
|
instead of using `rb_native_mutex_lock` directly.
|
|
[Bug #21776]
|
|
Since support for Windows 9x was dropped over a decade ago.
|
|
`dwMajorVersion` alone has no meaning since Windows 7. Use API in
VersionHelper.h instead.
|
|
It has been fixed at Windows 8, and we already have dropped the
support Windows 8 and olders.
|
|
[Bug #21776]
|
|
and PREVIOUS_RELEASE_TAG for any .0 releases
|
|
|
|
to share it with tool/releng/update-www-meta.rb and another place I'm
going to modify next.
|
|
```
$ tool/format-release ../www.ruby-lang.org 4.0.0-preview2 .
/opt/rubies/3.4.6/lib/ruby/3.4.0/psych/class_loader.rb:99:in 'Psych::ClassLoader::Restricted#find': Tried to load unspecified class: Date (Psych::DisallowedClass)
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/class_loader.rb:28:in 'Psych::ClassLoader#load'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/class_loader.rb:40:in 'Psych::ClassLoader#date'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/scalar_scanner.rb:65:in 'Psych::ScalarScanner#tokenize'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:65:in 'Psych::Visitors::ToRuby#deserialize'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:129:in 'Psych::Visitors::ToRuby#visit_Psych_Nodes_Scalar'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:30:in 'Psych::Visitors::Visitor#visit'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:6:in 'Psych::Visitors::Visitor#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:35:in 'Psych::Visitors::ToRuby#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:346:in 'block in Psych::Visitors::ToRuby#revive_hash'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:344:in 'Array#each'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:344:in 'Enumerable#each_slice'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:344:in 'Psych::Visitors::ToRuby#revive_hash'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:168:in 'Psych::Visitors::ToRuby#visit_Psych_Nodes_Mapping'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:30:in 'Psych::Visitors::Visitor#visit'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:6:in 'Psych::Visitors::Visitor#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:35:in 'Psych::Visitors::ToRuby#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:339:in 'block in Psych::Visitors::ToRuby#register_empty'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:339:in 'Array#each'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:339:in 'Psych::Visitors::ToRuby#register_empty'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:147:in 'Psych::Visitors::ToRuby#visit_Psych_Nodes_Sequence'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:30:in 'Psych::Visitors::Visitor#visit'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:6:in 'Psych::Visitors::Visitor#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:35:in 'Psych::Visitors::ToRuby#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:319:in 'Psych::Visitors::ToRuby#visit_Psych_Nodes_Document'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:30:in 'Psych::Visitors::Visitor#visit'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:6:in 'Psych::Visitors::Visitor#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:35:in 'Psych::Visitors::ToRuby#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych.rb:336:in 'Psych.safe_load'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych.rb:371:in 'Psych.load'
from tool/format-release:80:in 'Tarball.parse'
from tool/format-release:269:in 'Object#main'
from tool/format-release:272:in '<main>'
```
|
|
|
|
|
|
This is a refactoring change, which should have no impact on behaviors.
Now, if patchlevel is true, tag is empty. So `if patchlevel` always does
nothing. Given that prerelease is false and tag is not nil, removing
`if patchlevel` should have no impact.
|
|
It just seems like a completely different input, so it makes more sense
to me to have it as a separate case.
Also, we don't need to support Ruby 2.0 or older.
|
|
to make it a bit more consistent with the other branch
|
|
We no longer make patchlevel releases.
|
|
Just copied format-release fixes in
a973526c050fec044ffd7ceeba0ac8e8a1fed299 to this file.
|
|
|
|
|
|
|
|
|
|
|
|
That call is surprisingly expensive, so trying doing it once
in `#synchronize` and then passing the EC to lock and unlock
saves quite a few cycles.
Before:
```
ruby 4.0.0dev (2025-12-10T09:30:18Z master c5608ab4d7) +YJIT +PRISM [arm64-darwin25]
Warming up --------------------------------------
Mutex 1.888M i/100ms
Monitor 1.633M i/100ms
Calculating -------------------------------------
Mutex 22.610M (± 0.2%) i/s (44.23 ns/i) - 113.258M in 5.009097s
Monitor 19.148M (± 0.3%) i/s (52.22 ns/i) - 96.366M in 5.032755s
```
After:
```
ruby 4.0.0dev (2025-12-10T10:40:07Z speedup-mutex 1c901cd4f8) +YJIT +PRISM [arm64-darwin25]
Warming up --------------------------------------
Mutex 2.095M i/100ms
Monitor 1.578M i/100ms
Calculating -------------------------------------
Mutex 24.456M (± 0.4%) i/s (40.89 ns/i) - 123.584M in 5.053418s
Monitor 19.176M (± 0.1%) i/s (52.15 ns/i) - 96.243M in 5.018977s
```
Bench:
```
require 'bundler/inline'
gemfile do
gem "benchmark-ips"
end
mutex = Mutex.new
require "monitor"
monitor = Monitor.new
Benchmark.ips do |x|
x.report("Mutex") { mutex.synchronize { } }
x.report("Monitor") { monitor.synchronize { } }
end
```
|