AgeCommit message (Collapse)Author
2020-05-11sed -i s|ruby/3|ruby/impl|g卜部昌平
This shall fix compile errors. Notes: Merged:
2020-05-11mv include/ruby/{3,impl}卜部昌平
Devs do not love "3". Notes: Merged:
2020-05-11BASERUBY have to be 1.9 or later at least [Bug #16845]Nobuyoshi Nakada
Many tools under tool directory haven't worked with ruby 1.8.
2020-05-11Suppress probably impossible maybe-uninitialized warningNobuyoshi Nakada
2020-05-11Added more NORETURN declarationsNobuyoshi Nakada
2020-05-11Fallback MAKE to makeNobuyoshi Nakada
2020-05-11* 2020-05-11 [ci skip]git
2020-05-11Pass MAKE value to configure for non-default name caseNobuyoshi Nakada
GNU make does not export it by default.
2020-05-10win32ole: separate global variable declarations and definitionsNobuyoshi Nakada > * GCC now defaults to `-fno-common`. As a result, global > variable accesses are more efficient on various targets. In > C, global variables with multiple tentative definitions now > result in linker errors. With `-fcommon` such definitions are > silently merged during linking.
2020-05-10Fixed a typoNobuyoshi Nakada
2020-05-10Fix for cross_compilingNobuyoshi Nakada
`RubyVM.each_builtin` is not defined when cross compiling.
2020-05-10Run rb_syswait on exec failureTakashi Kokubun
not only when !w but also when w == WAITPID_LOCK_ONLY. See also: f7c0cc36920a4ed14a3ab1ca6cfdf18ceff1e5d5 and a2264342063260d660b99872eaf5080f6ab08e81. We thought this change was an oversight in the latter commit. Without this change, the test fails like: $ make test-all TESTS="../test/ruby/test_process.rb -n test_exec_failure_leaves_no_child" RUN_OPTS="--jit" ... 1) Failure: TestProcess#test_exec_failure_leaves_no_child [/home/k0kubun/src/]: Expected [[26799, #<Process::Status: pid 26799 exit 127>]] to be empty. Co-Authored-By: Yusuke Endoh <>
2020-05-10nmake doesn't understand $<卜部昌平
Fix MSVC build error. Notes: Merged:
2020-05-10delete mk_builtin_binary.rb卜部昌平
To generate what is necessary via generic_erb.rb instead. Notes: Merged:
2020-05-10delete mk_call_iseq_optimized.rb卜部昌平
To generate what is necessary via generic_erb.rb instead. Notes: Merged:
2020-05-09Workaround a zombie process created by Open3Takashi Kokubun
with MJIT worker enabled The problem: ``` $ ruby -ropen3 --jit -e 'Open3.capture2e("cmake") rescue nil;binding.irb' irb(main)[01:0]> Process.waitall => [[10656, #<Process::Status: pid 10656 exit 127>]] $ ruby -ropen3 -e 'Open3.capture2e("cmake") rescue nil;binding.irb' irb(main)[01:0]> Process.waitall => [] ``` Not sure why it's happening yet, but first I'd like to prevent trunk-mjit-wait from failing like
2020-05-10* 2020-05-10 [ci skip]git
2020-05-10test/rubygems/test_gem_ext_cmake_builder.rb: make sure cmake availableYusuke Endoh
just for a case. In addition, this change suppresses unused variable warning.
2020-05-09.github/workflows/compilers.yml: GCC 10.1 released卜部昌平
Notes: Merged:
2020-05-09Use %w instead of %i not to create unused IDsNobuyoshi Nakada
2020-05-09test/io/console/test_io_console.rb: Rescue Errno::ENXIO for SolarisYusuke Endoh ``` 1) Failure: TestIO_Console#test_failed_path [/export/home/users/chkbuild/cb-gcc/tmp/build/20200509T100003Z/ruby/test/io/console/test_io_console.rb:40]: [Errno::ENODEV, Errno::ENOTTY, Errno::EBADF] exception expected, not #<Errno::ENXIO: No such device or address - /dev/null>. ```
2020-05-09[ruby/io-console] Use sys_fail_fptr macroNobuyoshi Nakada
2020-05-09Addeed missing RSpec namespaceHiroshi SHIBATA
2020-05-09[ruby/io-console] Fails with EBADF on mingwNobuyoshi Nakada
2020-05-09[ruby/io-console] Expanded expected errorsNobuyoshi Nakada
May fail with ENOTTY instead of ENODEV.
2020-05-09Fix a typo [ci skip]Kazuhiro NISHIYAMA
2020-05-09Fix typosKazuhiro NISHIYAMA
2020-05-09[ruby/io-console] Added test for failed pathNobuyoshi Nakada
2020-05-09[ruby/io-console] Show path name at errorNobuyoshi Nakada
2020-05-09mjit_worker.c: compile_compact_jit_code is not used on mingwNobuyoshi Nakada
2020-05-09rbuninstall.rb: show paths without destdir as well as rbinstall.rbNobuyoshi Nakada
2020-05-09rbuninstall.rb: get rid of errors when prefix ends with "/."Nobuyoshi Nakada
2020-05-09rbuninstall.rb: print output record separator instead of $\Nobuyoshi Nakada
2020-05-09* 2020-05-09 [ci skip]git
2020-05-09rbinstall.rb: get rid of installing duplicate filesNobuyoshi Nakada
Should not overwrite ext/rubyvm/lib/forwardable/impl.rb by lib/forwardable/impl.rb.
2020-05-09rbinstall.rb: record bundled gem filesNobuyoshi Nakada
2020-05-08Added GC guard for splatted arrayNobuyoshi Nakada
2020-05-08Classes made from Struct should have default `new` singleton method.Marc-Andre Lafortune
[Bug #16465] [Bug #16801] [Fix GH-2795] [Fix GH-2944] [Fix GH-3045] [Fix GH-3093] Note: Backporting shouldn't modify object.h and instead can use struct_new_kw which is basically a duplicate implementation of rb_class_new_instance_pass_kw Co-authored-by: Yusuke Endoh <> Co-authored-by: John Hawthorn <> Co-authored-by: Adam Hess <> Co-authored-by: Jose Cortinas <> Co-authored-by: Jean Boussier <> Notes: Merged:
2020-05-08`Open3.capture2e` raises exception when the command is not present.Hiroshi SHIBATA
2020-05-08Revert "[rubygems/rubygems] Remove unneeded global teardown"Hiroshi SHIBATA
This reverts commit 93d1588c782ab9d61699f98b6c64d7f0ab8121c0. Notes: Merged:
2020-05-08Revert "[rubygems/rubygems] Remove unneeded teardown"Hiroshi SHIBATA
This reverts commit 0da416ab170dbe1cbd530a5a7c5e8128910014b2. Notes: Merged:
2020-05-08Revert "[rubygems/rubygems] Use a local temporary directory"Hiroshi SHIBATA
This reverts commit e98455f289047c43a733e61ac6317fb74b68de82. Notes: Merged:
2020-05-08[rubygems/rubygems] Remove unneeded teardownDavid Rodríguez
Tests using credentials shouldn't be leaving side effects. Notes: Merged:
2020-05-08[rubygems/rubygems] Remove unneeded global teardownDavid Rodríguez
Instead, make each test cleanup after itself. Notes: Merged:
2020-05-08[rubygems/rubygems] Restore the old .gemrc example for compatible testsHiroshi SHIBATA Notes: Merged:
2020-05-08[rubygems/rubygems] Removed needless setup to clear credentialHiroshi SHIBATA Notes: Merged:
2020-05-08[rubygems/rubygems] Also added credential_setup to the some of testsHiroshi SHIBATA Notes: Merged:
2020-05-08[rubygems/rubygems] Split credential helper as credential_setup and use itHiroshi SHIBATA Notes: Merged:
2020-05-08[rubygems/rubygems] Revert adding loaded specs to `Gem::Specification.stubs` ↵David Rodríguez
and `Gem::Specification.stubs_for` The rationale is that: * The change has caused realworld issues. See for example and specifically [this comment]( for a great explanation of the issue it caused for `did_you_mean`. * The change also causes problems for our development workflows. For example, because of it, our `bundler` specs cannot currently be run with `bin/rake` and we have to use `bin/rspec` or `bin/parallel_spec` directly. The explanation for this is: - Our specs install test dependencies to `tmp` before running specs. - `rake` is one of these test dependencies. - Before installing each test dependency, we check whether it has matching installed specs: - Normally, if `rake` has not yet been installed to `tmp`, this check fails and `rake` is installed, but since the loaded specs are now added to `Gem::Specification.stubs` and `rake`'s specification _is_ loaded because we're running through `bin/rake`, the check incorrectly assumes that `rake` is already installed to `tmp` and skips installation. - At a later point the specs check whether `rake` is actually installed and fail if it's not: Essentially, both of the issues are the same. If at runtime we change the location of gems, we'll _want_ to not consider loaded specifications when dealing with the new gem location, because the loaded specifications have not been loaded from there. Loaded specifications is something different from installed stub specifications and those should not be mixed. The PR still seemed to have fixed an issue, so I did my archaeology job and investigated the original issue to double check if reverting is ok. The logs for the original error can be found here: So I installed ruby 2.4.4, checked out the commit reference before the offending PR, and the exact error reproduced. :tada: ``` $ rake test /home/deivid/Code/rubygems/lib/rubygems/resolver.rb:231:in `search_for': Unable to resolve dependency: user requested 'bundler (= 1.16.2)' (Gem::UnsatisfiableDependencyError) from /home/deivid/Code/rubygems/lib/rubygems/resolver.rb:283:in `block in sort_dependencies' from /home/deivid/Code/rubygems/lib/rubygems/resolver.rb:277:in `each' from /home/deivid/Code/rubygems/lib/rubygems/resolver.rb:277:in `sort_by' from /home/deivid/Code/rubygems/lib/rubygems/resolver.rb:277:in `with_index' from /home/deivid/Code/rubygems/lib/rubygems/resolver.rb:277:in `sort_dependencies' from /home/deivid/Code/rubygems/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb:52:in `block in sort_dependencies' from /home/deivid/Code/rubygems/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb:69:in `with_no_such_dependency_error_handling' from /home/deivid/Code/rubygems/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb:51:in `sort_dependencies' from /home/deivid/Code/rubygems/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:165:in `initial_state' from /home/deivid/Code/rubygems/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:106:in `start_resolution' from /home/deivid/Code/rubygems/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:64:in `resolve' from /home/deivid/Code/rubygems/lib/rubygems/resolver/molinillo/lib/molinillo/resolver.rb:42:in `resolve' from /home/deivid/Code/rubygems/lib/rubygems/resolver.rb:188:in `resolve' from /home/deivid/Code/rubygems/lib/rubygems/request_set.rb:396:in `resolve' from /home/deivid/Code/rubygems/lib/rubygems/request_set.rb:408:in `resolve_current' from /home/deivid/Code/rubygems/lib/rubygems.rb:243:in `finish_resolve' from /home/deivid/Code/rubygems/lib/rubygems/rdoc.rb:13:in `<top (required)>' from /home/deivid/Code/rubygems/lib/rubygems/core_ext/kernel_require.rb:54:in `require' from /home/deivid/Code/rubygems/lib/rubygems/core_ext/kernel_require.rb:54:in `require' from /home/deivid/Code/rubygems/lib/rubygems/test_case.rb:1563:in `<top (required)>' from /home/deivid/Code/rubygems/test/rubygems/test_bundled_ca.rb:2:in `require' from /home/deivid/Code/rubygems/test/rubygems/test_bundled_ca.rb:2:in `<top (required)>' from /home/deivid/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_test_loader.rb:15:in `require' from /home/deivid/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_test_loader.rb:15:in `block in <main>' from /home/deivid/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_test_loader.rb:4:in `select' from /home/deivid/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_test_loader.rb:4:in `<main>' rake aborted! Command failed with status (1) Tasks: TOP => test ``` Now the explanation of the error: * Rubygems base `TestCase` class requires `bundler` because some tests use `bundler`: * That `require` (our custom rubygems require) would activate the default bundler spec (1.16.1 for ruby 2.4.4) but then overwrite it with a 1.16.2 version (the locally provided bundler those days) due to [this old hack]( * Rubygems base `TestCase` class requires `rubygems/rdoc`: * And that file ends up calling `Gem.finish_resolve`: * `Gem.finish_resolve` adds the currently loaded specs to the resolution: * That means it would try to resolve bundler 1.16.2, but no specification for that version was installed since the default was 1.16.1. That explains why upgrading to rubygems 2.7.7 fixed the issue, since it provided bundler 1.16.2 by default so there was not bundler version discrepancy. After understanding the error, I conclude that: * Only this part of the original patch was actually needed to resolve the error, not any of the changes in `Gem::Specification.stubs` and `Gem::Specification.stubs_for`: ```diff diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index f1cd3d274c..92c848e870 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -13,6 +13,15 @@ else require 'rubygems' end +# If bundler gemspec exists, add to stubs +bundler_gemspec = File.expand_path("../../../bundler/bundler.gemspec", __FILE__) +if File.exist?(bundler_gemspec) + Gem::Specification.dirs.unshift File.dirname(bundler_gemspec) + Gem::Specification.class_variable_set :@@stubs, nil + Gem::Specification.stubs + Gem::Specification.dirs.shift +end + begin gem 'minitest' rescue Gem::LoadError ``` So, I propose to revert adding loaded specification to `Gem::Specification.stubs` and `Gem::Specification.stubs_for` because I think it's safe, it fixes the issues caused by their addition, and it simplifies `Gem::Specification` code, which is already complicated enough. Notes: Merged:
2020-05-08[rubygems/rubygems] Test that two calls to `stub_for` returns the same ↵Vít Ondruch
(cached) instance. Notes: Merged: