diff options
| author | lolwut <hsbt@ruby-lang.org> | 2026-03-12 10:21:19 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2026-03-12 03:51:01 +0000 |
| commit | 93a516dd8bb0e9bd4e5654d44fb83d7ce81a10d6 (patch) | |
| tree | 49c93138499299ca1a262432cad8dbfaeaed3a72 | |
| parent | f30833082f3933eb89a905163e09cdd6c7efcd44 (diff) | |
[ruby/rubygems] Revert DEFAULT_INSTALL_EXTENSION_IN_LIB to true
Many gems created with the default template over the past 6 years use
`require_relative` to load compiled extensions, which breaks when
extensions are not copied into the gem's lib directory. Restore the
default to true for now to maintain compatibility, and plan to change
it to false in RubyGems 4.2 with advance warning.
https://github.com/ruby/rubygems/commit/5e83a62a8e
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| -rw-r--r-- | lib/rubygems/config_file.rb | 2 | ||||
| -rw-r--r-- | test/rubygems/test_gem_config_file.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb index bd66aa258d..19718829fc 100644 --- a/lib/rubygems/config_file.rb +++ b/lib/rubygems/config_file.rb @@ -47,7 +47,7 @@ class Gem::ConfigFile DEFAULT_CONCURRENT_DOWNLOADS = 8 DEFAULT_CERT_EXPIRATION_LENGTH_DAYS = 365 DEFAULT_IPV4_FALLBACK_ENABLED = false - DEFAULT_INSTALL_EXTENSION_IN_LIB = false + DEFAULT_INSTALL_EXTENSION_IN_LIB = true DEFAULT_GLOBAL_GEM_CACHE = false DEFAULT_USE_PSYCH = false diff --git a/test/rubygems/test_gem_config_file.rb b/test/rubygems/test_gem_config_file.rb index b38628fdc4..e85d00530e 100644 --- a/test/rubygems/test_gem_config_file.rb +++ b/test/rubygems/test_gem_config_file.rb @@ -43,7 +43,7 @@ class TestGemConfigFile < Gem::TestCase assert_equal [@gem_repo], Gem.sources assert_equal 365, @cfg.cert_expiration_length_days assert_equal false, @cfg.ipv4_fallback_enabled - assert_equal false, @cfg.install_extension_in_lib + assert_equal true, @cfg.install_extension_in_lib File.open @temp_conf, "w" do |fp| fp.puts ":backtrace: true" @@ -59,7 +59,7 @@ class TestGemConfigFile < Gem::TestCase fp.puts ":ssl_verify_mode: 0" fp.puts ":ssl_ca_cert: /etc/ssl/certs" fp.puts ":cert_expiration_length_days: 28" - fp.puts ":install_extension_in_lib: true" + fp.puts ":install_extension_in_lib: false" fp.puts ":ipv4_fallback_enabled: true" end @@ -75,7 +75,7 @@ class TestGemConfigFile < Gem::TestCase assert_equal 0, @cfg.ssl_verify_mode assert_equal "/etc/ssl/certs", @cfg.ssl_ca_cert assert_equal 28, @cfg.cert_expiration_length_days - assert_equal true, @cfg.install_extension_in_lib + assert_equal false, @cfg.install_extension_in_lib assert_equal true, @cfg.ipv4_fallback_enabled end |
