15080 Commits

Author SHA1 Message Date
zverok
9154d72a3e Improve CGI.escape* docs 2025-12-24 11:21:11 +09:00
Hiroshi SHIBATA
1c3ef27191 Merge RubyGems 4.0.3 and Bundler 4.0.3 2025-12-23 16:10:04 +09:00
Yusuke Endoh
8eaf6739fd [ruby/error_highlight] Bump version
https://github.com/ruby/error_highlight/commit/dc2dad6632
2025-12-23 13:03:02 +09:00
Kevin Newton
5c0c0dd873 [ruby/prism] Bump to v1.7.0
https://github.com/ruby/prism/commit/21c499d6e4
2025-12-18 19:58:53 -05:00
Earlopain
76248400b7 [ruby/prism] Add Ruby 4.1 as a version specifier
https://github.com/ruby/prism/commit/138db9ccc4
2025-12-18 19:58:53 -05:00
Hiroshi SHIBATA
0e85881e0c [ruby/delegate] v0.6.1
https://github.com/ruby/delegate/commit/90ffceb6d6
2025-12-18 16:46:29 +09:00
Hiroshi SHIBATA
0006591407 Reapply "Merge pull request #52 from ruby/revert-49"
This reverts commit 02e4b58b615d0dd83a6af5cd7c2b8861724011ee.
2025-12-18 16:46:29 +09:00
Hiroshi SHIBATA
2fcad967aa Revert "Allow use of DelegateClass in ractor"
This reverts commit 6e0f2b31f0f4a2a942f3c1daad1bb64852fe6815.
2025-12-18 16:46:29 +09:00
Hiroshi SHIBATA
1e69d688e5 [ruby/delegate] v0.6.0
https://github.com/ruby/delegate/commit/aef34e8c8b
2025-12-18 16:46:29 +09:00
Luke Gruber
e6ca8908c1 Allow use of DelegateClass in ractor
Use `eval` instead of `define_method` when defining delegate methods for
`DelegateClass`.
2025-12-18 16:46:29 +09:00
Hiroshi SHIBATA
a21fe2adfe [ruby/delegate] Reapply "Merge pull request #46 from byroot/use-forward-send"
This reverts commit https://github.com/ruby/delegate/commit/fc2bd0498af0.

https://github.com/ruby/delegate/commit/7d5c1e0842

Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
2025-12-18 16:46:29 +09:00
Hiroshi SHIBATA
bdf99bf0dc [ruby/delegate] v0.5.0
https://github.com/ruby/delegate/commit/fa35b20eca
2025-12-18 16:46:29 +09:00
Luke Gruber
01e9f95cc3 [ruby/delegate] Allow use of DelegateClass in ractors
Tempfile uses DelegateClass and Tempfile should be able to be used
by different ractors.

https://github.com/ruby/delegate/commit/cad194260b
2025-12-18 16:46:29 +09:00
Yusuke Endoh
aee4b24829 [ruby/error_highlight] Show no message when failing to get caller/callee snippets
Even with Ruby 4.0, snippets is not always available, such as in irb by
default. It would be better to just say nothing than to show a confusing
message.

https://github.com/ruby/error_highlight/commit/ef80ce73a1
2025-12-17 21:11:27 +09:00
Hiroshi SHIBATA
26447b3597 [ruby/net-http] v0.9.1
https://github.com/ruby/net-http/commit/8cee86e939
2025-12-17 15:47:43 +09:00
Kazuki Yamaguchi
b80fc8bd84 [ruby/net-http] Freeze more constants for Ractor compatibility
Freeze Net::HTTP::SSL_ATTRIBUTES and IDEMPOTENT_METHODS_. Both constants
have been marked as :nodoc:.

Together with https://github.com/ruby/openssl/issues/521, this enables
HTTPS clients in non-main Ractors on Ruby 4.0.

