summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-12-13ZJIT: Nil-fill locals in direct send (#15536)Randy Stauner
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\"]">.
2025-12-12ZJIT: Don't inline non-parameter localsRandy Stauner
2025-12-12ZJIT: Allow ccalls above 7 arguments (#15312)Aiden Fox Ivey
ZJIT: Add stack support for CCalls
2025-12-12Cache filesystem_encindexJohn Hawthorn
2025-12-12Store Encoding#name as an attributeJohn Hawthorn
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.
2025-12-12YJIT: Add missing local variable type update for fallback setlocal blocksAlan Wu
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.
2025-12-12Fewer calls to `GET_EC()` and `GET_THREAD()` (#15506)Luke Gruber
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.
2025-12-12Prevent ifunc procs from being made shareableÉtienne Barrié
[Bug #21775]
2025-12-12move th->event_serial to rb_thread_sched_item (#15500)Luke Gruber
2025-12-12Array#rfindKevin Newton
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]
2025-12-12ZJIT: Only optimize `[]` and `[]=` for exact Hash, not Hash subclassesStan Lo
2025-12-12ZJIT: Inline `Hash#[]=`Stan Lo
2025-12-12ZJIT: Add Shape type to HIR (#15528)Max Bernstein
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>
2025-12-12[ruby/prism] Fixed Prism::Translation::RubyParser's comment processingRyan Davis
Tests were failing in Flay under Prism. https://github.com/ruby/prism/commit/af9b3640a8
2025-12-13Fix binding.implicit_parameters_get/defined segfault when wrong name string ↵tomoya ishida
is passed (#15530)
2025-12-12Update NEWS about `Binding#implicit_parameters`, etc.Yusuke Endoh
[Bug #21049]
2025-12-12Add docs to Binding#numbered_parameters, etc.Yusuke Endoh
2025-12-12Binding#implicit_parameters, etc. support the implicit "it" parameterYusuke Endoh
[Bug #21049]
2025-12-12Add Binding#implicit_parameters, etc.Yusuke Endoh
This changeset introduces: * `Binding#implicit_parameters` * `Binding#implicit_parameter_get` * `Binding#implicit_parameter_defined?` [Bug #21049]
2025-12-12Simplify the codeKoichi Sasada
`thread_sched_to_waiting_common0` is no longer needed.
2025-12-12Avoid race condition in `test_without_handle_interrupt_signal_works`. (#15504)Samuel Williams
2025-12-12thead_sync.c: directly pass the execution context to yieldJean Boussier
Saves one more call to GET_EC()
2025-12-12Define Thread::ConditionVariable in thread_sync.rbJean Boussier
It's more consistent with Mutex, but also the `#wait` method benefits from receiving the execution context instead of having to call `GET_EC`.
2025-12-12Bump actions/cache from 4.3.0 to 5.0.0dependabot[bot]
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>
2025-12-12Bump actions/cache in /.github/actions/setup/directoriesdependabot[bot]
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>
2025-12-12[ruby/timeout] Restore original signal handler in test_timeout_in_trap_handlerBenoit Daloze
https://github.com/ruby/timeout/commit/4ae8631acf
2025-12-12Update bundled gems list as of 2025-12-12git
2025-12-12use `ractor_sched_lock`Koichi Sasada
instead of using `rb_native_mutex_lock` directly.
2025-12-12Binding#local_variable_defined? raises a NameError for numbered params.Yusuke Endoh
[Bug #21776]
2025-12-12Win32: Make `rb_w32_osid` return Windows NT alwaysNobuyoshi Nakada
Since support for Windows 9x was dropped over a decade ago.
2025-12-12Win32: Deprecate Windows version info APINobuyoshi Nakada
`dwMajorVersion` alone has no meaning since Windows 7. Use API in VersionHelper.h instead.
2025-12-12Win32: Remove the workaround for console reading bugNobuyoshi Nakada
It has been fixed at Windows 8, and we already have dropped the support Windows 8 and olders.
2025-12-12`Binding#local_variable_defined?` must not handle numbered parametersYusuke Endoh
[Bug #21776]
2025-12-11release.yml: Fix tag conversion for Ruby 4.0Takashi Kokubun
and PREVIOUS_RELEASE_TAG for any .0 releases
2025-12-11tool/format-release: Fix a wrong method referenceTakashi Kokubun
2025-12-11tool/format-release: Carve out the version format logicTakashi Kokubun
to share it with tool/releng/update-www-meta.rb and another place I'm going to modify next.
2025-12-11make-snapshot: Fix Psych::DisallowedClass with newer psychTakashi Kokubun
``` $ 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>' ```
2025-12-12ZJIT: Don't specialize calls with kwsplat (#15513)Randy Stauner
2025-12-11make-snapshot: Update the tag format for Ruby 4.0+ (#15514)Takashi Kokubun
2025-12-11make-snapshot: Remove an unnecessary variableTakashi Kokubun
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.
2025-12-11make-snapshot: Branch if it's X.Y.Z or X.Y using whenTakashi Kokubun
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.
2025-12-11make-snapshot: Make preview/rc match stricterTakashi Kokubun
to make it a bit more consistent with the other branch
2025-12-11make-snapshot: Drop X.Y.Z-pN supportTakashi Kokubun
We no longer make patchlevel releases.
2025-12-11update-www-meta.rb: Update the tag format for Ruby 4.0+Takashi Kokubun
Just copied format-release fixes in a973526c050fec044ffd7ceeba0ac8e8a1fed299 to this file.
2025-12-11tool/merger.rb: Support the new format in remove_tagTakashi Kokubun
2025-12-12monitor.c: skip GET_EC() on exitJean Boussier
2025-12-11tool/format-release: Fix the tag format for Ruby 4.0+Takashi Kokubun
2025-12-11tool/merger.rb: Update the tag format for Ruby 4.0+Takashi Kokubun
2025-12-11test_ractor.rb: old object while calling _id2refJean Boussier
2025-12-11Mutex: avoid repeated calls to `GET_EC`Jean Boussier
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 ```