3437 Commits
Author SHA1 Message Date
Gil DesmaraisandJeremy Evans 1533c10971 Preserve compare_by_identity in some Set operations
Backport of f069efc3f6

Fixes [Bug #22174]

Co-authored-by: Jeremy Evans <code@jeremyevans.net>
2026-09-24 11:19:06 -07:00
Takashi Kokubun 52d03132e8 Use the raise_error matcher in symbol_spec.rb
`should.raise` needs SpecPositiveOperatorMatcher#raise, which the mspec
vendored on this branch does not define.  Without it, `should` with no
argument returns the operator matcher, whose #method_missing forwards to
`@actual.__send__(:raise, ...)`; a Proc has no #raise, so it reached
Kernel#raise and the spec raised the very error it meant to assert:

  A Symbol literal raises an EncodingError when an interpolated symbol
  has invalid bytes ERROR
  EncodingError: invalid symbol in encoding UTF-8 :"\xFF"

Use raise_error, which this mspec does support, so the un-quarantined
spec asserts instead of raising.

Follow-up to 1e7d45210e [Backport #22303],
which took the spec change from 5831948a66
along with the `intern` fix.
2026-09-14 16:07:15 -07:00
Takashi Kokubun 1e7d45210e merge revision(s) 5831948a66: [Backport #22303]
[PATCH] Fix the `intern` VM instruction to be `leaf=false` (also in YJIT, ZJIT)

	rb_str_intern can raise EncodingError and call its initializer.
	This call can push a Ruby frame.

	Fix in the VM, YJIT, and ZJIT.
2026-09-14 12:48:48 -07:00
Hiroshi SHIBATAandClaude Opus 5 8c6c731547 Merge RubyGems/Bundler 4.0.20
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-08 09:25:43 -07:00
Hiroshi SHIBATAandClaude Opus 5 8aad2b9b57 Merge RubyGems/Bundler 4.0.19
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-08 09:25:43 -07:00
Hiroshi SHIBATAandClaude Opus 5 b667732024 Merge RubyGems/Bundler 4.0.18
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-08 09:25:43 -07:00
Hiroshi SHIBATAandClaude Opus 5 5853985383 Merge RubyGems/Bundler 4.0.17
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-08 09:25:43 -07:00
Hiroshi SHIBATA 7329bd121e Merge RubyGems/Bundler 4.0.16 2026-07-13 17:20:58 -07:00
Hiroshi SHIBATA 66893ba75a Merge RubyGems/Bundler 4.0.15 2026-07-13 17:20:58 -07:00
Hiroshi SHIBATA 2bfa562097 Merge RubyGems/Bundler 4.0.14 2026-07-13 17:20:58 -07:00
Takashi Kokubun 10b2ee7f1c merge revision(s) ef67c37750: [Backport #22133]
[PATCH] Respect `handle_interrupt` for default `SIGINT`. (#17533)

	[[Bug #22133]]
2026-07-13 16:52:10 -07:00
Hiroshi SHIBATAandClaude Fable 5 4bee28a893 Disable git background maintenance in bundler specs
Since Git 2.46, commands like `git commit` spawn a detached
`git maintenance run --auto` process, which briefly creates
`.git/objects/maintenance.lock`. Specs copying a just-committed
repository with FileUtils.cp_r can hit the lock file disappearing
between readdir and lstat, causing flaky Errno::ENOENT failures on
macOS CI runners with newer Git.

https://github.com/ruby/ruby/actions/runs/28764006107/job/85284933867

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 08:05:05 +09:00
Hiroshi SHIBATA 6c080d71bc Merge RubyGems/Bundler 4.0.13 2026-06-03 16:56:21 -07:00
Hiroshi SHIBATA c74ca5c5c1 Merge RubyGems/Bundler 4.0.12 2026-06-03 16:56:21 -07:00
Hiroshi SHIBATA 56058d238b Merge RubyGems/Bundler 4.0.11 2026-06-03 16:56:21 -07:00
Hiroshi SHIBATA 949bee21ff Add ruby_version_is guard to CVE-2019-8322 spec for changing displayed message 2026-04-08 15:49:38 -07:00
Hiroshi SHIBATA 4edfd93c0a Merge RubyGems/Bundler 4.0.10 2026-04-08 15:49:38 -07:00
Hiroshi SHIBATA dc13b5adc9 Merge RubyGems/Bundler 4.0.9 2026-04-08 15:49:38 -07:00
Hiroshi SHIBATA 36084c2457 Merge RubyGems/Bundler 4.0.8 2026-04-08 15:49:38 -07:00
Hiroshi SHIBATA f13b391174 Merge RubyGems/Bundler 4.0.7 2026-04-08 15:49:38 -07:00
Takashi Kokubun 7ba583d753 merge revision(s) c27ae8d91a, b6e6ccc6c2, cbca59377e: [Backport #21844]
[ruby/psych] Remove excessive check of message

	Make `Data#initialize` reject `Integer` keys

	[Bug #21844] Fix error message
2026-04-03 20:20:44 -07:00
Mike Dalessio 0768f08caf Fix UnboundMethod#== for methods from included/extended modules [Backport #21873]
Method#unbind clones the method entry, preserving its defined_class.
For methods mixed in via include/extend, defined_class is an ICLASS,
causing UnboundMethod#== to return false when comparing against the
same method obtained via Module#instance_method.

Resolve ICLASS defined_class in method_eq.

[Bug #21873]
2026-02-10 10:32:51 -08:00
Hiroshi SHIBATA e025c839ac Merge RubyGems/Bundler 4.0.6 2026-02-09 17:38:24 -08:00
Hiroshi SHIBATA 87b544b8c4 Merge RubyGems/Bundler 4.0.5 2026-02-09 17:38:24 -08:00
Hiroshi SHIBATA 91a4926c9a Merge RubyGems/Bundler 4.0.4 2026-02-09 17:38:24 -08:00
Hiroshi SHIBATA 310da6cd91 Added example for bundle/inline 2026-01-20 10:49:33 -08:00
Hiroshi SHIBATA 1c3ef27191 Merge RubyGems 4.0.3 and Bundler 4.0.3 2025-12-23 16:10:04 +09:00
Nobuyoshi Nakada 77c3a9e447 Revert pack/unpack support for LEB128
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:

* d0b72429a9
  Add support for signed and unsigned LEB128 to pack/unpack.

* 68a900e30b
  add news for pack / unpack directives
2025-12-20 16:59:51 +09:00
Nobuyoshi Nakada 6f6ea70dce Just passing FDs does not need to create IO objects 2025-12-19 13:36:43 +09:00
Nobuyoshi Nakada bfba65d8c1 Extract Test::JobServer module
A placeholder to handle GNU make jobserver option.
spec/default.mspec didn't handle the jobserver using a FIFO.
2025-12-19 13:36:42 +09:00
Aaron Patterson d0b72429a9 Add support for signed and unsigned LEB128 to pack/unpack.
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-18 14:42:47 -08:00
tomoya ishidaandSoutaro Matsumoto 7e13fbc0ed Update bundled bigdecimal and rbs (#15611)
* 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-18 03:04:49 +09:00
Hiroshi SHIBATA 3b66efda52 Bundle RubyGems 4.0.2 and Bundler 4.0.2 2025-12-17 12:12:34 +09:00
Nobuyoshi Nakada 85b40c5ea8 Box: fix the class name in tests 2025-12-16 16:53:13 +09:00
Nobuyoshi Nakada 065c48cdf1 Revert "[Feature #6012] Extend source_location for end position
and columns"

This reverts commit 073c4e1cc7.

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 16:13:07 +09:00
Edouard CHIN 9f593156b6 [ruby/rubygems] Pass down value of BUNDLE_JOBS to RubyGems before compiling:
- ### 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 04:21:49 +00:00
hituzi no sippo f3b9509b52 [ruby/rubygems] Fix quote handling in mise format ruby version parsing
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 03:56:22 +00:00
hituzi no sippo 3b50f4ba41 [ruby/rubygems] Support single quotes in mise format ruby version
https://github.com/ruby/rubygems/commit/a7d7ab39dd
2025-12-16 03:56:21 +00:00
Hiroshi SHIBATA 060199910a [ruby/rubygems] Allow to show cli_help with bundler executable
https://github.com/ruby/rubygems/commit/a091e3fd10
2025-12-16 02:36:10 +00:00
Edouard CHIN ff1b8ffa61 [ruby/rubygems] Tweak the Bundler's "X gems now installed message":
- 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 00:16:15 +00:00
Edouard CHIN f88e797090 [ruby/rubygems] Allow bundle pristine to work for git gems in the same repo:
- 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-16 00:15:57 +00:00
Nobuyoshi Nakada 3636277dc5 Add NUM2PTR and PTR2NUM macros
These macros have been defined here and there, so collect them.
2025-12-10 12:09:50 +09:00
Nobuyoshi Nakada f9eb0d8da2 Use ruby_version_is
As the markers for spec/mspec/tool/remove_old_guards.rb.
2025-12-10 09:22:09 +09:00
Jeremy Evans e436dba9fe Use rb_error_frozen_object in rb_class_modify_check
This provides information on the class of the frozen object. It also
results in a much simpler implementation.

Fixes [Bug #21374]
2025-12-10 07:35:50 +09:00
Hiroshi SHIBATA 875c4c7dfd [ruby/rubygems] Bump Bundler version to 4.0.1
(cherry picked from commit https://github.com/ruby/rubygems/commit/26c1db5a65a8)

https://github.com/ruby/rubygems/commit/bbb5b767d0
2025-12-09 12:09:52 +00:00
Edouard CHIN 12c16f9ded [ruby/rubygems] Fix Bundler removing executables after creating them
When running a fresh `bundle install` with gems that contains
executables, Bundler will generate binstubs but soon after will remove
them. This is a regression introduced in https://github.com/ruby/rubygems/commit/573ffad3ea4a.

This results in doing `bundle install && bundle exec foo` to raise an
error saying `foo` couldn't be found.

This issue only appears if `BUNDLE_CLEAN` is set.

At the end of the installation process, when Bundler has installed
gems and generated binstubs, it runs the cleanup.

1. It [detects](https://github.com/ruby/rubygems/blob/4f8aa3b40cded3465bb2cd761e9ce7f8673b7fcb/bundler/lib/bundler/runtime.rb#L182) the executable for the current specs
2. Any existing executables not detected is then removed https://github.com/ruby/rubygems/blob/4f8aa3b40cded3465bb2cd761e9ce7f8673b7fcb/bundler/lib/bundler/runtime.rb#L194.

The issue being that 1. now returns an empty array where as it should
return the executables of the gems from the current bundle.

The problem is in https://github.com/ruby/rubygems/commit/573ffad3ea4a where we
removed the `executables` method from the `EndpointSpecification`.
When Bundler reads the lockfile, it creates a `EndpointSpecification`
object for each spec. At this point, the EndpointSpecification doesn't
know about the `executables` of a gem. Once Bundler fetches the
`gemspec` from the remote, it swaps the the "spec" with the real one
and from here knows what executables the gem has.

Reintroduce the `executables` method and the `bindir` in the
EndpointSpecification class. From what I'm seeing, the removal
of those wasn't needed to resolve the issue where Bundler remembers
CLI flags. This is probably an oversight.

https://github.com/ruby/rubygems/commit/b47f6b0247
2025-12-09 02:01:59 +00:00
Benoit Daloze fab94ecd34 [ruby/rubygems] Fix the config suggestion in the warning for $ bundle
* `install_or_cli_help` does not exist for older Bundler like Bundler 2
  and so results in a confusing error on Bundler 2:
  ```
  $ bundle
  Could not find command "".
  ```
* See https://github.com/ruby/rubygems/pull/9136/files#r2592366837
* Merge the behavior of `install_or_cli_help` in `install`.

https://github.com/ruby/rubygems/commit/9b4819ae18
2025-12-09 01:37:50 +00:00
yoshoku 1de15815a8 [ruby/rubygems] Fix native extension loading in newgem template for RHEL-based systems
Add fallback to `require` when `require_relative` fails to load native
extensions. This addresses an issue on RHEL-based Linux distributions
where Ruby scripts and built native extension shared libraries are
installed in separate directories.

https://github.com/ruby/rubygems/commit/68599bd107
2025-12-08 07:03:32 +00:00
Nobuyoshi Nakada f4f5f0a009 Add error case tests for File.path
- for non-String argument
- for NUL-contained argument
- for ASCII-incompatible argument
2025-12-06 19:32:14 +09:00
Hiroshi SHIBATA d3a9a17b6f Skip Windows runner group warning under ruby/ruby repo 2025-12-05 11:00:40 +09:00