Commit graph

14659 commits

Author SHA1 Message Date
David Rodríguez
e42f1aaa5a [rubygems/rubygems] Fix truffleruby failing to install sorbet-static when there's no lockfile
The generic Ruby platform was getting unconditionally added in
truffleruby, preventing resolution in situations where there's no
generic ruby version (sorbet-static). Instead, the generic platform
should be considered per dependency, not globally.

a96afc5351
2025-07-30 11:19:26 +09:00
David Rodríguez
15e9dc19fb [rubygems/rubygems] Remove JRuby workaround
Original issue was fixed in JRuby 9.3.0.0, which seems old enough for us
to remove the workaround.

d285148d39
2025-07-30 11:19:24 +09:00
David Rodríguez
a0b501effe [rubygems/rubygems] Remove out of date TODO
After digging into git history a bit, I figure this was about unifying
`bundle cache` and `bundle package`, which already happened a while ago.
So remove this TODO since it's now misleading.

5a0b06b84d
2025-07-30 11:19:23 +09:00
Earlopain
026079925c [ruby/prism] Do not use 0 to indicate the latest ruby version to parse
This makes it hard to do version checks against this value. The current version checks work because there are so few possible values at the moment.

As an example, PR 3337 introduces new syntax for ruby 3.5 and uses `PM_OPTIONS_VERSION_LATEST` as its version guard. Because what is considered the latest changes every year, it must later be changed to `parser->version == parser->version == PM_OPTIONS_VERSION_CRUBY_3_5 || parser->version == PM_OPTIONS_VERSION_LATEST`, with one extra version each year.

With this change, the PR can instead write `parser->version >= PM_OPTIONS_VERSION_CRUBY_3_5` which is self-explanatory
and works for future versions.

8318a113ca
2025-07-29 17:17:28 +00:00
Jason Garber
e15f1a71ad [ruby/tsort] Add changelog_uri to gemspec metadata
Adds a link to the GitHub Releases page for this gem consistent with other gems in the Ruby organization. Existing examples include:

- [json](https://github.com/ruby/json/blob/master/json.gemspec)
- [ostruct](https://github.com/ruby/ostruct/blob/master/ostruct.gemspec)

8086bb33bc
2025-07-28 20:14:38 +00:00
Olle Jonsson
d0bb17e079 [ruby/shellwords] shellwords.gemspec: Avoid configuring exe/ directory
This gem does not ship any executables.

7da06b91ff
2025-07-28 13:18:05 +00:00
David Rodríguez
95fdaa5c3b
(Temporarily?) delay path changes and global cache changes
There are several issues with these which I'm not sure I'll have time to
address properly. I prefer to keep our default branch in a releasable
state just in case. Once they are fixed, this can be reverted.
2025-07-28 10:01:58 +09:00
Nobuyoshi Nakada
f8e002a6b7 [ruby/English] Exclude unused files from gem
6bea25038b
2025-07-27 15:18:50 +00:00
Edouard CHIN
da3c47bcfc [rubygems/rubygems] Document missing options from man pages:
- The `bundle plugin uninstall --all` was missing.
- The `bundle plugin install --local-git` was missing due to being
  deprecated. We decided to reintroduce the doc for more clarity.

4da252945c
2025-07-25 11:10:42 +09:00
Martin Emde
80712140af [rubygems/rubygems] Fix spacing in bundle gem newgem.gemspec.tt
The changelog line was generating indented more than it should.

da6109ef5b
2025-07-25 11:10:40 +09:00
David Rodríguez
9f961a4b30 [rubygems/rubygems] Workaround RVM issue when using Bundler <= 2.5.22
Old versions of BUndler need a workaround to support nested `bundle
exec` invocations by overriding `Gem.activate_bin_path`. However,
RubyGems now uses this new `Gem.activate_and_load_bin_path` helper in
binstubs, which is of course not overridden in those Bundler versions
since it didn't exist at the time.

So, include the override here to workaround that.

e5ed95e242
2025-07-22 10:01:28 +09:00
Nobuyoshi Nakada
d21e4e76c4 [ruby/fileutils] Make ln_s forward target_directory to ln_sr
b487f09eed
2025-07-19 15:44:55 +00:00
Nobuyoshi Nakada
f62e9f2b53 [ruby/fileutils] A workaround for RBS
c3abf39e7a
2025-07-19 14:48:29 +00:00
Nobuyoshi Nakada
a116871258 [ruby/fileutils] A workaround for RBS
fde0f0713a
2025-07-19 14:48:29 +00:00
Nobuyoshi Nakada
5a8e87cb2e [ruby/fileutils] Just the parent path of the destination symlink should exist
71225b1b46
2025-07-19 14:09:50 +00:00
Erik Berlin
4431ca5363 [ruby/fileutils] FileUtils.remove_dir checks directory
f0d7fc817b
2025-07-19 13:54:45 +00:00
Nobuyoshi Nakada
3dced7955c [ruby/fileutils] Use shorter symlink by real paths
277f7f2ff8
2025-07-19 13:47:48 +00:00
Nobuyoshi Nakada
de68f22042 [ruby/fileutils] Fix up FileUtils#ln_sr
2836a164ed
2025-07-19 13:47:47 +00:00
Nobuyoshi Nakada
7725442022 [ruby/fileutils] If noop, return before checking the argument
Get rid of failure in rbs.

e44b7b366c
2025-07-18 10:13:30 +00:00
Akihiko Odaki
eeb682c51b [ruby/fileutils] [DOC] Fix optional argument descriptions
Several optional positional arguments were incorrectly denoted as
keyword arguments so correct them.

c25f069f96
2025-07-18 09:25:15 +00:00
Nobuyoshi Nakada
cfe8263f41 [ruby/fileutils] Fix ln_sf with multiple sources and target_directory: false
In this case, an ArgumentError is now raised rather than ignoring the
option, just as GNU coreutils' `ln` would error on the command line.
Fixes https://github.com/ruby/fileutils/pull/128 as well.

4fc578a75f
2025-07-18 09:22:34 +00:00
David Rodríguez
d5f98b9e7e
Set development version to Bundler 2.8.0.dev and RubyGems 3.8.0.dev
Next version for both will be 4.0.0, however, extra work is necessary to
get CI passing against the new major. So for now, I'm bumping just the
minor version.
2025-07-17 11:13:16 +09:00
David Rodríguez
60fca1defc
Cancel --force deprecation in favor of --redownload
I realized `--redownload` is not a good name, because it does not
necessarily redownloads gems. It only forces reinstallation even if gem
is already installed.

So I believe `--force` is actually a better name and the introduction of
`--force` was a misunderstanding of what the `--force` flag did at the
time.

Let's cancel the deprecation of `--force`.

For now the `--redownload` alias is left around until we decide what to
do with it.
2025-07-17 11:10:46 +09:00
David Rodríguez
851a3e7724 [rubygems/rubygems] Restore treating "--" as an unknown platform
Rather than crashing when parsing it.

aa0064e4c7
2025-07-17 11:07:22 +09:00
David Rodríguez
44dd27c430 [rubygems/rubygems] Fix bundle binstub --path=foo not printing a deprecation warning
Like others, it's a remembered option which we are deprecating in favor
of configuration.

801d5dd943
2025-07-17 11:07:14 +09:00
David Rodríguez
19d931b50d [rubygems/rubygems] Fix bundle cache path=foo not printing a deprecation message
0af03eea5d
2025-07-17 11:07:13 +09:00
David Rodríguez
249cf5397f [rubygems/rubygems] Remove unnecessary flag_deprecation method
d1f8e1c4ac
2025-07-17 11:07:12 +09:00
David Rodríguez
c451f478e6 [rubygems/rubygems] Refactor remembered flag deprecation logic
88dd7d2d45
2025-07-17 11:07:11 +09:00
Takashi Kokubun
024ae34e38 [ruby/erb] Version 5.0.2
e8f3e64581
2025-07-15 16:33:00 +00:00
Jean Boussier
03800bff69 Make Pathname#mkpath builtin
[Feature #17473]
2025-07-15 12:57:18 +02:00
Hiroshi SHIBATA
8794406583 Move builtin methods to pathname.rbinc from lib/pathname.rb 2025-07-15 11:17:51 +09:00
Hiroshi SHIBATA
98ea78f347 Make Pathname to embedded class 2025-07-15 11:17:51 +09:00
Nobuyoshi Nakada
8f54b5bb93 [ruby/uri] [DOC] Update old use of URI::Parser
d2a79c6343
2025-07-14 05:11:58 +00:00
Nobuyoshi Nakada
d147091418 [ruby/uri] [DOC] Document private visibility too
For the references to URI::RFC2396_Parser private methods.

372fbb455d
2025-07-14 05:11:58 +00:00
Nobuyoshi Nakada
1a03270a7e [ruby/uri] [DOC] Fix references
These are instance methods, not class methods.  And `URI::Parser` was
moved to URI::RFC2396_Parser at [r46491]

[r46491]: bb83f32dc3

452d74390c
2025-07-14 05:11:58 +00:00
David Rodríguez
7a03a02bee
[rubygems/rubygems] Fix more warnings when running old Bundler with latest RubyGems
Also fix platform warnings when Bundler's entrypoint is bundler's
binstub.

4b1df58403
2025-07-14 11:52:14 +09:00
David Rodríguez
c3d41492e1
[rubygems/rubygems] Avoid more warnings when using RubyGems with old Bundler
We were only avoiding them when the RUBYGEMS_GEMDEPS variable is used.
Avoid the warnings in general, whenever the entrypoint to Bundler is
`require`.

8683faef36
2025-07-14 11:52:14 +09:00
David Rodríguez
a93c684077
[rubygems/rubygems] Change helper to load only Bundler extensions to RubyGems
We'll want to reuse this helper in other situations where we don't want
all Bundler loaded.

9e7018b0a1
2025-07-14 11:52:14 +09:00
David Rodríguez
1c48aa6f4a
[rubygems/rubygems] Move loading Bundler without platform warnings to a method
e068f0649a
2025-07-14 11:52:14 +09:00
David Rodríguez
4651d235db
[rubygems/rubygems] No need to detect ancient binstubs either
346d491a11
2025-07-14 11:52:14 +09:00
David Rodríguez
15751af90b
[rubygems/rubygems] Improve some heredoc indentations
6ee3a33048
2025-07-14 11:52:13 +09:00
David Rodríguez
f1cbd58acc
[rubygems/rubygems] Stop generating binstubs with support for RubyGems before 2.6.2
RubyGems generated binstubs still provide support for this ancient
version. This makes no sense since we prevent downgrades to such old
versions.

089cdc3b77
2025-07-14 11:52:13 +09:00
David Rodríguez
7dc284189a
[rubygems/rubygems] Load RubyGems extensions in the first place
This is not currently causing any issues, but I think the most correct
thing to do is that Bundler loads the extensions to RubyGems in the
first place, so that they are available from the beginning.

88faa5c7bb
2025-07-14 11:52:13 +09:00
Nobuyoshi Nakada
cf7b871a94 [ruby/uri] Improve performance of URI::MailTo::EMAIL_REGEXP
Fix the performance regression at #172 for valid emails.

``` yml
prelude: |
  require 'uri/mailto'
  n = 1000
  re = URI::MailTo::EMAIL_REGEXP
benchmark:
  n.t..t.: re.match?("n.t..t.@docomo.ne.jp")
  example: re.match?("example@example.info")
```

|         |released| 788274b| c5974f0|    this|
|:--------|-------:|-------:|-------:|-------:|
|n.t..t.  |  3.795M|  4.864M|  4.993M|  8.739M|
|         |       -|   1.28x|   1.32x|   2.30x|
|example  |  3.911M|  3.740M|  2.838M|  3.880M|
|         |   1.38x|   1.32x|       -|   1.37x|

7363a134ac
2025-07-12 10:32:48 +00:00
Jeremy Evans
22b81b5bf5 [ruby/uri] Do not allow empty host names, as they are not allowed by RFC 3986
Pointed out by John Hawthorn.

Fixes [Bug #20686]

c0cfa04a66
2025-07-12 07:07:39 +00:00
Nobuyoshi Nakada
1add45e2a6 [ruby/uri] Prohibit successive dots in email
32335923bf
2025-07-12 07:07:05 +00:00
Nikita Levchuk
c97eba9bcd [ruby/uri] lib/uri/mailto.rb (EMAIL_REGEXP): use assertions surrounding the local part instead of a character class
2d7d2d9988
2025-07-12 03:31:54 +00:00
Nikita Levchuk
0685e8caf9 [ruby/uri] lib/uri/mailto.rb (EMAIL_REGEXP): the local part should not contain leading or trailing dots
618e2bb640
2025-07-12 03:31:53 +00:00
Nobuyoshi Nakada
f1764623db [ruby/uri] Make URI::regexp schemes case sensitive
(https://github.com/ruby/uri/pull/38)

0c2b6468fa
2025-07-12 03:24:15 +00:00
Nobuyoshi Nakada
c47a92b63d [ruby/uri] Fix the message for unexpected argument
Use just `self` instead of `self.class`, in `URI::Generic.build`.
Since this is a class method, `self.class` is always `Class` even in
inherited sub classes, and does not have `#component` method.

6f44d3d40e
2025-07-12 03:05:25 +00:00