https://github.com/ruby/net-http/commit/f24b3b358b
2025-12-17 15:47:43 +09:00
Hiroshi SHIBATA
fedafec78b [ruby/net-http] v0.9.0
https://github.com/ruby/net-http/commit/3ccf0c8e6a
2025-12-17 15:47:43 +09:00
Hiroshi SHIBATA
8e25812194 [ruby/timeout] v0.6.0
https://github.com/ruby/timeout/commit/ab79dfff47
2025-12-17 15:47:43 +09:00
Hiroshi SHIBATA
01624492ec [ruby/time] v0.4.2
https://github.com/ruby/time/commit/387292f5d2
2025-12-17 15:47:43 +09:00
Misaki Shioi
7b5691c3b0
Socket.tcp and TCPSocket.new raises IO::TiemoutError with user specified timeout (#15602)
* `Socket.tcp` and `TCPSocket.new` raises `IO::TiemoutError` with user specified timeout

In https://github.com/ruby/ruby/pull/11880, `rsock_connect()` was changed to raise `IO::TimeoutError` when a user-specified timeout occurs.
However, when `TCPSocket.new` attempts to connect to multiple destinations, it does not use `rsock_connect()`, and instead raises `Errno::ETIMEDOUT` on timeout.
As a result, the exception class raised on timeout could differ depending on whether there were multiple destinations or not.

To align this behavior with the implementation of `rsock_connect()`, this change makes `TCPSocket.new` raise `IO::TimeoutError` when a user-specified timeout occurs.
Similarly, `Socket.tcp` is updated to raise `IO::TimeoutError` when a timeout occurs within the method.
(Note that the existing behavior of `Addrinfo#connect_internal`, which Socket.tcp depends on internally and which raises `Errno::ETIMEDOUT` on timeout, is not changed.)

* [ruby/net-http] Raise `Net::OpenTimeout` when `TCPSocket.open` raises `IO::TimeoutError`.

With the changes in https://github.com/ruby/ruby/pull/15602, `TCPSocket.open` now raises `IO::TimeoutError` when a user-specified timeout occurs.
This change updates #connect to handle this case accordingly.

https://github.com/ruby/net-http/commit/f64109e1cf
2025-12-17 15:02:26 +09:00
Hiroshi SHIBATA
3b66efda52 Bundle RubyGems 4.0.2 and Bundler 4.0.2 2025-12-17 12:12:34 +09:00
Edouard CHIN
080bf30c48 [ruby/rubygems] Allow to specify the number of make jobs when installing gems:
- Added a new `-j` option to `gem install` and `gem update`.
  This option allows to specify the number of jobs we pass to `make`
  when compiling gem with native extensions.

  By default its the number of processors, but users may want a way
  to control this.

  You can use it like so: `gem install json -j8`

https://github.com/ruby/rubygems/commit/67aad88ca6
2025-12-16 04:21:49 +00: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
Takashi Kokubun
adf676c530 [ruby/erb] Version 6.0.1
https://github.com/ruby/erb/commit/bbde68fcd5
2025-12-15 17:15:25 +00:00
Daisuke Aritomo
fdd8bdea81 [ruby/erb] Freeze ERB::Compiler::TrimScanner::ERB_STAG
(https://github.com/ruby/erb/pull/100)

For Ractor compatibility.

https://github.com/ruby/erb/commit/43f0876595
2025-12-15 17:14:36 +00:00
eileencodes
58940377e6 [ruby/rubygems] Write gem files atomically
This change updates `write_binary` to use a new class,
`AtomicFileWriter.open` to write the gem's files. This implementation
is borrowed from Active Support's [`atomic_write`](https://github.com/rails/rails/blob/main/activesupport/lib/active_support/core_ext/file/atomic.rb).

Atomic write will write the files to a temporary file and then once
created, sets permissions and renames the file. If the file is corrupted
- ie on failed download, an error occurs, or for some other reason, the
real file will not be created. The changes made here make `verify_gz`
obsolete, we don't need to verify it if we have successfully created the
file atomically. If it exists, it is not corrupt. If it is corrupt, the
file won't exist on disk.

While writing tests for this functionality I replaced the
`RemoteFetcher` stub with `FakeFetcher` except for where we really do
need to overwrite the `RemoteFetcher`. The new test implementation is much
clearer on what it's trying to accomplish versus the prior test
implementation.

https://github.com/ruby/rubygems/commit/0cd4b54291
2025-12-15 01:15:06 +00:00
BurdetteLamar
e7cf07ba3e [DOC] Fix link in MakeMakefile 2025-12-14 17:35:26 -05:00
Earlopain
490a03bad9 [ruby/prism] Fix sexp_processor gem reference
It's https://rubygems.org/gems/sexp_processor, not https://rubygems.org/gems/sexp

https://github.com/ruby/prism/commit/b8a00a5f15
2025-12-14 21:11:21 +00:00
Ryan Davis
4a84fa1b39 [ruby/prism] Define RubyParser::SyntaxError directly and drop require for ruby_parser.
Had to add a require of sexp since that came in indirectly via ruby_parser.

https://github.com/ruby/prism/commit/df677c324f
2025-12-14 16:42:51 +00:00
Ryan Davis
bb4a6f3951 [ruby/prism] Fixed Prism::Translation::RubyParser's comment processing
Tests were failing in Flay under Prism.

https://github.com/ruby/prism/commit/af9b3640a8
2025-12-12 17:52:16 +00:00
Benoit Daloze
b49ff7cc70 [ruby/timeout] Make Timeout.timeout work in a trap handler on CRuby
* Fixes https://github.com/ruby/timeout/issues/17

https://github.com/ruby/timeout/commit/1a499a8f96
2025-12-11 13:38:35 +00:00
Benoit Daloze
9865048a34 [ruby/timeout] Encapsulate adding a timeout Request
https://github.com/ruby/timeout/commit/cb2ba88fed
2025-12-11 13:38:35 +00:00
Benoit Daloze
c678e1bdd3 [ruby/timeout] Revise Timeout.timeout docs and add a section about ensure
https://github.com/ruby/timeout/commit/7cfa5a6778
2025-12-11 13:05:40 +00:00
Benoit Daloze
46d8e6d993 [ruby/timeout] Reset the interrupt mask when creating the Timeout thread
* Add tests related to Thread.handle_interrupt
* Fixes https://github.com/ruby/timeout/issues/41

https://github.com/ruby/timeout/commit/a52720e82a
2025-12-11 13:05:39 +00:00
Hiroshi SHIBATA
278a93a1bb
This change didn't fix the original issue.
Revert "Use base: with Dir.glob for bundler.gemspec"

This reverts commit 87f0701b6106569a8486c9623dc6b0b32438355c.
2025-12-11 18:18:13 +09:00
Hiroshi SHIBATA
87f0701b61 Use base: with Dir.glob for bundler.gemspec 2025-12-11 17:57:14 +09:00
Hiroshi SHIBATA
e8a55274f2 [ruby/forwardable] v1.4.0
https://github.com/ruby/forwardable/commit/0257b590c2
2025-12-10 07:08:05 +00:00
Jean Boussier
14ff851185 [ruby/forwardable] Simpler and faster check for the delegation fastpath
Fix: https://github.com/ruby/forwardable/issues/35
[Bug #21708]

Trying to compile code to check if a method can use the delegation
fastpath is a bit wasteful and cause `RUPYOPT=-d` to be full of
misleading errors.

It's simpler and faster to use a simple regexp to do the same check.

https://github.com/ruby/forwardable/commit/de1fbd182e
2025-12-10 07:05:06 +00:00
Hiroshi SHIBATA
8e87f201cf [ruby/optparse] v0.8.1
https://github.com/ruby/optparse/commit/f2e31e81a5
2025-12-10 06:43:06 +00:00
Hiroshi SHIBATA
5f444cba47 [ruby/ipaddr] v1.2.8
https://github.com/ruby/ipaddr/commit/93ef50bc04
2025-12-10 05:22:25 +00:00
Hiroshi SHIBATA
814f23747b [ruby/resolv] v0.7.0
https://github.com/ruby/resolv/commit/a0e89bbe48
2025-12-10 05:12:32 +00:00
Hiroshi SHIBATA
0da74e0aa0 [ruby/rubygems] Bump Rubygems version to 4.0.1
(cherry picked from commit https://github.com/ruby/rubygems/commit/f3e5ebf5afe7)

https://github.com/ruby/rubygems/commit/583b0222ad
2025-12-09 12:09:53 +00: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
Benoit Daloze
99133a66f3 [ruby/net-http] Check whether TCPSocket#initialize supports open_timeout once and without exceptions
* See discussion in https://github.com/ruby/net-http/pull/224
* This check is known to work on at least CRuby, TruffleRuby and JRuby.
* Exceptions show up with `ruby -d`/`$DEBUG == true` and would show for every Net::HTTP instance.

https://github.com/ruby/net-http/commit/8c76f92779
2025-12-09 10:37:15 +00:00
Hiroshi SHIBATA
79c57d747f Fixed by misspell -w -error -source=text 2025-12-09 17:48:57 +09:00