summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2025-12-17[ruby/error_highlight] Show no message when failing to get caller/callee ↵Yusuke Endoh
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[ruby/net-http] v0.9.1Hiroshi SHIBATA
https://github.com/ruby/net-http/commit/8cee86e939
2025-12-17[ruby/net-http] Freeze more constants for Ractor compatibilityKazuki Yamaguchi
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[ruby/net-http] v0.9.0Hiroshi SHIBATA
https://github.com/ruby/net-http/commit/3ccf0c8e6a
2025-12-17[ruby/timeout] v0.6.0Hiroshi SHIBATA
https://github.com/ruby/timeout/commit/ab79dfff47
2025-12-17[ruby/time] v0.4.2Hiroshi SHIBATA
https://github.com/ruby/time/commit/387292f5d2
2025-12-17`Socket.tcp` and `TCPSocket.new` raises `IO::TiemoutError` with user ↵Misaki Shioi
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-17Bundle RubyGems 4.0.2 and Bundler 4.0.2Hiroshi SHIBATA
2025-12-16[ruby/rubygems] Allow to specify the number of `make` jobs when installing gems:Edouard CHIN
- 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[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-15[ruby/erb] Version 6.0.1Takashi Kokubun
https://github.com/ruby/erb/commit/bbde68fcd5
2025-12-15[ruby/erb] Freeze ERB::Compiler::TrimScanner::ERB_STAGDaisuke Aritomo
(https://github.com/ruby/erb/pull/100) For Ractor compatibility. https://github.com/ruby/erb/commit/43f0876595
2025-12-15[ruby/rubygems] Write gem files atomicallyeileencodes
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-14[DOC] Fix link in MakeMakefileBurdetteLamar
2025-12-14[ruby/prism] Fix `sexp_processor` gem referenceEarlopain
It's https://rubygems.org/gems/sexp_processor, not https://rubygems.org/gems/sexp https://github.com/ruby/prism/commit/b8a00a5f15
2025-12-14[ruby/prism] Define RubyParser::SyntaxError directly and drop require for ↵Ryan Davis
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-12[ruby/prism] Fixed Prism::Translation::RubyParser's comment processingRyan Davis
Tests were failing in Flay under Prism. https://github.com/ruby/prism/commit/af9b3640a8
2025-12-11[ruby/timeout] Make Timeout.timeout work in a trap handler on CRubyBenoit Daloze
* Fixes https://github.com/ruby/timeout/issues/17 https://github.com/ruby/timeout/commit/1a499a8f96
2025-12-11[ruby/timeout] Encapsulate adding a timeout RequestBenoit Daloze
https://github.com/ruby/timeout/commit/cb2ba88fed
2025-12-11[ruby/timeout] Revise Timeout.timeout docs and add a section about `ensure`Benoit Daloze
https://github.com/ruby/timeout/commit/7cfa5a6778
2025-12-11[ruby/timeout] Reset the interrupt mask when creating the Timeout threadBenoit Daloze
* Add tests related to Thread.handle_interrupt * Fixes https://github.com/ruby/timeout/issues/41 https://github.com/ruby/timeout/commit/a52720e82a
2025-12-11This change didn't fix the original issue.Hiroshi SHIBATA
Revert "Use base: with Dir.glob for bundler.gemspec" This reverts commit 87f0701b6106569a8486c9623dc6b0b32438355c.
2025-12-11Use base: with Dir.glob for bundler.gemspecHiroshi SHIBATA
2025-12-10[ruby/forwardable] v1.4.0Hiroshi SHIBATA
https://github.com/ruby/forwardable/commit/0257b590c2
2025-12-10[ruby/forwardable] Simpler and faster check for the delegation fastpathJean Boussier
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[ruby/optparse] v0.8.1Hiroshi SHIBATA
https://github.com/ruby/optparse/commit/f2e31e81a5
2025-12-10[ruby/ipaddr] v1.2.8Hiroshi SHIBATA
https://github.com/ruby/ipaddr/commit/93ef50bc04
2025-12-10[ruby/resolv] v0.7.0Hiroshi SHIBATA
https://github.com/ruby/resolv/commit/a0e89bbe48
2025-12-09[ruby/rubygems] Bump Rubygems version to 4.0.1Hiroshi SHIBATA
(cherry picked from commit https://github.com/ruby/rubygems/commit/f3e5ebf5afe7) https://github.com/ruby/rubygems/commit/583b0222ad
2025-12-09[ruby/rubygems] Bump Bundler version to 4.0.1Hiroshi SHIBATA
(cherry picked from commit https://github.com/ruby/rubygems/commit/26c1db5a65a8) https://github.com/ruby/rubygems/commit/bbb5b767d0
2025-12-09[ruby/net-http] Check whether TCPSocket#initialize supports open_timeout ↵Benoit Daloze
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-09Fixed by `misspell -w -error -source=text`Hiroshi SHIBATA
2025-12-09[ruby/rubygems] Fix Bundler removing executables after creating themEdouard CHIN
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[ruby/rubygems] Fix indentation of the info message for default_cli_commandBenoit Daloze
* It looked like: In a future version of Bundler, running `bundle` without argument will no longer run `bundle install`. Instead, the `cli_help` command will be displayed. Please use `bundle install` explicitly for scripts like CI/CD. You can use the future behavior now with `bundle config set default_cli_command cli_help --global`, or you can continue to use the current behavior with `bundle config set default_cli_command install --global`. This message will be removed after a default_cli_command value is set. Bundler version 4.0.0 (2025-12-08 commit https://github.com/ruby/rubygems/commit/9b4819ae18) * And now looks like: In a future version of Bundler, running `bundle` without argument will no longer run `bundle install`. Instead, the `cli_help` command will be displayed. Please use `bundle install` explicitly for scripts like CI/CD. You can use the future behavior now with `bundle config set default_cli_command cli_help --global`, or you can continue to use the current behavior with `bundle config set default_cli_command install --global`. This message will be removed after a default_cli_command value is set. Bundler version 4.0.0 (2025-12-08 commit https://github.com/ruby/rubygems/commit/9b4819ae18) https://github.com/ruby/rubygems/commit/979dada8f3
2025-12-09[ruby/rubygems] Fix the config suggestion in the warning for `$ bundle`Benoit Daloze
* `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-08[ruby/rubygems] Extract and generate only bundler bin files instead of full ↵Hiroshi SHIBATA
installation. https://github.com/ruby/rubygems/commit/a70e573973
2025-12-08[ruby/rubygems] Fix native extension loading in newgem template for ↵yoshoku
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[ruby/timeout] v0.5.0Hiroshi SHIBATA
https://github.com/ruby/timeout/commit/837d5aac73
2025-12-05[ruby/timeout] Simplify logic to make GET_TIME shareableBenoit Daloze
https://github.com/ruby/timeout/commit/281b2507e7
2025-12-05[ruby/timeout] Fix logic for Ractor supportBenoit Daloze
* Fix indentation to stay a multiple of 2 spaces. https://github.com/ruby/timeout/commit/a1d784cb66
2025-12-05[ruby/timeout] Fix condition and fix test to catch that broken conditionBenoit Daloze
https://github.com/ruby/timeout/commit/82fb6f6925
2025-12-05[ruby/timeout] Minor tweaksBenoit Daloze
https://github.com/ruby/timeout/commit/daab9a2193
2025-12-05[ruby/timeout] support RactorKoichi Sasada
1. Introduce State to store all status. 2. Store State instance to the Ractor local storage if possible 3. Make `GET_TIME` (Method object) shareable if possible 3 is supporeted Ruby 4.0 and later, so the Rator support is works only on Ruby 4.0 and later. https://github.com/ruby/timeout/commit/54ff671c6c
2025-12-05[ruby/net-http] open: Never call Timeout.timeout in rescue clauseDaisuke Aritomo
The try-open_timeout-then-fallback-to-timeout introduced in https://github.com/ruby/net-http/commit/1903cedd8cd0 works well, but when it errors due to any reason in Rubies which do not support `open_timeout`, it spits the rescued ArgumentError that is unrelated to user code and not actionable. Net::HTTP.start('foo.bar', 80) /.../net-http-0.8.0/lib/net/http.rb:1691:in 'TCPSocket#initialize': Failed to open TCP connection to foo.bar:80 (getaddrinfo(3): nodename nor servname provided, or not known) (Socket::ResolutionError) from /.../net-http-0.8.0/lib/net/http.rb:1691:in 'IO.open' from /.../net-http-0.8.0/lib/net/http.rb:1691:in 'block in Net::HTTP#connect' from /.../timeout-0.4.4/lib/timeout.rb:188:in 'block in Timeout.timeout' from /.../timeout-0.4.4/lib/timeout.rb:195:in 'Timeout.timeout' from /.../net-http-0.8.0/lib/net/http.rb:1690:in 'Net::HTTP#connect' from /.../net-http-0.8.0/lib/net/http.rb:1655:in 'Net::HTTP#do_start' from /.../net-http-0.8.0/lib/net/http.rb:1635:in 'Net::HTTP#start' from /.../net-http-0.8.0/lib/net/http.rb:1064:in 'Net::HTTP.start' (snip) /.../net-http-0.8.0/lib/net/http.rb:1682:in 'TCPSocket#initialize': unknown keyword: :open_timeout (ArgumentError) sock = TCPSocket.open(conn_addr, conn_port, @local_host, @local_port, open_timeout: @open_timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ from /.../net-http-0.8.0/lib/net/http.rb:1682:in 'IO.open' from /.../net-http-0.8.0/lib/net/http.rb:1682:in 'Net::HTTP#connect' from /.../net-http-0.8.0/lib/net/http.rb:1655:in 'Net::HTTP#do_start' from /.../net-http-0.8.0/lib/net/http.rb:1635:in 'Net::HTTP#start' from /.../net-http-0.8.0/lib/net/http.rb:1064:in 'Net::HTTP.start' (snip) ... 8 levels... This patch suppresses the ArgumentError by moving the retry out of the rescue clause. https://github.com/ruby/net-http/commit/86232d62f5
2025-12-05[ruby/timeout] Only the timeout method should be public on the Timeout moduleBenoit Daloze
https://github.com/ruby/timeout/commit/cd51eac3ca