summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2026-04-10[ruby/rubygems] Update man pages dateEdouard CHIN
https://github.com/ruby/rubygems/commit/087625017a
2026-04-10[ruby/rubygems] fix formatting for BUNDLE_PREFER_PATCH variable in man pageIvan Kuchin
https://github.com/ruby/rubygems/commit/5bdf29f86c
2026-04-09mkmf: check for C++ compilerNobuyoshi Nakada
It may be set to "false" if usable compiler is not found.
2026-04-09mkmf: grep all occurrences in cpp outputNobuyoshi Nakada
Apple clang aborts if cpp output is closed in middle, and leaves the preprocessed source and reproduction shell script.
2026-04-09mkmf: Redirect egrep command inputNobuyoshi Nakada
2026-04-09mkmf: cpp_command in C++ modeNobuyoshi Nakada
2026-04-08[ruby/rubygems] Fix grammar in gem installer cache commentHiroshi SHIBATA
Change "and lock the mutex" to "and to lock the mutex" for correct parallel infinitive structure. https://github.com/ruby/rubygems/commit/94f9267b72 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08[ruby/rubygems] Use eq matcher instead of be for string comparison in newgem ↵Hiroshi SHIBATA
template be checks object identity which will fail for newly-allocated strings. eq checks value equality and is the correct matcher here. https://github.com/ruby/rubygems/commit/828440937b Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08[ruby/rubygems] Fix wrong expected value in Rust extension test templatesHiroshi SHIBATA
The Rust function hello("world") returns "Hello world, from Rust!" but the Ruby test templates expected "Hello earth, from Rust!", causing generated tests to fail immediately after bundle gem --ext=rust. https://github.com/ruby/rubygems/commit/8de4c041ba Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08[ruby/rubygems] Fix typos in comments and documentationHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/72bdf54b6d Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07[ruby/syntax_suggest] Rename lex to token where appropriateEarlopain
I had a bit of trouble following what is going on. Lexing produces tokens, this renames to reflect that. https://github.com/ruby/syntax_suggest/commit/d3386ab6f4
2026-04-07[ruby/syntax_suggest] Fix typo for %I delimiter checkEarlopain
Also add tests for the other types which currently don't have one https://github.com/ruby/syntax_suggest/commit/db2dca2def
2026-04-07[ruby/syntax_suggest] Remove now unnecessary `core_ext` fallbackEarlopain
https://github.com/ruby/syntax_suggest/commit/c6bd4b53e6
2026-04-07[ruby/syntax_suggest] Remove workaround for ripper not lexing the entire sourceEarlopain
Maybe ripper fixed it since then. But prism also doesn't have this problem. https://github.com/ruby/syntax_suggest/commit/8bc383b2a4
2026-04-07[ruby/syntax_suggest] Prism is always present on Ruby 3.3Earlopain
Allows to remove some compatibility code with ripper https://github.com/ruby/syntax_suggest/commit/3f2e9a7657
2026-04-07[ruby/syntax_suggest] Raise minimum supported ruby version to 3.3Earlopain
I want to start porting this to prism without the translation layer. https://github.com/ruby/syntax_suggest/commit/540d4840ab
2026-04-06[ruby/prism] Implement `on_op` for ripperEarlopain
Mostly the same as for `on_kw`. Stop comparing order for a handful of events. They are emitted by ripper in a order that is not easy for prism to replicate. For example in`foo, bar, baz = 123`, `op` for `=` is emitted before the last mass assign identifier (so `foo`, `bar`, `=`, `baz`. I don't want to replicate that if I don't have to. Same for `::` in `A::B = 123` etc. https://github.com/ruby/prism/commit/4d88aed5e9
2026-04-06[ruby/resolv] Refine `Resolv::LOC::Alt#to_s`Nobuyoshi Nakada
Extract the first element instead of `join.to_i` (`String#unpack1` is available since ruby 2.4.0, but this gem still supports 2.3). https://github.com/ruby/resolv/commit/f518da95ae
2026-04-06[ruby/resolv] Tighten argument check in `Resolv::LOC::Alt.create`Nobuyoshi Nakada
Limit the range from -100 km to the upper limit of the 32-bit representation. https://github.com/ruby/resolv/commit/e6dfbe7cb0
2026-04-06[ruby/resolv] Fix centimeters representation in `Resolv::LOC::Size#to_s`Nobuyoshi Nakada
`Size` smaller than 1m was represented as rational. ```ruby Resolv::LOC::Size.create("0.01m").to_s #=> "1/100m" ``` Fix to represent in the proper form for `create`. https://github.com/ruby/resolv/commit/2ff9e0585d
2026-04-06[ruby/resolv] Tighten argument check in `Resolv::LOC::Size.create`Nobuyoshi Nakada
Limit the size to between 0cm and less than 100,000km. https://github.com/ruby/resolv/commit/9d9e0c3044
2026-04-06[ruby/resolv] Fix subsecond representation in `Resolv::LOC::Coord#to_s`Nobuyoshi Nakada
- Leading zeros in fractional part are significant, must not be suppressed. - Use `Integer#divmod` to calculate division and module at once. - Use simple comparison for exact match than regexp. https://github.com/ruby/resolv/commit/0e3109ca3b
2026-04-06[ruby/resolv] Tighten argument check in `Resolv::LOC::Coord.create`Nobuyoshi Nakada
Limit the east-west direction to 180 degrees or less and the north-south direction to 90 degrees or less, respectively. https://github.com/ruby/resolv/commit/8075a1fe76
2026-04-06[ruby/resolv] Fix `Resolv::LOC::Coord` hemisphere calculationNobuyoshi Nakada
Fix `Resolv::LOC::Coord.create` hemisphere handling for LOC coordinates. `hemi` was always `1` because `m[4]` matched `([NESW])`. https://github.com/ruby/resolv/commit/043b5bf624
2026-04-06[ruby/resolv] Use `Regexp#match` to achieve matched dataNobuyoshi Nakada
This method is available since ruby 1.9.0. https://github.com/ruby/resolv/commit/1e05d06fbd
2026-04-06[ruby/resolv] Use early return and remove useless assignmentsNobuyoshi Nakada
https://github.com/ruby/resolv/commit/451d3f367c
2026-04-05[ruby/prism] Adapt `ParametersNode#signature` to `ErrorRecoveryNode`Earlopain
No need to list them all out anymore, it's just a single possibility now https://github.com/ruby/prism/commit/893f2734cb
2026-04-02[ruby/rubygems] Handle empty result gracefully in gem pristine ↵Hiroshi SHIBATA
--only-missing-extensions When no gems have missing extensions (e.g. on JRuby where missing_extensions? always returns false), display an informational message instead of raising Gem::Exception. https://github.com/ruby/rubygems/commit/738d2dbdf6 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02[ruby/rubygems] Skip missing_extensions? check on JRubyHiroshi SHIBATA
JRuby does not require extension rebuilds when switching JRuby or Java versions because Java extensions are shipped pre-compiled and JRuby does not expose a version-specific C API. This means missing_extensions? returning true on JRuby is almost always a false positive and the suggested `gem pristine` is not actionable. Return false early from missing_extensions? on JRuby so that all downstream warnings and ignored-spec filtering are suppressed at the source rather than patching each warning site individually. https://github.com/ruby/rubygems/commit/ba5c7cc0ce Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02[ruby/rubygems] Use IO.copy_stream to drain remaining gzip data instead of readHiroshi SHIBATA
Replace gzio.read with IO.copy_stream(gzio, IO::NULL) to avoid allocating a potentially large string when discarding unconsumed compressed data. https://github.com/ruby/rubygems/commit/e4d0196887 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02[ruby/rubygems] Consume remaining gzip data in open_tar_gz to suppress zlib ↵Hiroshi SHIBATA
warning When a GzipReader is closed before all compressed data is consumed, zlib emits "attempt to close unfinished zstream; reset forced" warning. This happens in open_tar_gz because the TarReader stops reading at the end-of-archive marker, leaving unconsumed compressed data in the stream. https://github.com/ruby/rubygems/commit/2b047e11fc Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01[ruby/prism] Emit `on_kw` for ripperEarlopain
`yard` uses it Start checking against the ordering of the events and also their location. I didn't fix any of the preexisting failures and just ignored them. Some are easy to fix, others look like particularities of ripper that I don't think anyone would rely on. https://github.com/ruby/prism/commit/4cba29d282
2026-04-01[ruby/rubygems] Use gem exec --conservative for sigstore-cli instead of ↵Hiroshi SHIBATA
pinning version Hardcoding sigstore-cli:0.2.2 meant rubygems would need a new release whenever sigstore-cli ships a new version. Using --conservative lets gem exec prefer an already-installed version and falls back to the latest when sigstore-cli is not yet installed. https://github.com/ruby/rubygems/commit/6ac00f34de Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01[ruby/rubygems] Normalize host comparison in attestation_supported_host?Hiroshi SHIBATA
The method compared against a hardcoded string, so a trailing slash (e.g. "https://rubygems.org/") would cause auto-attestation to be silently skipped. Now we chomp the trailing slash and compare against Gem::DEFAULT_HOST to be consistent with the rest of the codebase. https://github.com/ruby/rubygems/commit/a4fa24c8cf Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01[ruby/rubygems] Show only error message on attestation failure unless verboseHiroshi SHIBATA
When auto-attestation fails, the warning previously included e.full_message with a full backtrace that could be noisy and expose local paths. Now only e.message is shown by default, and the full backtrace is included only when Gem.configuration.really_verbose is set. https://github.com/ruby/rubygems/commit/4a4d9b8911 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01[ruby/rubygems] Honor explicit --attestation option regardless of platform ↵Hiroshi SHIBATA
and host The send_push_request method previously skipped all attestation handling on JRuby, non-rubygems.org hosts, or outside GitHub Actions. This meant that even when a user explicitly passed --attestation with a local sigstore bundle, the attestation was silently ignored. Now we check options[:attestations] first and always use them when provided, only gating the auto-attestation path behind the platform/host/CI checks. https://github.com/ruby/rubygems/commit/0178a0dc56 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01[ruby/rubygems] Reverse to use attestation conditionHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/ea1f43c4ae
2026-04-01[ruby/rubygems] Use Tempfile for auto-attestation bundles and clean up after usecopilot-swe-agent[bot]
https://github.com/ruby/rubygems/commit/498401c010 Co-authored-by: hsbt <12301+hsbt@users.noreply.github.com>
2026-04-01[ruby/rubygems] Refactor push request to support attestationsHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/74924da660
2026-04-01[ruby/rubygems] Merge rubygems-attestation-patch.rb from rubygems/release-gemHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/64f085f5ee
2026-04-01[ruby/rubygems] Improve error message when current platform is not in lockfileKenta Ishizaki
Fixes https://github.com/ruby/rubygems/pull/9413 https://github.com/ruby/rubygems/commit/02d2179047
2026-03-31[ruby/rubygems] Skip checksum for the bundler gem if no `bundler.gem` exists ↵Edouard CHIN
on disk: - ### Problem This change is purely to fix a problem when developing Bundler. When we tried to release Bundler 4.0.9, we bumped the VERSION from `4.1.0.dev` to `4.0.9`, this condition now evaluates to false https://github.com/ruby/rubygems/blob/34d19fa8a3f84c50e2ba65e0f39c80045e7cbfb8/bundler/lib/bundler/lockfile_generator.rb#L106. We then ended up with a CI crash. ``` Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/runner/work/rubygems/rubygems/cache/bundler-4.0.9.gem ``` ### Context Computing a checksum for the `bundler` gem is only possible when the `bundler.gem` binary exists on disk. When a regular user interacts with `bundler`, the spec is loaded from disk and an associated cached `bundler.gem` should exists. However, when developing Bundler, the spec doesn't come from disk but from a fake spec https://github.com/ruby/rubygems/blob/34d19fa8a3f84c50e2ba65e0f39c80045e7cbfb8/bundler/lib/bundler/source/metadata.rb#L22-L28 that with no associated `bundler.gem`. ### Solution To prevent CI from breaking whenever we make a release, we have to skip computing a checksum if no `bundler.gem` exists. https://github.com/ruby/rubygems/commit/01e0e61612
2026-03-30[DOC] Doc for Pathname class (#16352)Burdette Lamar
2026-03-30[ruby/rubygems] Restore rb_sys dependency for Rust방성범 (Bang Seongbeom)
https://github.com/ruby/rubygems/commit/7cd3b9a08a
2026-03-27[ruby/prism] Nodoc the ripper shimEarlopain
It appears in documentation on https://docs.ruby-lang.org/ under `Object::Ripper` https://github.com/ruby/prism/commit/6c1000661c
2026-03-27[ruby/prism] Also handle string conversion in `Ripper.lex`Earlopain
In `ripper`, both go through the same converion logic. Needed for rspec, no other failures in their own tests https://github.com/ruby/prism/commit/510258aa2b
2026-03-27[ruby/prism] Implement various string start/end events for ripperEarlopain
`tstring_beg` in particular is needed by `yard`. Before: > 1980 examples, 606 failures, 15 pending After: > 1980 examples, 582 failures, 15 pending Thought it would be more, but oh well. It needs `on_sp` which I guess is why there are not many new passes https://github.com/ruby/prism/commit/e1b18cb582
2026-03-26[ruby/rubygems] Better algorithm for sorting gem version:Edouard CHIN
- In #9414 I introduced a fast path to compare gem version. The implementation has a couple of caveats such as not computing a sort key for gems having more than 4 segments (major, minor, patch, security), as well as skipping gems that uses a "timestamped" version (such as 0.0.1.https://github.com/ruby/rubygems/commit/202230081030). The implementation also had to iterate over the segments couple of times. There were some concerns from some users that some gems such as sorbet (currentlt at version 0.6.13055) would at somepoint reach the thresold where we don't compute a sort key (any segment > 65_000). We can instead use a Mixed-radix solution which is more elegant and solve some of those issues (we still don't compute a sort key for timestamped version gems as the integer value may be larger than what we compute for a gem that has a higher version, such as 0.1.0). https://github.com/ruby/rubygems/commit/f8e37e6e2d Co-authored-by: Ufuk Kayserilioglu <ufuk@paralaus.com>
2026-03-26[ruby/rubygems] Update SPDX license list as of 2026-02-20License Update
https://github.com/ruby/rubygems/commit/b29d554643
2026-03-26[ruby/rubygems] Register native extension files in default spec mapHiroshi SHIBATA
Default gem gemspecs list native extension files (e.g. date_core.bundle) without the require path prefix (lib/). In new_format mode, register_default_spec skipped these files because they didn't match the prefix pattern, causing find_default_spec to return nil for them. This led to activation conflicts when a regular gem version of the same gem was also installed: the require fallback path (find_in_unresolved_tree) would find the native extension in the regular gem and try to activate it, conflicting with the already-activated default gem. Fix by also registering non-prefixed files that have a native extension suffix (e.g. .bundle, .so), while still skipping non-requirable files (README, ext/ sources, etc.). https://github.com/ruby/rubygems/commit/023fcae74f Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>