91831 Commits

Author SHA1 Message Date
Peter Zhu
3487117e55 [ruby/mmtk] Fix object ID in rb_gc_impl_define_finalizer
The 0th element of the finalizer table array should be the object ID.

https://github.com/ruby/mmtk/commit/75e4a82652
2025-05-21 14:35:36 +00:00
Alan Wu
8f50bb7c24 JITs: Add back MACOSX_DEPLOYMENT_TARGET=11.0 setting to avoid warning
See: 41251fdd309d4ff8f699268e33c32a114257211e
2025-05-21 22:48:20 +09:00
Richard Böhme
9a41d76b83 Fix one-by-one error of numbered parameter ID 2025-05-21 22:12:34 +09:00
Hiroshi SHIBATA
081a44f586 Disabled TRAP cache of CodeQL again 2025-05-21 17:11:15 +09:00
Jean Boussier
0964593e5d Shrink sym_proc_cache by half
There is no need to store the symbol and the proc given the
proc has a reference to the symbol.

This makes the cache half as small, now fitting in an object
slot, but also make it easier to allow that cache to be
used by ractors, assuming we'd make `Symbol#to_proc`
return a shareable proc.
2025-05-21 09:29:27 +02:00
Stan Lo
c980cab155 [DOC] Add bundled gem doc links
- rake
- reline
- logger
- csv
- rexml
- racc
2025-05-21 16:08:42 +09:00
git
df66d2befb Update bundled gems list as of 2025-05-21 2025-05-21 07:03:43 +00:00
Luke Gruber
f6cbf499bc Fix Symbol#to_proc (rb_sym_to_proc) to be ractor safe
In non-main ractors, don't use `sym_proc_cache`. It is not thread-safe
to add to this array without a lock and also it leaks procs from one
ractor to another. Instead, we create a new proc each time. If this
results in poor performance we can come up with a solution later.

