summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2026-01-29IO::Buffer.map seems not shareable across processes on OpenBSDBenoit Daloze
* See https://rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20260129T163005Z.fail.html.gz
2026-01-29Update to ruby/spec@8c98a84Benoit Daloze
2026-01-29Do not open to write the fixture filesNobuyoshi Nakada
2026-01-29Remove too platform sensitive assertionsNobuyoshi Nakada
2026-01-29Fix assertions not to be affected by the default encodingNobuyoshi Nakada
2026-01-28[ruby/rubygems] Only use parent source with Git and Path sourcesHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/c5da276610
2026-01-28Update to ruby/spec@83e26c9Benoit Daloze
2026-01-28Update to ruby/mspec@5470479Benoit Daloze
2026-01-26[ruby/rubygems] Fix Bundler that re-exec $0 when a `version` is present in ↵Edouard CHIN
the config: - ### Problem If you have a `version` in your config file (this feature was introduced in #6817), then running any `bundle` command will make Bundler re-exec and ultimately run the `bundle` binstub twice. ### Details When the `bundle` binstub gets executed, a `require "bundler"` is evaluated. RubyGems tries to require the `bundler.rb` file from the right `bundler` gem (in the event where you have multiple bundler versions in your system). RubyGems will prioritize a bundler version based on a few heurisitics. https://github.com/ruby/rubygems/blob/b50c40c92abb00bb172f1579356cc73c242b1849/lib/rubygems/bundler_version_finder.rb#L19-L21 This prioritize logic doesn't take into account the bundler version a user has specific in this config. So what happens is: 1. User execute the `bundle` binstub 2. `require 'bundler'` is evaluated. 3. RubyGems prioritize activating the bundler version specified in the Gemfile.lock 4. The CLI starts, and [Auto switch kicks in](https://github.com/ruby/rubygems/blob/b50c40c92abb00bb172f1579356cc73c242b1849/bundler/lib/bundler/cli.rb#L81). Bundler detects that user specifed a version in its config and the current Bundler version doesn't match. 5. Bundler exit and re-exec with the right bundler version. ### Solution This patch introduce two fixes. First, it reads the bundler config file and check for the local config first and then the global config. This is because the local has precedence over global. Second, the prioritization takes into account the version in config and let RubyGems activate the right version in order to prevent re-exec moments later. Finally, I also want to fix this problem because its a step toward fixing https://github.com/ruby/rubygems/issues/8106. I'll open a follow up patch to explain. https://github.com/ruby/rubygems/commit/d6e0f43133
2026-01-26[ruby/rubygems] Re-generate certificates with sha256WithRSAEncryption for ↵Hiroshi SHIBATA
modern OS https://github.com/ruby/rubygems/commit/41612df71d
2026-01-26[ruby/rubygems] Revert "Merge pull request #8989 from nobu/test-tmpdir"Hiroshi SHIBATA
This reverts commit https://github.com/ruby/rubygems/commit/3aa3ee3ee440, reversing changes made to https://github.com/ruby/rubygems/commit/d1ff3df70f55. https://github.com/ruby/rubygems/commit/0231b5b1bc
2026-01-26[ruby/rubygems] Fixed missing classnameHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/b2002d47d2
2026-01-26[ruby/rubygems] Do not pollute source directory by testsNobuyoshi Nakada
https://github.com/ruby/rubygems/commit/ab3c2200d2
2026-01-21Optimize File.basenameJean Boussier
The actual algorithm is largely unchanged, just allowed to use singlebyte checks for common encodings. It could certainly be optimized much further, as here again it often scans from the front of the string when we're interested in the back of it. But the algorithm as many Windows only corner cases so I'd rather ship a good improvement now and eventually come back to it later. Most of improvement here is from the reduced setup cost (avodi double null checks, avoid duping the argument, etc), and skipping the multi-byte checks. ``` compare-ruby: ruby 4.1.0dev (2026-01-19T03:51:30Z master 631bf19b37) +PRISM [arm64-darwin25] built-ruby: ruby 4.1.0dev (2026-01-21T08:21:05Z opt-basename 7eb11745b2) +PRISM [arm64-darwin25] ``` | |compare-ruby|built-ruby| |:----------|-----------:|---------:| |long | 3.412M| 18.158M| | | -| 5.32x| |long_name | 1.981M| 8.580M| | | -| 4.33x| |withext | 3.200M| 12.986M| | | -| 4.06x|
2026-01-15Added example for bundle/inlineHiroshi SHIBATA
2026-01-08Avoid flaky test failures by retrying on local port conflicts (#15818)Misaki Shioi
This test obtains an available port number by calling `TCPServer.new`, then closes it and passes the same port number as `local_port` to `TCPSocket.new`. However, `TCPSocket.new` could occasionally fail with `Errno::EADDRINUSE` at the bind(2) step. I believe this happens when tests are run in parallel and another process on the same host happens to bind the same port in the short window between closing the `TCPServer` and calling `TCPSocket.new`. To address this race condition, the test now retries with a newly selected available port when such a conflict occurs.
2026-01-07[ruby/rubygems] bin/rubocop -AHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/e3f418aa11
2026-01-07[ruby/rubygems] Bundler: validate more options for add sub-commandTakuya Noguchi
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com> https://github.com/ruby/rubygems/commit/6ca2e28680
2026-01-07[ruby/rubygems] Fix dependency source bug in bundlereileencodes
I stumbled across a bundler bug that had me scratching my head for awhile, because I hadn't experienced it before. In some cases when changing the source in a gemfile from a `Source::Gemspec` to either a `Source::Path` or `Source::Git` only the parent gem will have it's gem replaced and updated and the child components will retain the original version. This only happens if the gem version of the `Source::Gemspec` and `Source::Git` are the same. It also requires another gem to share a dependency with the one being updated. For example if I have the following gemfile: ``` gem "rails", "~> 8.1.1" gem "propshaft" ``` Rails has a component called `actionpack` which `propshaft` depends on. If I change `rails` to point at a git source (or path source), only the path for `rails` gets updated: ``` gem "rails", github: "rails/rails", branch: "8-1-stable" gem "propshaft" ``` Because `actionpack` is a dependency of `propshaft`, it will remain in the rubygems source in the lock file WHILE the other gems are correctly pointing to the git source. Gemfile.lock: ``` GIT remote: https://github.com/rails/rails.git revision: https://github.com/ruby/rubygems/commit/9439f463e0ef branch: 8-1-stable specs: actioncable (8.1.1) ... actionmailbox (8.1.1) ... actionmailer (8.1.1) ... actiontext (8.1.1) ... activejob (8.1.1) ... activemodel (8.1.1) ... activerecord (8.1.1) ... activestorage (8.1.1) ... rails (8.1.1) ... railties (8.1.1) ... GEM remote: https://rubygems.org/ specs: action_text-trix (2.1.15) railties actionpack (8.1.1) <===== incorrectly left in Rubygems source ... ``` The gemfile will contain `actionpack` in the rubygems source, but will be missing in the git source so the path will be incorrect. A bundle show on Rails will point to the correct place: ``` $ bundle show rails /Users/eileencodes/.gem/ruby/3.4.4/bundler/gems/rails-9439f463e0ef ``` but a bundle show on actionpack will be incorrect: ``` $ bundle show actionpack /Users/eileencodes/.gem/ruby/3.4.4/gems/actionpack-8.1.1 ``` This bug requires the following to reproduce: 1) A gem like Rails that contains components that are released as their own standalone gem is added to the gemfile pointing to rubygems 2) A second gem is added that depends on one of the gems in the first gem (like propshaft does on actionpack) 3) The Rails gem is updated to use a git source, pointing to the same version that is being used by rubygems (ie 8.1.1) 4) `bundle` will only update the path for Rails component gems if no other gem depends on it. This incorrectly leaves Rails (or any gem like it) using two different codepaths / gem source code. https://github.com/ruby/rubygems/commit/dff76ba4f6
2026-01-06[ruby/rubygems] Test for removing current bundler versionSchneems
https://github.com/ruby/rubygems/commit/675342e6d0
2026-01-05Use RUBY_VERSION in specs instead of hardcoded 'Ruby 4.0.0' to make tests ↵Hiroshi SHIBATA
version-independent
2026-01-04Fix condition for UTF-8 default in magic_comment_spec.rbBenoit Daloze
2026-01-04UNIXSocket#recvfrom only returns the path on LinuxBenoit Daloze
* Notably it does not on BSD, macOS and Windows.
2026-01-04Remove assertion which does not holdBenoit Daloze
* https://github.com/ruby/ruby/actions/runs/20694508956/job/59407571754 1) UNIXSocket.pair emulates unnamed sockets with a temporary file with a path FAILED Expected "C:\\a\\_temp\\102424668889-2384.($)".match? /\\AppData\\Local\\Temp\\\d+-\d+\.\(\$\)\z/ to be truthy but was false
2026-01-04Get better error if UNIXSocket.socketpair spec failsBenoit Daloze
2026-01-04Update to ruby/spec@94dbd55Benoit Daloze
2026-01-04Update to ruby/spec@f54296dBenoit Daloze
2025-12-30Update version guards in ruby/specBenoit Daloze
2025-12-30[Bug #21784] Fix the Proc#source_location start_column for stabby lambdasBenoit Daloze
* Consistent with plain `blocks` and `for` blocks and methods where the source_location covers their entire definition. * Matches the documentation which mentions "where the definition starts/ends". * Partially reverts d357d50f0a74409446f4cccec78593373f5adf2f which was a workaround to be compatible with parse.y.
2025-12-30Reapply "[Feature #6012] Extend `source_location` for end positionBenoit Daloze
* This reverts commit 065c48cdf11a1c4cece84db44ed8624d294f8fd5. * This functionality is very valuable and has already taken 14 years to agree on the API. * Let's just document it's byte columns (in the next commit). * See https://bugs.ruby-lang.org/issues/21783#note-9
2025-12-29Remove deprecated support for to_set taking argumentsJeremy Evans
2025-12-26Remove `rb_iterate` deprecated since 1.9Nobuyoshi Nakada
2025-12-26Added ruby_41? platformHiroshi SHIBATA
2025-12-26Start to develop 4.1.0.devHiroshi SHIBATA
2025-12-23Merge RubyGems 4.0.3 and Bundler 4.0.3Hiroshi SHIBATA
2025-12-20Revert pack/unpack support for LEB128Nobuyoshi Nakada
https://bugs.ruby-lang.org/issues/21785#note-10 > It is too late to introduce it in Ruby 4.0, let's aim for 4.1. This reverts commits: * d0b72429a93e54f1f956b4aedfc25c57dc7001aa Add support for signed and unsigned LEB128 to pack/unpack. * 68a900e30b4ca1537d7975c3a619fd94fca7b084 add news for pack / unpack directives
2025-12-19Just passing FDs does not need to create IO objectsNobuyoshi Nakada
2025-12-19Extract `Test::JobServer` moduleNobuyoshi Nakada
A placeholder to handle GNU make jobserver option. spec/default.mspec didn't handle the jobserver using a FIFO.
2025-12-18Add support for signed and unsigned LEB128 to pack/unpack.Aaron Patterson
This commit adds a new pack format command `R` and `r` for unsigned and signed LEB128 encoding. The "r" mnemonic is because this is a "vaRiable" length encoding scheme. LEB128 is used in various formats including DWARF, WebAssembly, MQTT, and Protobuf. [Feature #21785]
2025-12-18Update bundled bigdecimal and rbs (#15611)tomoya ishida
* Bundle rbs-3.10.0.pre.1 * Update rbs gem entry with commit hash Updated rbs entry to include commit hash. * Fix rbs entry in bundled_gems * Update rbs gem to version 3.10.0.pre.2 Updated rbs gem version from 3.10.0.pre.1 to 3.10.0.pre.2. * Update bundled bigdecimal to v4.0.1 --------- Co-authored-by: Soutaro Matsumoto <matsumoto@soutaro.com>
2025-12-17Bundle RubyGems 4.0.2 and Bundler 4.0.2Hiroshi SHIBATA
2025-12-16Box: fix the class name in testsNobuyoshi Nakada
2025-12-16Revert "[Feature #6012] Extend `source_location` for end positionNobuyoshi Nakada
and columns" This reverts commit 073c4e1cc712064e626914fa4a5a8061f903a637. https://bugs.ruby-lang.org/issues/6012#note-31 > we will cancel this feature in 4.0 because of design ambiguities > such as whether to return column positions in bytes or characters as > in [#21783]. [#21783]: https://bugs.ruby-lang.org/issues/21783
2025-12-16[ruby/rubygems] Pass down value of `BUNDLE_JOBS` to RubyGems before compiling:Edouard CHIN
- ### Problem Since https://github.com/ruby/rubygems/pull/9131, we are now compiling make rules simultaneously. The number of jobs is equal to the number of processors. This may be problematic for some users as they want to control this value. ### Solution The number of jobs passed to `make` will now be equal to the `BUNDLE_JOBS` value. ### Side note It's also worth to note that since Bundler installs gems in parallel, we may end up running multiple `make -j<JOB>` in parallel which would cause exhaust the number of processors we have. This problem can be fixed by implementing a GNU jobserver, which I plan to do. But I felt that this would be too much change in one PR. https://github.com/ruby/rubygems/commit/d51995deb9
2025-12-16[ruby/rubygems] Fix quote handling in mise format ruby version parsinghituzi no sippo
The previous regex didn't properly match quoted strings it would capture the opening quote as part of the version if quotes were mismatched. This change properly parses double-quoted, single-quoted, and unquoted version strings separately. https://github.com/ruby/rubygems/commit/81e48c8185
2025-12-16[ruby/rubygems] Support single quotes in mise format ruby versionhituzi no sippo
https://github.com/ruby/rubygems/commit/a7d7ab39dd
2025-12-16[ruby/rubygems] Allow to show cli_help with bundler executableHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/a091e3fd10
2025-12-16[ruby/rubygems] Tweak the Bundler's "X gems now installed message":Edouard CHIN
- Fix https://github.com/ruby/rubygems/pull/9188 - This message is a bit misleading because it always outputs one extra specs, which is Bundler itself. This is now fixed when the message is about to be output. https://github.com/ruby/rubygems/commit/70b4e19506
2025-12-16[ruby/rubygems] Allow bundle pristine to work for git gems in the same repo:Edouard CHIN
- Fix https://github.com/ruby/rubygems/pull/9186 - ### Problem Running `bundle pristine` in a Gemfile where there is many git gem pointing to the same repository will result in a error "Another git process seems to be running in this repository". ### Context This error is a regression since https://github.com/ruby/rubygems/commit/a555fd6ccd17 where `bundle pristine` now runs in parallel which could lead to running simultaneous git operations in the same repository. ### Solution When Bundler pristine a git gem it does a `git reset --hard` without specifying a path. This means the whole repository will be reset. In this case, we can leverage that by just pristining one gem per unique git sources. This is also more efficient. https://github.com/ruby/rubygems/commit/710ba514a8
2025-12-10Add `NUM2PTR` and `PTR2NUM` macrosNobuyoshi Nakada
These macros have been defined here and there, so collect them.