summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2025-08-22Do not respect ruby2_keywords on method/proc with post argumentsJeremy Evans
Previously, ruby2_keywords could be used on a method or proc with post arguments, but I don't think the behavior is desired: ```ruby def a(*c, **kw) [c, kw] end def b(*a, b) a(*a, b) end ruby2_keywords(:b) b({foo: 1}, bar: 1) ``` This changes ruby2_keywords to emit a warning and not set the flag on a method/proc with post arguments. While here, fix the ruby2_keywords specs for warnings, since they weren't testing what they should be testing. They all warned because the method didn't accept a rest argument, not because it accepted a keyword or keyword rest argument.
2025-08-18Merge specs checking CLI flags and subcommands are documentedDavid Rodríguez
We had them duplicated, but with slightly different features: * The ones in `other/cli_man_pages.rb` enforced a specific structure to document CLI options, so were less likely to have false positives. * The ones in `quality_spec.rb` were able to check subcommands and their flags. This commit merges both and preserves the best of both.
2025-08-18[rubygems/rubygems] Enforce checksums strictly for registry gemsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/05199ae0c1
2025-08-18[rubygems/rubygems] Fix incorrect error message capitalizationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d41b8d303c
2025-08-18[rubygems/rubygems] Refactor git specsDavid Rodríguez
To save some unnecessary `bundle install` commands. https://github.com/rubygems/rubygems/commit/61e7d9d09a
2025-08-18[rubygems/rubygems] Delay pending specDavid Rodríguez
We had actually cancelled this change. After a second look though, it does seem like a reasonable plan since `bundle list` makes more sense for listing gems, and `bundle info` makes more sense for showing info about a particular gem. `bundle show` is a strange mix of both. Let's schedule this for Bundler 5. https://github.com/rubygems/rubygems/commit/7071a1e82e
2025-08-18[rubygems/rubygems] Fix `bundle show --verbose` and recommend it as an ↵David Rodríguez
alternative to `bundle show --outdated` https://github.com/rubygems/rubygems/commit/7cad1e4947
2025-08-18[rubygems/rubygems] Fix `bundle update foo` not upgrading foo to latest in a ↵David Rodríguez
specific case If upgrading `foo` needs an indirect dependency to be downgraded, Bundler would not be able to upgrade foo. This is because when calculating the latest resolvable version of foo, Bundler was still adding lower bound requirements on the locked versions of all dependencies to avoid downgrades, effectively pinning foo to a version older than the latest. To fix this, instead of creating a second "unlocked" definition to figure out the latest resolvable version, create a second unlocked resolver, and DO NOT add lower bound requirements to it. https://github.com/rubygems/rubygems/commit/00cc0ecc69
2025-08-18[rubygems/rubygems] Introduce `bundle list --format=json`Schneems
The `bundle list` command is a convenient way for human to know what gems and versions are available. By introducing a `--format=json` option, we can provide the same information to machines in a stable format that is robust to UI additions or modifications. It indirectly supports `Gemfile.lock` modifications by discouraging external tools from attempting to parse that format. This addition allows for the scripting of installation tools, such as buildpacks, that wish to branch logic based on gem versions. For example: ```ruby require "json" command = "bundle list --format=json" output = `#{command}` raise "Command `#{command}` errored: #{output}" unless $?.success? railties = JSON.parse(output).find {|gem| gem["name"] == railties } if railties && Gem::Version.new(railties["version"]) >= Gem::Version.new("7") puts "Using Rails greater than 7!" end ``` The top level is an object with a single key, "gems", this structure allows us to add other information in the future (should we desire) without having to change the json schema. https://github.com/rubygems/rubygems/commit/9e081b0689
2025-08-18[rubygems/rubygems] Fix Bundler printing more flags than actually passed in ↵David Rodríguez
verbose mode This reverts commit https://github.com/rubygems/rubygems/commit/bea87eab0b17 and adds a regression spec for it. https://github.com/rubygems/rubygems/commit/ac98107864
2025-08-18[rubygems/rubygems] Fix `bundle cache --no-all` not printing a deprecation ↵David Rodríguez
warning Like others, it's a remembered option which we are deprecating in favor of configuration. https://github.com/rubygems/rubygems/commit/9ea55e0df2
2025-08-18[rubygems/rubygems] Use a rubygems filter for the timeout specDavid Rodríguez
For consistency. https://github.com/rubygems/rubygems/commit/3e3364e19f
2025-08-18[rubygems/rubygems] Fix spec no longer run since rubygems timeout was renamedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/4d0c058e6a
2025-08-18[rubygems/rubygems] Remove unnecessary rubygems filtersDavid Rodríguez
Since the lowest supported version is now 3.4.1. https://github.com/rubygems/rubygems/commit/d00e03c52e
2025-08-04[rubygems/rubygems] Fix daily CIDavid Rodríguez
Platform specific versions of ffi-1.17.2 are not compatible with Ruby 3.5, so Bundler fails to resolve in Ruby 3.5 using recorded VCR responses. Use the generic version of ffi-1.17.2, which should work for all rubies, consistently to fix that. https://github.com/rubygems/rubygems/commit/a192f7e35d
2025-07-30[rubygems/rubygems] Keep fixture Gemfiles in sync when bumping versionDavid Rodríguez
https://github.com/rubygems/rubygems/commit/781443cb0f
2025-07-30[rubygems/rubygems] Bump thor in /bundler/spec/realworld/fixtures/tapiocadependabot[bot]
Bumps [thor](https://github.com/rails/thor) from 1.3.2 to 1.4.0. - [Release notes](https://github.com/rails/thor/releases) - [Commits](https://github.com/rails/thor/compare/v1.3.2...v1.4.0) --- updated-dependencies: - dependency-name: thor dependency-version: 1.4.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> https://github.com/rubygems/rubygems/commit/0a4e5a377d
2025-07-30[rubygems/rubygems] Fix truffleruby failing to install sorbet-static when ↵David Rodríguez
there's no lockfile The generic Ruby platform was getting unconditionally added in truffleruby, preventing resolution in situations where there's no generic ruby version (sorbet-static). Instead, the generic platform should be considered per dependency, not globally. https://github.com/rubygems/rubygems/commit/a96afc5351
2025-07-29Fix stripping features from the descriptionNobuyoshi Nakada
2025-07-28(Temporarily?) delay path changes and global cache changesDavid Rodríguez
There are several issues with these which I'm not sure I'll have time to address properly. I prefer to keep our default branch in a releasable state just in case. Once they are fixed, this can be reverted.
2025-07-28[rubygems/rubygems] Remove unnecessary branchingDavid Rodríguez
We now run specs against a single version, so I prefer to keep a single branch. Once we bump the major version, this will need very little updates, and that seems fine. https://github.com/rubygems/rubygems/commit/3866d25a00
2025-07-28[rubygems/rubygems] The `install_gemfile` helper has not set "retry" for a ↵David Rodríguez
long time https://github.com/rubygems/rubygems/commit/41dab5954f
2025-07-25[rubygems/rubygems] Document missing options from man pages:Edouard CHIN
- The `bundle plugin uninstall --all` was missing. - The `bundle plugin install --local-git` was missing due to being deprecated. We decided to reintroduce the doc for more clarity. https://github.com/rubygems/rubygems/commit/4da252945c
2025-07-25[rubygems/rubygems] Add a quality spec to ensure man pages are up to date:Edouard CHIN
- Ref #8802 - ### Problem Whenever a bundler command options is added, we want to make sure that the associated command man page is updated to reflect the new option (e.g. this mistake was made in #8624) ### Solution In #8802 we discussed a bit on the implementation which would rely on parsing ronn files and introduce some conventions on how options documented in man pages should be written. I figured I would try a simpler approach by just checking if the man page of a command list options using a simple regex. Pros: - Simpler as we don't have to parse ronn files. - No need to modify all existing man pages. Cons: - We can only verify one way (CLI options -> man pages). If a CLI option get removed, we won't be able to warn that the existing document man page option needs to be removed. https://github.com/rubygems/rubygems/commit/e10e60bd33
2025-07-25[rubygems/rubygems] Fix language quality spec no longer getting run properlyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/c65e34a904
2025-07-25[rubygems/rubygems] Fix man tracked files glob for ruby-coreDavid Rodríguez
The location has been consistent with upstream for a while so the previous glob was no longer matching any files. https://github.com/rubygems/rubygems/commit/dae40b7041
2025-07-25[rubygems/rubygems] Don't create an empty `tmp/2.1` directory when running ↵David Rodríguez
spec:deps task https://github.com/rubygems/rubygems/commit/3189d3e49b
2025-07-25[rubygems/rubygems] Build bundler gem just once for specsDavid Rodríguez
When we need to reset system gems during specs, there's no need to rebuild bundler, we can copy over the original gem home. https://github.com/rubygems/rubygems/commit/7b4f80747b
2025-07-25[rubygems/rubygems] Don't create an empty bundled_app when setting up depsDavid Rodríguez
Running everything in `bundled_app` by default causes the `bundled_app` helper to be used everytime, and that will create a scoped bundled_app folder if it does not exist. That causes `bin/rake spec:deps` to create an empty `tmp/2.1/bundled_app` folder which is a bit weird. This commit changes specs to not switch to a (possibly empty) bundled_app directory when not necessary (for example, when running `gem` commands in order to setup test dependencies). https://github.com/rubygems/rubygems/commit/4bf89c0705
2025-07-25[rubygems/rubygems] Remove some unnecessary `artifice` argumentsDavid Rodríguez
Since `sys_exec` does not actually set it. https://github.com/rubygems/rubygems/commit/abc0fd0599
2025-07-25[rubygems/rubygems] Simplify new gem spec that simulates "no git available"David Rodríguez
I don't know why it was written like that. https://github.com/rubygems/rubygems/commit/ee83fddd30
2025-07-25[rubygems/rubygems] Fix some specs running the wrong rakeDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8d4eb154b1
2025-07-25[rubygems/rubygems] Remove unused parameterDavid Rodríguez
https://github.com/rubygems/rubygems/commit/043f73586b
2025-07-24Support `cause:` in `Thread#raise` and `Fiber#raise`. (#13967)Samuel Williams
* Add support for `cause:` argument to `Fiber#raise` and `Thread#raise`. The implementation behaviour is consistent with `Kernel#raise` and `Exception#initialize` methods, allowing the `cause:` argument to be passed to `Fiber#raise` and `Thread#raise`. This change ensures that the `cause:` argument is handled correctly, providing a more consistent and expected behavior when raising exceptions in fibers and threads. [Feature #21360] * Shared specs for Fiber/Thread/Kernel raise. --------- Co-authored-by: Samuel Williams <samuel.williams@shopify.com>
2025-07-22[rubygems/rubygems] Define dummy module for mise pluginHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/64bdff1e1e
2025-07-17Cancel `--force` deprecation in favor of `--redownload`David Rodríguez
I realized `--redownload` is not a good name, because it does not necessarily redownloads gems. It only forces reinstallation even if gem is already installed. So I believe `--force` is actually a better name and the introduction of `--force` was a misunderstanding of what the `--force` flag did at the time. Let's cancel the deprecation of `--force`. For now the `--redownload` alias is left around until we decide what to do with it.
2025-07-17[rubygems/rubygems] Remove some realworld specsDavid Rodríguez
These two specs need the version of Bundler to be faked to pass. In one of them we're doing it already, and in the other one it will be needed when bumping the major version of Bundler. So they are no longer truly realworld anymore. Realworld specs are hard to maintain, particularly the ones that depend on the version of Bundler itself, so I'm slowly moving away from them. I checked the changes that introduced them and I believe it's really unlikely that any of these catches turns out to be the only spec to catch a resolver regression. We've completely changed the resolution engine since and a lot of extra coverage has been added so I believe it's fine to let these two go. https://github.com/rubygems/rubygems/commit/a363f0168c
2025-07-17[rubygems/rubygems] Regenerate VCR cassettesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8530965b9e
2025-07-17[rubygems/rubygems] Fix `bundle binstub --path=foo` not printing a ↵David Rodríguez
deprecation warning Like others, it's a remembered option which we are deprecating in favor of configuration. https://github.com/rubygems/rubygems/commit/801d5dd943
2025-07-17[rubygems/rubygems] Fix `bundle cache path=foo` not printing a deprecation ↵David Rodríguez
message https://github.com/rubygems/rubygems/commit/0af03eea5d
2025-07-15Provide pathname.so with embedded PathnameHiroshi SHIBATA
2025-07-14[rubygems/rubygems] Reset tmp directories before spec suiteDavid Rodríguez
If you abort running test suite with a quick double Ctrl-C, tmp files will be left around, and they will interfere with the next test run. To avoid this, make sure to clear them once at the beginning of the test suite. ### Before ``` $ bin/parallel_rspec 16 processes for 175 specs, ~ 11 specs per process .............................................................................................^C^C Finished in 19.45 seconds (files took 0.42722 seconds to load) 94 examples, 0 failures (... turbo tests backtrace ...) $ bin/parallel_rspec 16 processes for 175 specs, ~ 11 specs per process .F....F....F...F......^C Failures: (... failures' details ...) ``` ### After ``` $ bin/parallel_rspec 16 processes for 175 specs, ~ 11 specs per process .................................................................................^C^C Finished in 18.18 seconds (files took 0.4383 seconds to load) 82 examples, 0 failures (... turbo tests backtrace ...) $ bin/parallel_rspec 16 processes for 175 specs, ~ 11 specs per process ................................................................................^C^C Finished in 8.79 seconds (files took 0.45187 seconds to load) 80 examples, 0 failures (... turbo tests backtrace ...) ``` https://github.com/rubygems/rubygems/commit/6767a52711
2025-07-11Add Set C-APIJeremy Evans
This should be a minimal C-API needed to deal with Set objects. It supports creating the sets, checking whether an element is the set, adding and removing elements, iterating over the elements, clearing a set, and returning the size of the set. Co-authored-by: Nobuyoshi Nakada <nobu.nakada@gmail.com>
2025-07-10[Bug #19417] Update version guardNobuyoshi Nakada
2025-07-10[Bug #19417] Make word prop match join_control ...Janosch Müller
... to conform to UTS 18 as mentioned in https://bugs.ruby-lang.org/issues/19417#note-3 https://unicode.org/reports/tr18/#word states word should match join_control chars. It currently does not: ```ruby [*0x0..0xD799, *0xE000..0x10FFFF].map { |n| n.chr 'utf-8' } => all_chars all_chars.grep(/\p{join_control}/) => jc jc.count # => 2 jc.grep(/\p{word}/).count # => 0 ```
2025-07-09Update to ruby/spec@ed254baAndrew Konchin
2025-07-09[rubygems/rubygems] Update gemspec based on provided github username when existsSweta Sanghavi
* Conditionally set changelog_url if gh username passed and enabled * conditionally set homepage, source code uri, homepage uri when gh username passed in * update documentation to say username will also be used for gemspec file https://github.com/rubygems/rubygems/commit/1c1ada593b
2025-07-09[rubygems/rubygems] Use shorter questions as prompts in `bundle gem`David Rodríguez
If we use long explanations as prompts, sometimes the prompt gets printed twice due to a (I think) reline/readline bug. https://github.com/rubygems/rubygems/commit/987e0dfa90
2025-07-07[rubygems/rubygems] Stop allowing calling `#gem` on random objectsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/4b8570ae15
2025-07-07[rubygems/rubygems] Cancel `path_relative_to_cwd` changeDavid Rodríguez
It only affected the `--path` flag which is actually getting removed, so I don't think it makes sense to make such change. The current behavior is reasonable and I tried to codify it with a few more specs. https://github.com/rubygems/rubygems/commit/6f520eb146