Fixes [Bug #21354]
2025-05-21 08:12:18 +02:00
Hiroshi SHIBATA
97e774b95d [rubygems/rubygems] Bump up to rack-3.1.15 that is removed dependency of CGI::Cookie
https://github.com/rubygems/rubygems/commit/cecc280f61
2025-05-21 11:33:33 +09:00
Nathan Ladd
3ac239f790 [rubygems/rubygems] Copy prerelease attribute to dependency resolver sets
https://github.com/rubygems/rubygems/commit/5956e7f8e5
2025-05-21 11:33:32 +09:00
Peter Zhu
27b0638386 [ruby/mmtk] Fix object ID for finalizers
We should get the object ID for finalizers in rb_gc_impl_define_finalizer
instead of when we create the finalizer job in make_final_job because
when we are in multi-Ractor mode, object ID needs to walk the references
which allocates an identity hash table. We cannot allocate in make_final_job
because it is in a MMTk worker thread.

https://github.com/ruby/mmtk/commit/922f22a690
2025-05-21 02:30:33 +00:00
Aaron Patterson
1c66124273 Make Addrinfo objects Ractor shareable
Allow Addrinfo objects to be shared among Ractors.  Addrinfo objects are
already immutable, so I think it's safe for us to tag them as
RUBY_TYPED_FROZEN_SHAREABLE shareable too.
2025-05-20 18:04:37 -07:00
Max Bernstein
b08e20d34a
ZJIT: Allow DCE to remove some CCalls (#13363)
Allow DCE to remove some CCalls

Add `elidable` field that signals that there would be no discernible
effect if the call to the method were removed. The default is false.
2025-05-20 15:41:37 -07:00
Peter Zhu
b043abc048 Only define RVALUE_OVERHEAD if undefined
This allows RVALUE_OVERHEAD to be defined elsewhere.
2025-05-20 12:57:23 -04:00
John Hawthorn
84bfcaa80d Add two more TSan suppressions 2025-05-20 09:56:31 -07:00
John Hawthorn
e7f97eb2f3 Use atomic load for signal buff size 2025-05-20 09:56:31 -07:00
John Hawthorn
05e0e7223a Use atomic load to read interrupt mask 2025-05-20 09:56:31 -07:00
Alan Wu
cd15cc250f ZJIT: Run make zjit-test under combo build with YJIT 2025-05-21 01:22:55 +09:00
Alan Wu
1fed568e3e ZJIT: Add --allow-multiple-definition for make zjit-test 2025-05-21 01:22:55 +09:00
Alan Wu
2297afda7f
Include stdbool.h without checking with autoconf
As reported in <https://bugs.ruby-lang.org/issues/21340>, older autoconf
have an AC_HEADER_STDBOOL that's incompatible with C23. Autoconf 2.72
fixed the macro, but also mentions that it's obsolescent since all
current compilers have this header.

Since we require C99 [1] and VS 2015 [2], we might actually be able take
that suggestion and include stdbool.h without a check. I want to try
this on rubyci.org and will revert if this cause any issues. Not
touching AC_HEADER_STDBOOL in configure.ac for now.

[1]: https://bugs.ruby-lang.org/issues/15347
[2]: https://bugs.ruby-lang.org/issues/19982
2025-05-20 15:58:32 +00:00
Alan Wu
ce5eb2803e YJIT: ZJIT: CI: Smoke test for --[y,z]jit-dump-disasm 2025-05-21 00:35:56 +09:00
Alan Wu
dfc0fe3679 Add jit.rs as dependency in Makefile 2025-05-21 00:35:56 +09:00
Nobuyoshi Nakada
bf082a37a9
CI: Check if runnable first, before set up directories 2025-05-20 22:27:51 +09:00
Nobuyoshi Nakada
d0a8f6baa7
[DOC] Fix call-seq of Dir.glob
`patterns` may be an array but not the rest argument.
2025-05-20 22:12:58 +09:00
Nobuyoshi Nakada
8dbff6e402
Silence error messages of cd to non-existent opt directories 2025-05-20 20:43:58 +09:00
Earlopain
a82e7132df Fix uplevel for cgi under bundler
Since there is `bundled_gems.rb` it is not always one. Fixes the following:
```sh
$ ruby -w -rbundler/inline -e "gemfile {}; require 'cgi'"
/home/earlopain/.rbenv/versions/ruby-dev/lib/ruby/3.5.0+0/bundled_gems.rb:59: warning: CGI library is removed from Ruby 3.5. Please use cgi/escape instead for CGI.escape and CGI.unescape features.
If you need to use the full features of CGI library, Please install cgi gem.
```

into:

```sh
$ ruby -w -rbundler/inline -e "gemfile {}; require 'cgi'"
-e:1: warning: CGI library is removed from Ruby 3.5. Please use cgi/escape instead for CGI.escape and CGI.unescape features.
If you need to use the full features of CGI library, Please install cgi gem.
```
2025-05-20 18:22:41 +09:00
git
bfe89c7a90 Update bundled gems list as of 2025-05-19 2025-05-20 07:03:43 +00:00
Daisuke Aritomo
edff523407 [DOC] Describe new return value of source_location
Proc#source_location, Method#source_location and
UnboundMethod#source_location carry more information since
073c4e1cc712064e626914fa4a5a8061f903a637.

https://bugs.ruby-lang.org/issues/6012
https://github.com/ruby/ruby/pull/12539
2025-05-20 15:51:42 +09:00
Jeremy Evans
c52f4eea56 Remove SortedSet autoload and set/sorted_set
Implements [Feature #21287]
2025-05-20 13:34:31 +09:00
Takashi Kokubun
a7ef9a44a6
ZJIT: Propagate disasm feature to ZJIT and YJIT (#13372)
Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
2025-05-19 10:34:29 -07:00
Nobuyoshi Nakada
93ce95d46c
[DOC] Fix indentation
RDoc markdown parser requires exact 4 spaces or tab as indentation.
2025-05-19 22:49:22 +09:00
Nobuyoshi Nakada
22c1201bba
[DOC] Fold long lines 2025-05-19 22:47:07 +09:00
Nobuyoshi Nakada
d84f20319c
[DOC] Escape dot in regexp 2025-05-19 22:41:56 +09:00
Jean Boussier
83d636f2d0 Free shapes last
[Bug #21352]

`rb_objspace_free_objects` may need to check objects shapes
to know how to free them.
2025-05-19 15:06:08 +02:00
Kazuhiro NISHIYAMA
40c957ba21
Fix a typo and capitalize a character 2025-05-19 13:27:50 +09:00
Jean Boussier
4759550967
[ruby/json] Remove some unnecessary top level constant lookups
https://github.com/ruby/json/commit/7c03ffc3e0
2025-05-19 11:19:17 +09:00
GrantBirki
e4a44b1f2a
[ruby/json] remove redundant self.
https://github.com/ruby/json/commit/c060943d04
2025-05-19 11:19:17 +09:00
GrantBirki
9b25023fe4
[ruby/json] use . over :: for consistency
https://github.com/ruby/json/commit/f5c1b8c45d
2025-05-19 11:19:17 +09:00
Grant Birkinbine
dc69bebde7
[ruby/json] Update json_encoding_test.rb
https://github.com/ruby/json/commit/0ac54a8161
2025-05-19 11:19:17 +09:00
Cody Horton
3468811ed1
[ruby/json] fix for pretty_generate throwing wrong number of arguments error
https://github.com/ruby/json/commit/8433571dcf
2025-05-19 11:19:17 +09:00
David Rodríguez
57e4176649
[rubygems/rubygems] Fix test warnings introduced by recent CGI changes
They read like this:

```
/home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/util.rb:13: warning: method redefined; discarding old rfc1123_date
/opt/hostedtoolcache/Ruby/3.4.3/x64/lib/ruby/3.4.0/cgi/util.rb:225: warning: previous definition of rfc1123_date was here
/home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/util.rb:34: warning: method redefined; discarding old pretty
/opt/hostedtoolcache/Ruby/3.4.3/x64/lib/ruby/3.4.0/cgi/util.rb:246: warning: previous definition of pretty was here
/home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/escape.rb:16: warning: method redefined; discarding old escape
/home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/escape.rb:29: warning: method redefined; discarding old unescape
/home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/util.rb:13: warning: method redefined; discarding old rfc1123_date
/opt/hostedtoolcache/Ruby/3.4.3/x64/lib/ruby/3.4.0/cgi/util.rb:225: warning: previous definition of rfc1123_date was here
/home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/util.rb:34: warning: method redefined; discarding old pretty
/opt/hostedtoolcache/Ruby/3.4.3/x64/lib/ruby/3.4.0/cgi/util.rb:246: warning: previous definition of pretty was here
/home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/escape.rb:16: warning: method redefined; discarding old escape
/home/runner/work/rubygems/rubygems/bundler/tmp/gems/base/ruby/3.4.0/gems/cgi-0.5.0.beta2/lib/cgi/escape.rb:29: warning: method redefined; discarding old unescape
```

The problem is that `rspec` loads `erb` for its configuration, which
loads `cgi/util` from system gems.

Then our tests change the `$LOAD_PATH` to make test gems installed in
tmp visible to `require`, and then they all require `cgi` as a
transitive dependency of `rack-test`, this time from `tmp` gems. This
causes system and test specific copies to be mixed together and these
warnings to be printed, but we have also observed failures in some tests
with errors like

> class variable @@accept_charset of CGI::Util is overtaken by CGI::Escape

This changes should also fix those failures.

The fix is to require all of `rack-test` (including `cgi`) before we
have changed the `$LOAD_PATH`. Because the `$LOAD_PATH` is unchanged,
RubyGems respects the version of `cgi` activated by RSpec, avoiding the
double loads.

https://github.com/rubygems/rubygems/commit/34e75465c6
2025-05-19 11:19:17 +09:00
David Rodríguez
0f867d97ab
Rename a couple of spec files
Generally are "realworld" specs are the ones using VCR cassettes of real
requests. These files don't use that, so I moved them to a different
place.
2025-05-19 11:19:17 +09:00
David Rodríguez
6e8be3a634 [rubygems/rubygems] Test JRuby 10
Necessary changes to get tests passing are:

* Rewrite one "out of memory" error spec to not define a subclass inside
  a RSpec context block. Due to some [JRuby issue], that's failing in
  JRuby 10, so I rewrote the test so that the Bundler process really
  goes OOM and that class definition is not necessary.
* JRuby 10, even if Ruby 3.4-compatible, has not yet adapted backtraces
  to include receivers, so our tests need an special case for JRuby when
  detecting a test method call inside backtraces.
* Warbler test is upgraded to use JRuby 10. Getting it to pass needs [a
  PR] to warbler, so our test is temporarily pointing to that PR.

[JRuby issue]: https://github.com/jruby/jruby/issues/8838
[a PR]: https://github.com/jruby/warbler/pull/557

https://github.com/rubygems/rubygems/commit/edec85d4c3
2025-05-19 11:15:33 +09:00
David Rodríguez
bfab76abe6 [rubygems/rubygems] Normalize platforms in warbler lockfile
https://github.com/rubygems/rubygems/commit/c7c50343bb
2025-05-19 11:15:31 +09:00
Vít Ondruch
0dfe427cba [rubygems/rubygems] Fix typo "shippped" => "shipped"
https://github.com/rubygems/rubygems/commit/1762d18d7b
2025-05-19 11:15:31 +09:00
David Rodríguez
aea603615f [rubygems/rubygems] Missing tweak
https://github.com/rubygems/rubygems/commit/407c1cbcfe
2025-05-19 11:15:30 +09:00
Samuel Giddins
4be199e435 [rubygems/rubygems] Simplify Gem::Platform#initialize
Based on PR feedback

Signed-off-by: Samuel Giddins <segiddins@segiddins.me>

https://github.com/rubygems/rubygems/commit/562d7aa087
2025-05-19 11:15:29 +09:00
Samuel Giddins
8f61e17556 [rubygems/rubygems] RuboCop
Signed-off-by: Samuel Giddins <segiddins@segiddins.me>

https://github.com/rubygems/rubygems/commit/768784910b
2025-05-19 11:15:29 +09:00
Samuel Giddins
eb48418b40 [rubygems/rubygems] Ensure that Gem::Platform parses strings to a fix point
The issue was that the property that

```ruby
platform = Gem::Platform.new $string
platform == Gem::Platform.new(platform.to_s)
```

was not always true.

This property (of acchieving a fix point) is important,
since `Gem::Platform` gets serialized to a string and
then deserialized back to a `Gem::Platform` object.
If it doesn't deserialize to the same object, then
different platforms are used for the initial serialization
than subsequent runs.

I used https://github.com/segiddins/Scratch/blob/main/2025/03/rubygems-platform.rb
to find the failing cases and then fixed them.
With this patch, the prop check test now passes.

https://github.com/rubygems/rubygems/commit/313fb4bcec
2025-05-19 11:15:28 +09:00
Hiroshi SHIBATA
72387ebd0e
Fix typos: misspell -w -error -source=text namespace.c 2025-05-19 09:46:03 +09:00