96581 Commits

Author SHA1 Message Date
Benoit Daloze
bf36ad9c12 ZJIT: remove unused rb_RSTRUCT_LEN() 2026-01-12 08:44:26 +01:00
Benoit Daloze
916c0a8105 ZJIT: remove unused rb_RSTRUCT_SET() 2026-01-12 08:44:26 +01:00
Nobuyoshi Nakada
d57c3296a9
Re-fix VCS::GIT#branch_beginning
Count the last release date from the whole working directory, not
only the version headers.
2026-01-12 11:28:06 +09:00
Peter Zhu
61c372a1b7 [DOC] Improve docs for ObjectSpace.count_symbols 2026-01-11 10:46:56 -05:00
Peter Zhu
1267a3ab56 [DOC] Improve docs for ObjectSpace.count_imemo_objects 2026-01-11 10:46:56 -05:00
Peter Zhu
cf5c5abe1e [DOC] Improve docs for ObjectSpace.count_tdata_objects 2026-01-11 10:46:56 -05:00
Nobuyoshi Nakada
8baaece6d9
[ruby/prism] [Bug #21831] Fix denominator of rational float literal
Denominators can contain underscores in fraction part as well as other
numeric literals.

[Bug #21831]: https://bugs.ruby-lang.org/issues/21831

https://github.com/ruby/prism/commit/e247cb58c7
2026-01-11 22:53:12 +09:00
Chris Hasiński
a071078e90 pack.c: remove wasted allocation in BER integer packing
The 'w' format (BER compressed integer) was allocating an empty
string with rb_str_new(0, 0) then immediately overwriting it with
the correctly-sized allocation. Remove the wasted first allocation.

~50% improvement on BER pack benchmarks.
2026-01-11 21:42:37 +09:00
Heath Dutton🕴️
3363861a5a Remove RUBY_API_VERSION check in cxxanyargs.hpp
The version check used undefined macros, causing -Wundef warnings.
The conditional is no longer needed as Ruby is past version 3.1.
2026-01-11 21:06:51 +09:00
Jean Boussier
73be9992e9 Disambiguate private and public RSTRUCT_ helpers
RSTRUCT_LEN / RSTRUCT_GET / RSTRUCT_SET all existing in two
versions, one public that does type and frozens checks
and one private that doesn't.

The problem is that this is error prone because the public version
is always accessible, but the private one require to include
`internal/struct.h`. So you may have some code that rely on the
public version, and later on the private header is included and
changes the behavior.

This already led to introducing a bug in YJIT & ZJIT:
https://github.com/ruby/ruby/pull/15835
2026-01-11 13:03:03 +01:00
Nobuyoshi Nakada
6a630d992e
Push the commits to the origin at make matz [ci skip] 2026-01-11 17:09:40 +09:00
Nobuyoshi Nakada
463a806fb1
Fix VCS::GIT#branch_beginning to search since the last relase
The ChangeLog in ruby-4.0.0 did not contain entries for 3.5.0.
2026-01-11 15:12:58 +09:00
Nobuyoshi Nakada
acd0c68a07
Relax the flaky test threshold on RHEL 10.0 x86_64 2026-01-11 14:51:49 +09:00
Peter Zhu
0d4538b57d [DOC] Improve docs for Module#>= 2026-01-10 09:31:35 -05:00
Peter Zhu
f0f4a683b4 [DOC] Improve docs for Module#<= 2026-01-10 09:31:35 -05:00
Peter Zhu
0b83346f1c [DOC] Improve docs for Module#< 2026-01-10 09:31:35 -05:00
Peter Zhu
98c414a678 [DOC] Improve docs for Module#> 2026-01-10 09:31:35 -05:00
Jun Aruga
0b69f7fa34 [ruby/openssl] Fix test_cipher.rb in FIPS.
https://github.com/ruby/openssl/commit/11bd2efb2a
2026-01-10 07:20:55 +00:00
Peter Zhu
c3f6fcc4c5 Skip ObjectSpaceTest#test_count_nodes for RBS 2026-01-09 18:05:43 -05:00
Peter Zhu
e8c61f5139 Remove ObjectSpace.count_nodes
ObjectSpace.count_nodes has been a no-op and returning an empty hash since
Ruby 2.5 because parser nodes are not GC managed.
2026-01-09 18:05:43 -05:00
BurdetteLamar
ef488bff98 [DOC] Doc for Enumerator.new 2026-01-09 18:05:33 -05:00
BurdetteLamar
77cad87dc1 [DOC] Doc for Enumerator class 2026-01-09 17:36:32 -05:00
Burdette Lamar
3d242a82a3
[DOC] Harmonize #> methods 2026-01-09 17:36:26 -05:00
Max Bernstein
e08f316f28
YJIT: Add frozen guard for struct aset (#15835)
We used to just skip this check (oops), but we should not allow
modifying frozen objects.
2026-01-09 14:25:48 -05:00
Jean Boussier
51ab7b0405 YJIT: gen_struct_aset check for frozen status 2026-01-09 17:31:10 +01:00
Peter Zhu
7379b9ed78 Optimize rb_mark_generic_ivar for T_DATA and T_STRUCT
T_DATA and T_STRUCT could have ivars but might not use the generic_fields_tbl.
This commit skips lookup in the generic_fields_tbl for those cases.
2026-01-09 17:31:10 +01:00
Nobuyoshi Nakada
c794a97940 Rename alloca_overflow to stack_overflow
`alloca` is an implementation detail to raise a stack overflow.
2026-01-09 20:02:54 +09:00
Nobuyoshi Nakada
e01e13c239
Use assert_ruby_status if no assertion 2026-01-09 17:16:22 +09:00
Nobuyoshi Nakada
fc0c67deb2
Make assert_separately to count assertions in forked processes 2026-01-09 17:16:22 +09:00
Nobuyoshi Nakada
364e25b1c3
Make assert_separately tolerant to core method redefinitions
And split `TestRubyOptimization#test_objtostring` for each target
class.
2026-01-09 16:06:13 +09:00
Jörmungandrk
3185786874 Fix integer overflow checks in enumerator 2026-01-09 15:04:05 +09:00
Nobuyoshi Nakada
b61e18d76b
Win32: configure without an intermediate makefile
This batch file used `nmake` on the old `command.com` to extract the
parent directory name of this file and to get around the command line
argument length limit.  However, Windows 9X support as a build host
ended over a decade ago, and this file now utilizes the functionality
of `cmd.exe` already.
2026-01-09 11:36:46 +09:00
Peter Zhu
e89db8567c [ruby/mmtk] Assert that objects are not T_NONE in the write barrier
https://github.com/ruby/mmtk/commit/59d27203e2
2026-01-09 01:33:41 +00:00
Peter Zhu
aa7eb97d06 [ruby/mmtk] Add MMTK_ASSERT
https://github.com/ruby/mmtk/commit/e34d5cf32f
2026-01-09 01:33:41 +00:00
Earlopain
b3216bc1e1 Fix Ripper::Lexer::State#[] for to_s
The instance variable is called `to_s`, not `event`.
2026-01-09 09:33:16 +09:00
Stan Lo
50b719115a
Remove ruby-bench excludes (#15828)
These benchmarks should be working fine now.
2026-01-08 23:07:50 +00:00
Peter Zhu
c6f9a4d393 Remove check for rb_obj_gen_fields_p in rb_hash_dup
rb_copy_generic_ivar already checks for it, so we don't need to call
rb_obj_gen_fields_p twice.
2026-01-08 17:33:32 -05:00
Max Bernstein
523857bfcb
ZJIT: Replace GuardShape with LoadField+GuardBitEquals (#15821)
GuardShape is just load+guard, so use the existing HIR instructions for load+guard. Probably makes future analysis slightly easier.
2026-01-08 19:57:55 +00:00
Earlopain
16863f2ec1 [ruby/prism] Decouple ripper translator from ripper library
Ripper exposes Ripper::Lexer:State in its output, which is a bit of a problem. To make this work, I basically copy-pasted the implementation.

I'm unsure if that is acceptable and added a test to make sure that these values never go out of sync.
I don't imagine them changing often, prism maps them 1:1 for its own usage.

This also fixed the shim by accident. `Ripper.lex` went to `Translation::Ripper.lex` when it should have been the original. Removing the need for the original resolves that issue.

https://github.com/ruby/prism/commit/2c0bea076d
2026-01-08 18:35:26 +00:00
Earlopain
fc66de3e6b [ruby/prism] Remove unneeded ripper requires
Ripper is either not used or loaded where it is actually needed

https://github.com/ruby/prism/commit/a73a4fb00c
2026-01-08 18:35:25 +00:00
Earlopain
3bfc86558b [ruby/prism] Move LexRipper into its own file
It has a hard dependency on ripper that can't be removed.
This makes it so that ripper can be loaded only when the class is actually used.

https://github.com/ruby/prism/commit/3b5b4a8a6d
2026-01-08 18:35:25 +00:00
git
dcfbbdc38c Update bundled gems list as of 2026-01-08 2026-01-08 09:48:38 +00:00
Hiroshi SHIBATA
19d3f2da66 Skip collection install test 2026-01-08 18:48:00 +09:00
Hiroshi SHIBATA
eaa9902ca7 Exclude ruby-lsp benchmark because released version of rbs didn't have tsort dependency 2026-01-08 18:48:00 +09:00
Hiroshi SHIBATA
4a988b7f48 Inject tsort path before rdoc 2026-01-08 18:48:00 +09:00
Hiroshi SHIBATA
9c49084a20 Update tsort entries under the doc 2026-01-08 18:48:00 +09:00
Hiroshi SHIBATA
9580c7d07b Migrate tsort as bundled gems 2026-01-08 18:48:00 +09:00
Nobuyoshi Nakada
946b1c1ba1
Move parentheses around macro arguments 2026-01-08 13:41:07 +09:00
Nobuyoshi Nakada
1852ef4377
Fail if the Ruby specified with --with-baseruby is too old
If the baseruby is explicitly specified, fail because the option is
not accepted if it does not meet the requirements.  If the option is
not specified, just display the warning and continue, in the hope that
it is not needed.

Follow up GH-15809
2026-01-08 13:30:47 +09:00
Nobuyoshi Nakada
725e3d0aa7
Fluent and/or is supported by Prism too now 2026-01-08 13:29:23 +09:00