summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-11-07Update Ruby Box document, delete problems/discussions already resolvedSatoshi Tagomori
2025-11-07Apply renaming to Ruby::Box in test codesSatoshi Tagomori
2025-11-07Use RUBY_BOX environment variable instead of RUBY_NAMESPACESatoshi Tagomori
2025-11-07Re-rename files wrongly renamedSatoshi Tagomori
2025-11-07Rename Namespace to Ruby::BoxSatoshi Tagomori
2025-11-07Define ::Ruby module earlier to define classes under itSatoshi Tagomori
2025-11-07renaming internal data structures and functions from namespace to boxSatoshi Tagomori
2025-11-07update referenced filenames from namespace to boxSatoshi Tagomori
2025-11-07rename namespace.c (and others) to box.cSatoshi Tagomori
2025-11-07Add namespace tests about global variables, toplevel methodsSatoshi Tagomori
2025-11-06Use rb_set_memsize for constant cache tablesJohn Hawthorn
These were converted to a set in c0417bd094abcc68be913ce49a430df7cefbcd44
2025-11-06ZJIT: Remove obsolete register spill counters (#15089)Takashi Kokubun
2025-11-06ZJIT: Fix an incomplete comment (#15088)Takashi Kokubun
2025-11-06ns_subclasses refcount accesses need to be atomic (#15083)Luke Gruber
We were seeing errors like: ``` * thread #8, stop reason = EXC_BAD_ACCESS (code=1, address=0x803) * frame #0: 0x00000001001fe944 ruby`rb_st_lookup(tab=0x00000000000007fb, key=1, value=0x00000001305b7490) at st.c:1066:22 frame #1: 0x000000010002d658 ruby`remove_class_from_subclasses [inlined] class_get_subclasses_for_ns(tbl=0x00000000000007fb, ns_id=1) at class.c:604:9 frame #2: 0x000000010002d650 ruby`remove_class_from_subclasses(tbl=0x00000000000007fb, ns_id=1, klass=4754039232) at class.c:620:34 frame #3: 0x000000010002c8a8 ruby`rb_class_classext_free_subclasses(ext=0x000000011b5ce1d8, klass=4754039232, replacing=<unavailable>) at class.c:700:9 frame #4: 0x000000010002c760 ruby`rb_class_classext_free(klass=4754039232, ext=0x000000011b5ce1d8, is_prime=true) at class.c:105:5 frame #5: 0x00000001000e770c ruby`classext_free(ext=<unavailable>, is_prime=<unavailable>, namespace=<unavailable>, arg=<unavailable>) at gc.c:1231:5 [artificial] frame #6: 0x000000010002d178 ruby`rb_class_classext_foreach(klass=<unavailable>, func=(ruby`classext_free at gc.c:1228), arg=0x00000001305b75c0) at class.c:518:5 frame #7: 0x00000001000e745c ruby`rb_gc_obj_free(objspace=0x000000012500c400, obj=4754039232) at gc.c:1282:9 frame #8: 0x00000001000e70d4 ruby`gc_sweep_plane(objspace=0x000000012500c400, heap=<unavailable>, p=4754039232, bitset=4095, ctx=0x00000001305b76e8) at default.c:3482:21 frame #9: 0x00000001000e6e9c ruby`gc_sweep_page(objspace=0x000000012500c400, heap=0x000000012500c540, ctx=0x00000001305b76e8) at default.c:3567:13 frame #10: 0x00000001000e51d0 ruby`gc_sweep_step(objspace=0x000000012500c400, heap=0x000000012500c540) at default.c:3848:9 frame #11: 0x00000001000e1880 ruby`gc_continue [inlined] gc_sweep_continue(objspace=0x000000012500c400, sweep_heap=0x000000012500c540) at default.c:3931:13 frame #12: 0x00000001000e1754 ruby`gc_continue(objspace=0x000000012500c400, heap=0x000000012500c540) at default.c:2037:9 frame #13: 0x00000001000e10bc ruby`newobj_cache_miss [inlined] heap_prepare(objspace=0x000000012500c400, heap=0x000000012500c540) at default.c:2056:5 frame #14: 0x00000001000e1074 ruby`newobj_cache_miss [inlined] heap_next_free_page(objspace=0x000000012500c400, heap=0x000000012500c540) at default.c:2280:9 frame #15: 0x00000001000e106c ruby`newobj_cache_miss(objspace=0x000000012500c400, cache=0x0000600001b00300, heap_idx=2, vm_locked=false) at default.c:2387:38 frame #16: 0x00000001000e0d28 ruby`newobj_alloc(objspace=<unavailable>, cache=<unavailable>, heap_idx=<unavailable>, vm_locked=<unavailable>) at default.c:2411:15 [artificial] frame #17: 0x00000001000d7214 ruby`newobj_of [inlined] rb_gc_impl_new_obj(objspace_ptr=<unavailable>, cache_ptr=<unavailable>, klass=<unavailable>, flags=<unavailable>, wb_protected=<unavailable>, alloc_size=<unavailable>) at default.c:2490:15 frame #18: 0x00000001000d719c ruby`newobj_of(cr=<unavailable>, klass=4313971728, flags=258, wb_protected=<unavailable>, size=<unavailable>) at gc.c:995:17 frame #19: 0x00000001000d73ec ruby`rb_wb_protected_newobj_of(ec=<unavailable>, klass=<unavailable>, flags=<unavailable>, size=<unavailable>) at gc.c:1044:12 [artificial] frame #20: 0x0000000100032d34 ruby`class_alloc0(type=<unavailable>, klass=4313971728, namespaceable=<unavailable>) at class.c:803:5 ```
2025-11-06ZJIT: Untag block handler (#15085)Max Bernstein
Storing the tagged block handler in profiles is not GC-safe (nice catch, Kokubun). Store the untagged block handler instead. Fix bug in https://github.com/ruby/ruby/pull/15051
2025-11-06zjit-macos.yml: Unset MAKEFLAGS before ruby-bench (#15084)Takashi Kokubun
2025-11-06ZJIT: Restore dropped_bytes after temporary OOM (#15069)Takashi Kokubun
2025-11-06ZJIT: Use interpreter inline cache in setinstancevariable (#14925)Max Bernstein
We have both `SetIvar` and `SetInstanceVariable`. The former is a purely dynamic fallback that we can inline `attr_accessor`/`attr_writer` into, whereas the latter comes straight from the interpreter's `setinstancevariable` opcode.
2025-11-06Adjust OpenSSL specs for digest algorithm lookupKazuki Yamaguchi
https://github.com/ruby/openssl/pull/958 changed the common logic for digest algorithm lookup: - If the argument is neither an OpenSSL::Digest instance nor a String, it is now implicitly converted to String with #to_str. This is consistent with algorithm name lookup logic in ruby/openssl for pkeys and ciphers. - If the name is not recognized, OpenSSL::Digest::DigestError is raised instead of RuntimeError. Update the specs accordingly: - Remove specs that expect #to_str not to be called. - Relax regexps matching TypeError messages. - Expect OpenSSL::Digest::DigestError instead of RuntimeError for ruby/openssl 4.0.0 and later.
2025-11-06[ruby/openssl] pkey/rsa: fix usage of eRSAErrorKazuki Yamaguchi
This is a follow-up to commit https://github.com/ruby/openssl/commit/e74ff3e2722f, which missed the line added in a different PR. https://github.com/ruby/openssl/commit/1b01d19456
2025-11-06[ruby/openssl] pkey: unify error classes into PKeyErrorKazuki Yamaguchi
Remove the following subclasses of OpenSSL::PKey::PKeyError and make them aliases of it. - OpenSSL::PKey::DHError - OpenSSL::PKey::DSAError - OpenSSL::PKey::ECError - OpenSSL::PKey::RSAError Historically, methods defined on OpenSSL::PKey and OpenSSL::PKey::PKey raise OpenSSL::PKey::PKeyError, while methods on the subclasses raise their respective exception classes. However, this distinction is not particularly useful since all those exception classes represent the same kind of errors from the underlying EVP_PKEY API. I think this convention comes from the fact that OpenSSL::PKey::{DH, DSA,RSA} originally wrapped the corresponding OpenSSL structs DH, DSA, and RSA, before they were unified to wrap EVP_PKEY, way back in 2002. OpenSSL::PKey::EC::Group::Error and OpenSSL::PKey::EC::Point::Error are out of scope of this change, as they are not subclasses of OpenSSL::PKey::PKeyError and do not represent errors from the EVP_PKEY API. https://github.com/ruby/openssl/commit/e74ff3e272
2025-11-06[ruby/prism] Reject `def f a, (b) = 1`Earlopain
Fixes [#Bug 21660], followup to https://github.com/ruby/prism/pull/3674 https://github.com/ruby/prism/commit/fb445a49e5 Co-Authored-By: tomoya ishida <tomoyapenguin@gmail.com>
2025-11-06[ruby/openssl] cipher: use EVP_CIPHER_fetch() if availableKazuki Yamaguchi
Likewise, use EVP_MD_fetch() if it is available. This adds support for AES-GCM-SIV with OpenSSL 3.2 or later. https://github.com/ruby/openssl/commit/0e565a215e
2025-11-06[ruby/openssl] digest: use EVP_MD_fetch() if availableKazuki Yamaguchi
With the introduction of OpenSSL 3 providers, newly implemented algorithms do not necessarily have a corresponding NID assigned. To use such an algorithm, it has to be "fetched" from providers using the new EVP_*_fetch() functions. For digest algorithms, we have to use EVP_MD_fetch() instead of the existing EVP_get_digestbyname(). However, it is not a drop-in replacement because: - EVP_MD_fetch() does not support all algorithm name aliases recognized by EVP_get_digestbyname(). - Both return an EVP_MD, but the one returned by EVP_MD_fetch() is sometimes reference counted and the user has to explicitly release it with EVP_MD_free(). So, keep using EVP_get_digestbyname() for all OpenSSL versions for now, and fall back to EVP_MD_fetch() if it fails. In the latter case, prepare a T_DATA object to manage the fetched EVP_MD's lifetime. https://github.com/ruby/openssl/commit/9fc2179403
2025-11-06[ruby/openssl] cipher: raise CipherError for unsupported algorithm nameKazuki Yamaguchi
Raise OpenSSL::Cipher::CipherError instead of ArgumentError or RuntimeError for consistency. https://github.com/ruby/openssl/commit/78601c9c34
2025-11-06[ruby/openssl] digest: raise DigestError for unsupported algorithm nameKazuki Yamaguchi
We generally raise OpenSSL::OpenSSLError or its subclass for errors originating from the OpenSSL library, which may include extra details appended by ossl_raise(). https://github.com/ruby/openssl/commit/9427a05ce5
2025-11-06[ruby/openssl] digest: refactor tests for name aliasesKazuki Yamaguchi
Use explicit strings instead of relying on OpenSSL::ASN1::ObjectId methods. It is reduced to just SHA-256 because testing other algorithms does not improve test coverage for ruby/openssl. https://github.com/ruby/openssl/commit/dcfd2e7b97
2025-11-06[DOC] Stop documentation for internalsNobuyoshi Nakada
Stop documentation for undocumented private constants and private class methods. And align private method definition styles. Also `Socket.tcp_with_fast_fallback` looks private as well as `Socket.tcp_without_fast_fallback`.
2025-11-06Dispatch by platform at loadNobuyoshi Nakada
`RUBY_PLATFORM` should be invariant within the same process.
2025-11-05Remove dead rb_hash_dumpPeter Zhu
2025-11-05[DOC] Update glossary (#15070)Randy Stauner
2025-11-05ZJIT: Profile specific objects for invokeblock (#15051)Max Bernstein
I made a special kind of `ProfiledType` that looks at specific objects, not just their classes/shapes (https://github.com/ruby/ruby/pull/15051). Then I profiled some of our benchmarks. For lobsters: ``` Top-6 invokeblock handler (100.0% of total 1,064,155): megamorphic: 494,931 (46.5%) monomorphic_iseq: 337,171 (31.7%) polymorphic: 113,381 (10.7%) monomorphic_ifunc: 52,260 ( 4.9%) monomorphic_other: 38,970 ( 3.7%) no_profiles: 27,442 ( 2.6%) ``` For railsbench: ``` Top-6 invokeblock handler (100.0% of total 2,529,104): monomorphic_iseq: 834,452 (33.0%) megamorphic: 818,347 (32.4%) polymorphic: 632,273 (25.0%) monomorphic_ifunc: 224,243 ( 8.9%) monomorphic_other: 19,595 ( 0.8%) no_profiles: 194 ( 0.0%) ``` For shipit: ``` Top-6 invokeblock handler (100.0% of total 2,104,148): megamorphic: 1,269,889 (60.4%) polymorphic: 411,475 (19.6%) no_profiles: 173,367 ( 8.2%) monomorphic_other: 118,619 ( 5.6%) monomorphic_iseq: 84,891 ( 4.0%) monomorphic_ifunc: 45,907 ( 2.2%) ``` Seems like a monomorphic case for a specific ISEQ actually isn't a bad way of going about this, at least to start...
2025-11-05ZJIT: Don't side-exit on VM_CALL_KWARG just SendWithoutBlock (#15065)Randy Stauner
2025-11-05ZJIT: Add zjit_alloc_bytes and total_mem_bytes stats (#15059)Takashi Kokubun
2025-11-05ZJIT: Track guard shape exit ratio (#15052)Randy Stauner
new ZJIT stats excerpt from liquid-runtime: ``` vm_read_from_parent_iseq_local_count: 10,909,753 guard_type_count: 45,109,441 guard_type_exit_ratio: 4.3% guard_shape_count: 15,272,133 guard_shape_exit_ratio: 20.1% code_region_bytes: 3,899,392 ``` lobsters ``` guard_type_count: 71,765,580 guard_type_exit_ratio: 4.3% guard_shape_count: 21,872,560 guard_shape_exit_ratio: 8.0% ``` railsbench ``` guard_type_count: 117,661,124 guard_type_exit_ratio: 0.7% guard_shape_count: 28,032,665 guard_shape_exit_ratio: 5.1% ``` shipit ``` guard_type_count: 106,195,615 guard_type_exit_ratio: 3.5% guard_shape_count: 33,672,673 guard_shape_exit_ratio: 10.1% ```
2025-11-05Skip an unstable IO test for mswinTakashi Kokubun
https://github.com/ruby/ruby/actions/runs/19107764906/job/54596244201
2025-11-05Extend timeout for unstable testsTakashi Kokubun
https://github.com/ruby/ruby/actions/runs/19111531630/job/54609629054
2025-11-05[ruby/erb] Fix tag shown in example of ERB expression tag andSam Partington
execution tag (https://github.com/ruby/erb/pull/92) These were the wrong way around. https://github.com/ruby/erb/commit/50a5cd76fe
2025-11-05ZJIT: Run ruby-bench CI for macOS arm64 as well (#15040)Takashi Kokubun
2025-11-05Fix ractor move of object with generic ivars (#15056)Luke Gruber
This bug was happening only when the `id2ref` table exists. We need to replace the generic fields before replacing the object id of the newly moved object. Fixes [Bug #21664]
2025-11-05Update bundled gems list as of 2025-11-05git
2025-11-06Update power_assert to 3.0.1Kazuki Tsujimoto
2025-11-05Suppressing unused warningsHiroshi SHIBATA
2025-11-05[ruby/strscan] [DOC] no doc for internal methodsNobuyoshi Nakada
https://github.com/ruby/strscan/commit/5614095d9c
2025-11-05[ruby/strscan] Deprecate constant `Id`Nobuyoshi Nakada
`$Id$` is for RCS, CVS, and SVN; no information with GIT. https://github.com/ruby/strscan/commit/9e3db14fa2
2025-11-05[ruby/strscan] [DOC] Add document of StringScanner::ErrorNobuyoshi Nakada
https://github.com/ruby/strscan/commit/16ec901356
2025-11-05Use Ruby 3.4 for sync_default_gems.rbHiroshi SHIBATA
``` tool/sync_default_gems.rb:177:in `block in <module:SyncDefaultGems>': undefined local variable or method `it' for SyncDefaultGems:Module (NameError) it.exclude << "lib/open3/jruby_windows.rb" ^^ from <internal:kernel>:90:in `tap' from tool/sync_default_gems.rb:176:in `<module:SyncDefaultGems>' from tool/sync_default_gems.rb:10:in `<main>' ```
2025-11-05sync_default_gems.rb: gracefully handle merge commitsKazuki Yamaguchi
Find interesting commits by following parents instead of relying on "git log". If we encounter a merge commit that may contain a conflict resolution, fall back to cherry-picking the merge commit as a whole rather than replaying each individual commit. The sync commit will include a shortlog for the squashed commits in that case.
2025-11-05sync_default_gems.rb: update paths and then do cherry-pickKazuki Yamaguchi
Currently, we try to git cherry-pick the upstream commit and then resolve merge conflicts in the working tree with the help of Git's rename detection. By the nature of heuristics, it does not work reliably when the upstream adds or removes files. Instead, first prepare temporary commit objects with uninteresting files removed and file paths adjusted for ruby/ruby, and then cherry-pick it. The cherry-pick should succeed as long as the mapping rules are correct, the upstream does not contain a funny merge that strictly depends on merge order, and there are no local changes in ruby/ruby.
2025-11-05sync_default_gems.rb: use declarative mapping rulesKazuki Yamaguchi
No behavior change is intended by this change.