From 57910b3e43af6769a048e8972dd3ba149f106545 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 03:53:55 +0000 Subject: [PATCH 1/3] Bump taiki-e/install-action Bumps the github-actions group with 1 update in the / directory: [taiki-e/install-action](https://github.com/taiki-e/install-action). Updates `taiki-e/install-action` from 2.79.11 to 2.81.1 - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/taiki-e/install-action/compare/13608cbb45b01feb47ef444ab1a42dc41ad56f1a...e49978b799e49ff429d162b7a30601a569ab6538) --- updated-dependencies: - dependency-name: taiki-e/install-action dependency-version: 2.81.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/zjit-macos.yml | 2 +- .github/workflows/zjit-ubuntu.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/zjit-macos.yml b/.github/workflows/zjit-macos.yml index f9282d64e84b0a..e68bd897fd55d2 100644 --- a/.github/workflows/zjit-macos.yml +++ b/.github/workflows/zjit-macos.yml @@ -93,7 +93,7 @@ jobs: rustup install ${{ matrix.rust_version }} --profile minimal rustup default ${{ matrix.rust_version }} - - uses: taiki-e/install-action@13608cbb45b01feb47ef444ab1a42dc41ad56f1a # v2.79.11 + - uses: taiki-e/install-action@e49978b799e49ff429d162b7a30601a569ab6538 # v2.81.1 with: tool: nextest@0.9 if: ${{ matrix.test_task == 'zjit-check' }} diff --git a/.github/workflows/zjit-ubuntu.yml b/.github/workflows/zjit-ubuntu.yml index 1e7bec38599911..8d146b7bdc8cf5 100644 --- a/.github/workflows/zjit-ubuntu.yml +++ b/.github/workflows/zjit-ubuntu.yml @@ -119,7 +119,7 @@ jobs: ruby-version: '3.1' bundler: none - - uses: taiki-e/install-action@13608cbb45b01feb47ef444ab1a42dc41ad56f1a # v2.79.11 + - uses: taiki-e/install-action@e49978b799e49ff429d162b7a30601a569ab6538 # v2.81.1 with: tool: nextest@0.9 if: ${{ matrix.test_task == 'zjit-check' }} From 7225c7952edfbb0e6cc6777667cd59c3286dd082 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Sun, 31 May 2026 21:28:33 +0900 Subject: [PATCH 2/3] Make hash_replace_ref to evaluate rb_gc_location once In hash_replace_ref, it currently evaluates rb_gc_location twice for the key and value. We can reduce that to once each. --- gc/gc.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gc/gc.h b/gc/gc.h index ea8056c6716f08..d147a3122a853a 100644 --- a/gc/gc.h +++ b/gc/gc.h @@ -219,12 +219,14 @@ hash_foreach_replace(st_data_t key, st_data_t value, st_data_t argp, int error) static int hash_replace_ref(st_data_t *key, st_data_t *value, st_data_t argp, int existing) { - if (rb_gc_location((VALUE)*key) != (VALUE)*key) { - *key = rb_gc_location((VALUE)*key); + VALUE new_key = rb_gc_location((VALUE)*key); + if (new_key != (VALUE)*key) { + *key = new_key; } - if (rb_gc_location((VALUE)*value) != (VALUE)*value) { - *value = rb_gc_location((VALUE)*value); + VALUE new_value = rb_gc_location((VALUE)*value); + if (new_value != (VALUE)*value) { + *value = new_value; } return ST_CONTINUE; From 2a6353e2e51e5d6bb88e8aa18c50be55f2d49333 Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Tue, 26 May 2026 18:17:18 +0100 Subject: [PATCH 3/3] [ruby/rubygems] Document and test all available gemrc configuration keys Document missing gemrc configuration keys. The documented configuration key order aligns with the following part. https://github.com/ruby/rubygems/blob/287175d4ae57340e22c6f1d21da1489d7dac35c5/lib/rubygems/config_file.rb#L240-L257 Add and update tests for missing gemrc configuration use_psych and gemhome key assertions. Fix test_initialize_global_gem_cache_gemrc and test_initialize_concurrent_downloads to test with symbolic keys, as global_gem_cache and use_psych keys are documented as a symbolic key. https://github.com/ruby/rubygems/commit/8baf4d49a4 --- lib/rubygems/config_file.rb | 15 ++++++++++++++- test/rubygems/test_gem_config_file.rb | 18 ++++++++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb index 19718829fccbdd..d5e9eb4e33aec6 100644 --- a/lib/rubygems/config_file.rb +++ b/lib/rubygems/config_file.rb @@ -26,9 +26,22 @@ # RubyGems options use symbol keys. Valid options are: # # +:backtrace+:: See #backtrace -# +:sources+:: Sets Gem::sources +# +:bulk_threshold+:: See #bulk_threshold # +:verbose+:: See #verbose +# +:update_sources+:: See #update_sources # +:concurrent_downloads+:: See #concurrent_downloads +# +:cert_expiration_length_days+:: See #cert_expiration_length_days +# +:install_extension_in_lib+:: See #install_extension_in_lib +# +:ipv4_fallback_enabled+:: See #ipv4_fallback_enabled +# +:global_gem_cache+:: See #global_gem_cache +# +:use_psych+:: See #use_psych +# +:gemhome+:: See #home +# +:gempath+:: See #path +# +:sources+:: Sets Gem::sources +# +:disable_default_gem_server+:: See #disable_default_gem_server +# +:ssl_verify_mode+:: See #ssl_verify_mode +# +:ssl_ca_cert+:: See #ssl_ca_cert +# +:ssl_client_cert+:: See #ssl_client_cert # # gemrc files may exist in various locations and are read and merged in # the following order: diff --git a/test/rubygems/test_gem_config_file.rb b/test/rubygems/test_gem_config_file.rb index e85d00530e3089..3c79cb0762d783 100644 --- a/test/rubygems/test_gem_config_file.rb +++ b/test/rubygems/test_gem_config_file.rb @@ -53,6 +53,7 @@ def test_initialize fp.puts ":sources:" fp.puts " - http://more-gems.example.com" fp.puts "install: --wrappers" + fp.puts ":gemhome: /tmp/gems" fp.puts ":gempath:" fp.puts "- /usr/ruby/1.8/lib/ruby/gems/1.8" fp.puts "- /var/ruby/1.8/gem_home" @@ -61,6 +62,7 @@ def test_initialize fp.puts ":cert_expiration_length_days: 28" fp.puts ":install_extension_in_lib: false" fp.puts ":ipv4_fallback_enabled: true" + fp.puts ":use_psych: true" end util_config_file @@ -70,6 +72,7 @@ def test_initialize assert_equal false, @cfg.update_sources assert_equal %w[http://more-gems.example.com], @cfg.sources assert_equal "--wrappers", @cfg[:install] + assert_equal "/tmp/gems", @cfg.home assert_equal(["/usr/ruby/1.8/lib/ruby/gems/1.8", "/var/ruby/1.8/gem_home"], @cfg.path) assert_equal 0, @cfg.ssl_verify_mode @@ -77,6 +80,7 @@ def test_initialize assert_equal 28, @cfg.cert_expiration_length_days assert_equal false, @cfg.install_extension_in_lib assert_equal true, @cfg.ipv4_fallback_enabled + assert_equal true, @cfg.use_psych end def test_initialize_ipv4_fallback_enabled_env @@ -105,7 +109,7 @@ def test_initialize_global_gem_cache_env def test_initialize_global_gem_cache_gemrc File.open @temp_conf, "w" do |fp| - fp.puts "global_gem_cache: true" + fp.puts ":global_gem_cache: true" end util_config_file %W[--config-file #{@temp_conf}] @@ -113,9 +117,19 @@ def test_initialize_global_gem_cache_gemrc assert_equal true, @cfg.global_gem_cache end + def test_initialize_use_psych_env + orig_use_psych = ENV["RUBYGEMS_USE_PSYCH"] + ENV["RUBYGEMS_USE_PSYCH"] = "true" + util_config_file %W[--config-file #{@temp_conf}] + + assert_equal true, @cfg.use_psych + ensure + ENV["RUBYGEMS_USE_PSYCH"] = orig_use_psych + end + def test_initialize_concurrent_downloads File.open @temp_conf, "w" do |fp| - fp.puts "concurrent_downloads: 2" + fp.puts ":concurrent_downloads: 2" end util_config_file %W[--config-file #{@temp_conf}]