summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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 ```
2025-12-11[ruby/timeout] Fix failing timeout testLuke Gruber
``` Run options: "--ruby=./miniruby -I../ruby/lib -I. -I.ext/common ../ruby/tool/runruby.rb --extout=.ext -- --disable-gems" --excludes-dir=../ruby/test/.excludes --name=!/memory_leak/ --seed=9843 [ 1/31] TestTimeout#test_timeout_in_trap_handler = 0.00 s 1) Error: TestTimeout#test_timeout_in_trap_handler: NoMethodError: undefined method 'kill' for nil /Users/luke/workspace/ruby-dev/ruby/test/test_timeout.rb:9:in 'TestTimeout#kill_timeout_thread' /Users/luke/workspace/ruby-dev/ruby/test/test_timeout.rb:424:in 'TestTimeout#test_timeout_in_trap_handler' Finished tests in 2.715032s, 11.4179 tests/s, 52.3014 assertions/s. 31 tests, 142 assertions, 0 failures, 1 errors, 0 skips ruby -v: ruby 4.0.0dev (2025-12-11T21:56:23Z fix_timeout_test https://github.com/ruby/timeout/commit/1c5eacbf9a) +PRISM [arm64-darwin24] make: *** [yes-test-all] Error 1 ``` https://github.com/ruby/timeout/commit/e5bc1de901
2025-12-11ZJIT: Check method visibility when optimizing sends (#15501)Max Bernstein
Fix https://github.com/Shopify/ruby/issues/874
2025-12-11[ruby/timeout] Add windows to CI matrixJean Boussier
https://github.com/ruby/timeout/commit/c8d63ce3fe
2025-12-11auto_request_review.yml: Update path for jit related docsAlan Wu
2025-12-11ZJIT: s/checking possible to build ZJIT/checking prerequisites for ZJIT/Alan Wu
Reads better to me: > checking prerequisites for ZJIT... yes
2025-12-11ZJIT: [DOC] Mention build prerequisitesAlan Wu
2025-12-11Tune AS_CASE indentation style and remove `[*]` for default caseAlan Wu
There are many indentation styles for AS_CASE in this file but no one uses `[*]` for the default case.
2025-12-11[ruby/timeout] Skip signal test on windowsJean Boussier
Windows has no SIGUSR1. There might be another usable signal, but this is breaking ruby master so I just want a quick fix for now. https://github.com/ruby/timeout/commit/b19043e8d0
2025-12-11Stop bumping RUBY_PATCHLEVEL in release versions (#15502)Takashi Kokubun
[[Misc #21770]](https://bugs.ruby-lang.org/issues/21770)
2025-12-11Add assumption to free_vm_weak_referencesJohn Hawthorn
Help the compiler know that we always get a heap object here.
2025-12-11Speed up class allocator searchJohn Hawthorn
This rewrites the class allocator search to be faster. Instead of using RCLASS_SUPER, which is now even slower due to Box, we can scan the superclasses list to find a class where the allocator is defined. This also disallows allocating from an ICLASS. Previously I believe that was only done for FrozenCore, and that was changed in e596cf6e93dbf121e197cccfec8a69902e00eda3.
2025-12-11Assume result from allocator will be validJohn Hawthorn
This adds a fastpath in class_call_alloc_func to simply return if the class matches the one expected. I think we could probably just remove this check, or move it to the debug build.
2025-12-12Fix Set#^ to not mutate its argument (#15296)Gil Desmarais
* test(set): add test Set#xor does not mutate other_set * Fix Set#^ to not mutate its argument
2025-12-11[ruby/json] Revert "Skip test failing with JRuby in CI"Étienne Barrié
This reverts commit https://github.com/ruby/json/commit/b7e1734d9ca0. https://github.com/ruby/json/commit/5793694ee6
2025-12-11[ruby/psych] bump snakeyaml-engine to 2.10 (jruby)kares
https://github.com/ruby/psych/commit/506bf75ab2
2025-12-11Fix typo in Fiber.[] docsBenoit Daloze
2025-12-11[ruby/timeout] Make Timeout.timeout work in a trap handler on CRubyBenoit Daloze
* Fixes https://github.com/ruby/timeout/issues/17 https://github.com/ruby/timeout/commit/1a499a8f96
2025-12-11[ruby/timeout] Encapsulate adding a timeout RequestBenoit Daloze
https://github.com/ruby/timeout/commit/cb2ba88fed
2025-12-11[ruby/timeout] Revise Timeout.timeout docs and add a section about `ensure`Benoit Daloze
https://github.com/ruby/timeout/commit/7cfa5a6778
2025-12-11[ruby/timeout] Reset the interrupt mask when creating the Timeout threadBenoit Daloze
* Add tests related to Thread.handle_interrupt * Fixes https://github.com/ruby/timeout/issues/41 https://github.com/ruby/timeout/commit/a52720e82a
2025-12-11Append found lib/<file> entries to spec.files to support out-of-place buildsHiroshi SHIBATA
2025-12-11Update default gems list at 6b469b7e40f94f25b50463de2190d5 [ci skip]git
2025-12-11[ruby/json] Release 2.18.0Jean Boussier
https://github.com/ruby/json/commit/1cdd2122d5
2025-12-11[ruby/json] Add `allow_control_characters` parsing optionJean Boussier
While it's not allowed by the spec, some parsers like Oj do accept it, and it can be blocking a transition. Having this feature can help people migrate. https://github.com/ruby/json/commit/3459499cb3
2025-12-11[Bug #19558] Allow ASCII range to mix with Unicode dumpNobuyoshi Nakada
2025-12-11[Misc #21690] Sync parser_bits.h from internal/bits.hNobuyoshi Nakada
2025-12-11[Bug #21712] Allow `.()` call for command with blockyui-knk
This commit allows codes like `a b do end.()` and `a b do end&.()`.
2025-12-11This change didn't fix the original issue.Hiroshi SHIBATA
Revert "Use base: with Dir.glob for bundler.gemspec" This reverts commit 87f0701b6106569a8486c9623dc6b0b32438355c.
2025-12-11[DOC] Update NEWS for `*selectors` arguments added to `String#strip` etc.Shugo Maeda
2025-12-11Use base: with Dir.glob for bundler.gemspecHiroshi SHIBATA
2025-12-11Allow String#strip etc. to take optional character selectorsShugo Maeda
[Feature #21552] Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11Remove an excess closing bracketNobuyoshi Nakada
2025-12-10ZJIT: Re-compile ISEQs invalidated by PatchPoint (#15459)Takashi Kokubun
2025-12-10GC_DEBUG_STRESS_TO_CLASS should only be for debugJohn Hawthorn
I believe this was accidentally left in as part of 2beb3798bac52624c3170138f8ef65869f1da6c0
2025-12-10Update Ractor warning messageJohn Hawthorn
Although the Ractor API is still experimental and may change, and there may be some implementation issues, we should no longer say that there are many. Hopefully we can remove this warning entirely for Ruby 4.1
2025-12-10ZJIT: Don't fold LoadField with negative offsets and use byte_addAlan Wu
No point doing the manual size unit conversion for add. Sorry, no new tests since there is no way to generate a LoadField with a negative offset from ruby code AFAICT. Careful with the `as` casts.
2025-12-10JITs: Drop cargo and use just rustc for release combo buildAlan Wu
So we don't expose builders to network flakiness which cannot be worked around using cargo's --offline flag.
2025-12-10JITs: Move cargo-specific variables into conditionalAlan Wu
2025-12-10ZJIT: For rustc build, remove cargo touch(1) workaroundAlan Wu
2025-12-10YJIT: For rustc build, remove cargo touch(1) workaroundAlan Wu
2025-12-10ZJIT: Remove unused includes from zjit.cAlan Wu
2025-12-10ZJIT: Fold LoadField on frozen objects to constants (#15483)Tobias Lütke
* ZJIT: Fold LoadField on frozen objects to constants When accessing instance variables from frozen objects via attr_reader/ attr_accessor, fold the LoadField instruction to a constant at compile time. This enables further optimizations like constant propagation. - Add fold_getinstancevariable_frozen optimization in Function::optimize - Check if receiver type has a known ruby_object() that is frozen - Read the field value at compile time and replace with Const instruction - Add 10 unit tests covering various value types (fixnum, string, symbol, nil, true/false) and negative cases (unfrozen, dynamic receiver) * Run zjit-test-update * Add a test that we don't fold non-BasicObject * Small cleanups --------- Co-authored-by: Max Bernstein <ruby@bernsteinbear.com> Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2025-12-10Remove object_id in NEWOBJ tracepoint testJean Boussier
Generating an object_id for any type other than T_OBJECT (and T_CLASS) will inevitably allocate an IMEMO/fields objects, which isn't supported in a NEWOBJ tracepoint. See: https://bugs.ruby-lang.org/issues/21710#note-23
2025-12-10ZJIT: Use inline format args (#15482)Alex Rocha
2025-12-10ubuntu.yml: Add a ruby-bench job without ZJIT (#15480)Takashi Kokubun
2025-12-10Always treat encoding as TYPEDDATAJohn Hawthorn
Encodings are RTypedData, not the deprecated RData. Although the structures are compatible we should use the correct API.
2025-12-10ZJIT: Exclude failing ruby-bench benchmarks (#15479)Takashi Kokubun
2025-12-10ZJIT: Check if shape is too complex before reading ivar by index (#15478)Max Bernstein
This fixes a crash when the new shape after a transition is too complex; we need to check that it's not complex before trying to read by index.
2025-12-10Fix typos in comment of rb_current_execution_context()Benoit Daloze