summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2023-02-27Skip a spec failing on masterTakashi Kokubun
https://github.com/ruby/ruby/actions/runs/4286361460/jobs/7466545010 http://ci.rvm.jp/results/trunk_gcc9@ruby-sp2-docker/4462424 http://ci.rvm.jp/results/trunk_clang_13@ruby-sp2-docker/4462422
2023-02-27Update to ruby/spec@e7dc804Benoit Daloze
2023-02-27Update to ruby/mspec@dc2eb26Benoit Daloze
2023-02-25Assigning `nil` to fiber storage deletes the association. (#7378)Samuel Williams
Also avoid allocations when looking up `Fiber#storage` if not needed. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2023-02-23[rubygems/rubygems] lint fix againMercedes Bernard
https://github.com/rubygems/rubygems/commit/118d28ad27
2023-02-23[rubygems/rubygems] lint fixMercedes Bernard
https://github.com/rubygems/rubygems/commit/de3b69f1a7
2023-02-23[rubygems/rubygems] add safe_load_marshal for gem::version and gem::specMercedes Bernard
https://github.com/rubygems/rubygems/commit/2ea2ead1b3
2023-02-23[rubygems/rubygems] test Bundler::Fetcher that error raised when attempting ↵Mercedes Bernard
load unexpected class https://github.com/rubygems/rubygems/commit/795e796a9e
2023-02-23[rubygems/rubygems] test rubygems_integration that error raised when ↵Mercedes Bernard
attempting load unexpected class https://github.com/rubygems/rubygems/commit/9798718b3b
2023-02-23[rubygems/rubygems] add test for private load_marshal methodMercedes Bernard
https://github.com/rubygems/rubygems/commit/3a772125b8
2023-02-23[rubygems/rubygems] make Bundler.load_marshal privateMercedes Bernard
https://github.com/rubygems/rubygems/commit/4909d071d2
2023-02-22Use `BigDecimal::VERSION` instead of `RUBY_VERSION`Nobuyoshi Nakada
2023-02-21Marshal.load: restore instance variables on RegexpJean Boussier
[Bug #19439] The instance variables were restore on the Regexp source, not the regexp itself. Unfortunately we have a bit of a chicken and egg problem. The source holds the encoding, and the encoding need to be set on the source to be able to instantiate the Regexp. So the instance variables have to be read on the `source`. To correct this we transfert the instance variables after instantiating the Regexp. The only way to avoid this would be to read the instance variable twice and rewind. Notes: Merged: https://github.com/ruby/ruby/pull/7323
2023-02-21Merge rubygems/bundler masterHiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/e9304aed7e43308b99e70c2f7b92028315fee8a5 Notes: Merged: https://github.com/ruby/ruby/pull/7345
2023-02-21[rubygems/rubygems] Give a better message when Gemfile branch does not existDavid Rodríguez
https://github.com/rubygems/rubygems/commit/cb4fc41cbc Notes: Merged: https://github.com/ruby/ruby/pull/7345
2023-02-21[rubygems/rubygems] Fix crash in pub grub involving empty rangesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/0f168516f7 Notes: Merged: https://github.com/ruby/ruby/pull/7345
2023-02-21[rubygems/rubygems] Update pub_grubJohn Hawthorn
* Replaces the wording of "is forbidden" with "cannot be used" * Fixes the method signature of VersionRange::Empty#eql? https://github.com/rubygems/rubygems/commit/8c6b3f130b Co-authored-by: Daniel Colson <danieljamescolson@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/7345
2023-02-21[rubygems/rubygems] Sync with pub_grub main branchDavid Rodríguez
We became a bit out of sync lately. https://github.com/rubygems/rubygems/commit/6161a2610a Notes: Merged: https://github.com/ruby/ruby/pull/7345
2023-02-21[rubygems/rubygems] Restore better error message when locked ref does not existDavid Rodríguez
https://github.com/rubygems/rubygems/commit/c8e024359f Notes: Merged: https://github.com/ruby/ruby/pull/7345
2023-02-20Update some ruby specs for the new message format of NoMethodErrorYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/6950
2023-02-17BigDecimal changed #remainder's specTakashi Kokubun
This test is no longer passing: ``` 1) BigDecimal#remainder returns NaN if Infinity is involved FAILED Expected Infinity.nan? to be truthy but was false /home/runner/work/ruby/ruby/src/spec/ruby/library/bigdecimal/remainder_spec.rb:58:in `block (2 levels) in <top (required)>' /home/runner/work/ruby/ruby/src/spec/ruby/library/bigdecimal/remainder_spec.rb:4:in `<top (required)>' ``` https://github.com/ruby/bigdecimal/pull/243
2023-02-13Marshal.load: also freeze extended objectsJean Boussier
[Bug #19427] The `proc` wouldn't be called either, that fixes both. Notes: Merged: https://github.com/ruby/ruby/pull/7284
2023-02-10[DOC] Move old ChangeLog files to doc/ChangeLog (#7293)Takashi Kokubun
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2023-02-09[rubygems/rubygems] Avoid crashing with a corrupted lockfileDaniel Colson
I did a bad thing (script that edits the Gemfile.lock directly) and ended up with a Gemfile.lock that was completely missing some indirect dependencies. While this is my fault and an error is reasonable, I noticed that the error got progressively less friendly in recent versions of bundler. Something similar came up in https://github.com/rubygems/rubygems/issues/6210, and this commit would have helped with that case as well (although we've already handled this a different way with #6219). Details: --- Back on Bundler 2.2.23, a corrupt lockfile like this would cause a helpful error: ``` Unable to find a spec satisfying minitest (>= 5.1) in the set. Perhaps the lockfile is corrupted? ``` Bundler 2.3.26 gave a helpful warning: ``` Warning: Your lockfile was created by an old Bundler that left some things out. Because of the missing DEPENDENCIES, we can only install gems one at a time, instead of installing 16 at a time. You can fix this by adding the missing gems to your Gemfile, running bundle install, and then removing the gems from your Gemfile. The missing gems are: * minitest depended upon by activesupport ``` But then continued on and crashed while trying to report the unmet dependency: ``` --- ERROR REPORT TEMPLATE ------------------------------------------------------- NoMethodError: undefined method `full_name' for nil:NilClass lib/bundler/installer/parallel_installer.rb:127:in `block (2 levels) in check_for_unmet_dependencies' ... ``` Bundler 2.4.0 and up crash as above when jobs=1, but crash even harder when run in parallel: ``` --- ERROR REPORT TEMPLATE ------------------------------------------------------- fatal: No live threads left. Deadlock? 3 threads, 3 sleeps current:0x00007fa6b6704660 main thread:0x00007fa6b6704660 * #<Thread:0x000000010833b130 sleep_forever> rb_thread_t:0x00007fa6b6704660 native:0x0000000108985600 int:0 * #<Thread:0x0000000108dea630@Parallel Installer Worker #0 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever> rb_thread_t:0x00007fa6b67f67c0 native:0x0000700009a62000 int:0 * #<Thread:0x0000000108dea4a0@Parallel Installer Worker #1 tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:90 sleep_forever> rb_thread_t:0x00007fa6b67f63c0 native:0x0000700009c65000 int:0 <internal:thread_sync>:18:in `pop' tmp/1/gems/system/gems/bundler-2.5.0.dev/lib/bundler/worker.rb:42:in `deq' ... ``` Changes --- This commit fixes the confusing thread deadlock crash by detecting if dependencies are missing such that we'll never be able to enqueue. When that happens we treat it as a failure so the install can finish. That gets us back to the `NoMethodError`, which this commit fixes by using a different warning in the case where no spec is found. https://github.com/rubygems/rubygems/commit/d73001a21d
2023-02-08[rubygems/rubygems] Improve wording of unmet dependencies warningDaniel Colson
`trying to manually editing` doesn't seem quite grammatically correct. We could change it to `trying to manually edit` (is that a split infinitive?), but I don't think `trying to` adds much here so I've removed it instead so `editing` is the verb. For the list of dependencies, the wording before this commit seemed to reverse the dependency. "B, depended on A" sounds like B depends on A (or did in the past but doesn't anymore?), but that's not correct. I think there's a missing word: "B, depended on by A", but I find "B, dependency of A" a bit nicer. https://github.com/rubygems/rubygems/commit/49a31257e3
2023-02-08Use Thread.pass until thread.stop? to wait for thread to blockJean Boussier
[Bug #19415] It should be more reliable Notes: Merged: https://github.com/ruby/ruby/pull/7270
2023-02-08Only emit circular dependency warning for owned thread shieldsJean byroot Boussier
[Bug #19415] If multiple threads attemps to load the same file concurrently it's not a circular dependency issue. So we check that the existing ThreadShield is owner by the current fiber before warning about circular dependencies. Notes: Merged: https://github.com/ruby/ruby/pull/7257
2023-02-07[rubygems/rubygems] Add Ruby 3.2 and 3.3 platforms to Gemfile DSLDaniel Colson
Along the same lines as https://github.com/rubygems/rubygems/pull/5469, this adds support for Ruby 3.2 and 3.3 platforms: `:ruby_32`, `mri_32`, etc. It also includes a spec that should help catch this earlier in the future, failing if we don't support platforms for the version of Ruby that is running the tests. https://github.com/rubygems/rubygems/commit/7cd19d824d
2023-02-06Revert "Only emit circular dependency warning for owned thread shields"Jean byroot Boussier
This reverts commit fa49651e05a06512e18ccb2f54a7198c9ff579de. Notes: Merged: https://github.com/ruby/ruby/pull/7256
2023-02-06Only emit circular dependency warning for owned thread shieldsJean Boussier
[Bug #19415] If multiple threads attemps to load the same file concurrently it's not a circular dependency issue. So we check that the existing ThreadShield is owner by the current fiber before warning about circular dependencies. Notes: Merged: https://github.com/ruby/ruby/pull/7252
2023-02-06[rubygems/rubygems] Properly load the generated gemspecAkira Matsuda
The previous code loads bundler's gemspec which does not include the generated gemspec file, and thus the test was passing where it should indeed fail. With this change, the test properly fails now. https://github.com/rubygems/rubygems/commit/2098ea0d75
2023-01-31Merge RubyGems/Bundler master.Hiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/5ace20dbecfeaf09fba5f616193f3cfcff70ba00 Notes: Merged: https://github.com/ruby/ruby/pull/7203
2023-01-31[rubygems/rubygems] Add test for old lockfile with new ruby versionMike Dalessio
Given an existing application using native gems (e.g., nokogiri) And a lockfile generated with a stable ruby version When we test the application against ruby-head and `bundle install` Then bundler should fall back to the generic ruby platform gem Note that this test has been passing since 45931ac9 https://github.com/rubygems/rubygems/commit/0ecc6de378 Notes: Merged: https://github.com/ruby/ruby/pull/7203
2023-01-31[rubygems/rubygems] Fix issue with extensions not compiling properly using ↵Tim Bates
inline gemfile https://github.com/rubygems/rubygems/commit/fa6e6ea95c Notes: Merged: https://github.com/ruby/ruby/pull/7203
2023-01-27[rubygems/rubygems] Don't warn on bundler binstubs --standalone --allDaniel Colson
Prior to this commit `bundle binstubs --standalone --all` would output a warning about not being able to generate a standalone binstub for bundler. This warning predates the `--all` option, and I don't think it makes sense in this context. The warning makes good sense when explicitly trying to generate a bundler standalone binstub with `bundle binstubs bundler --standalone`, since that command won't do what the user might have expected. But `--all` is not specifically asking for bundler, and having it report each time that the bundler binstubs could not be generated does not seem particularly helpful. The only way to make that warning go away would be to stop using `--standalone --all`. This commit skips the warning when running with the `--all` option. https://github.com/rubygems/rubygems/commit/e6a72e19eb
2023-01-26Enable code-coverage result for test-specHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7187
2023-01-26Enable code-coverage result for test-syntax-suggestHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7185
2023-01-24Add tests for variables in `END` block shared with the toplevelNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7136
2023-01-23blade is hosted under ruby-lang.org nowHiroshi SHIBATA
2023-01-22More coverage tests & specs. (#7171)Samuel Williams
* Add spec for eval and line coverage. * Add test for main file coverage. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2023-01-18Define RUBY_VERSION_IS_3_3 macro in rubyspec.hNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7145
2023-01-15[Bug #19335] `Integer#remainder` should respect `#coerce` (#7120)Nobuyoshi Nakada
Also `Numeric#remainder` should. Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2023-01-11Move classpath to rb_classext_tPeter Zhu
This commit moves the classpath (and tmp_classpath) from instance variables to the rb_classext_t. This improves performance as we no longer need to set an instance variable when assigning a classpath to a class. I benchmarked with the following script: ```ruby name = :MyClass puts(Benchmark.measure do 10_000_000.times do |i| Object.const_set(name, Class.new) Object.send(:remove_const, name) end end) ``` Before this patch: ``` 5.440119 0.025264 5.465383 ( 5.467105) ``` After this patch: ``` 4.889646 0.028325 4.917971 ( 4.942678) ``` Notes: Merged: https://github.com/ruby/ruby/pull/7096
2023-01-11Remove Encoding#replicateBenoit Daloze
Notes: Merged: https://github.com/ruby/ruby/pull/7079
2023-01-11Suppressing pending messages with RSpecHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7102
2023-01-10Merge RubyGems and Bundler masterHiroshi SHIBATA
from https://github.com/rubygems/rubygems/commit/0635c1423db5d7c461d53bf0c3329bca75de7609 Notes: Merged: https://github.com/ruby/ruby/pull/7094
2023-01-10[rubygems/rubygems] Fix resolver edge caseDavid Rodríguez
Let it deal with legacy gems with equivalent version and different dependencies. https://github.com/rubygems/rubygems/commit/b430babe97
2023-01-07Only RangeError on CRuby for shift width >= 2**67Benoit Daloze
* It seems a better exception class too than NoMemoryError.
2023-01-07Fix Integer#{<<,>>} specs with large shift widthBenoit Daloze
* The limit depends on the implementation and platform, it seems unavoidable. * See https://bugs.ruby-lang.org/issues/18518#note-9
2023-01-07[ruby/syntax_suggest] Run with the given ruby commandNobuyoshi Nakada
Running the file with shebang has a few issues. * shebang is an OS dependent feature. Many modern UNIX-like OSes support it, but not all, e.g., Windows. * `env` command may not be in `/usr/bin`. * "ruby" command may not be "ruby", when `--program-suffix` or other configuration option is used. https://github.com/ruby/syntax_suggest/commit/2edf241055