Граф коммитов

12502 Коммитов

Автор SHA1 Сообщение Дата
KJ Tsanaktsidis 02cc9d48f1 [ruby/resolv] Catch EPROTONOSUPPORT as a sign of no IPv6 as well
(https://github.com/ruby/resolv/pull/41)

If IPv6 is disabled inside a freebsd jail, it seems this returns
EPROTONOSUPPORT and not EAFNOSUPPORT. In both cases, we should simply
try some other listed DNS servers.

Fixes [Bug #19928] https://bugs.ruby-lang.org/issues/19928

https://github.com/ruby/resolv/commit/5e2d48708b
2023-11-24 04:06:25 +00:00
Kasumi Hanazuki e3b485213d [ruby/resolv] Implement dohpath SvcParam
(https://github.com/ruby/resolv/pull/33)

* Implement dohpath SvcParam [RFC 9461]

This patch implements "dohpath" SvcParam proposed in
[draft-ietf-add-svcb-dns-08]. This parameter specifies a URI template
for the :path used in DNS-over-HTTPS requests.

"dohpath" is employed by [DDR], also a to-be-published Proposed Standard
that specifies how to upgrade DNS transport to a more secure one, i.d.,
DNS-over-TLS or DNS-over-HTTPS. DDR is deployed in the public DNS
resolvers including Cloudflare DNS, Google Public DNS, and Quad9.

[RFC 9461]: https://datatracker.ietf.org/doc/rfc9461/
[DDR]: https://datatracker.ietf.org/doc/draft-ietf-add-ddr/

https://github.com/ruby/resolv/commit/da9c023539

Co-authored-by: Sorah Fukumori <her@sorah.jp>
2023-11-24 01:42:08 +00:00
Kasumi Hanazuki 608a518b42 [ruby/resolv] Implement SVCB and HTTPS RRs
(https://github.com/ruby/resolv/pull/32)

* Add MessageDecoder#get_list

This method repeats yielding until all the data upto the current limit
is consumed, and then returns an Array containig the block results.

* Implement SVCB and HTTPS RRs [RFC 9460]

> This patch implements SVCB and HTTPS resource record types defined in
> [RFC 9460].
>
> The RR types are now supported by many server implementations including
> BIND, unbound, PowerDNS, and Knot DNS. Major browsers such as Chrome,
> Edge, and Safari have started to query HTTPS records, with the records
> gradually adopted by websites. Also, SVCB is actually deployed in the
> public DNS resolvers such as Cloudflare DNS and Google Public DNS for
> [DDR].
>
> With such wide adoption, we have plenty of real-world use cases, and
> it is unlikely the wire format will change further in an incompatible
> way. It is time to implement them in the client libraries!
>
> # Rationale for proposed API
>
> ## `Resolv::DNS::Resource::IN::ServiceBinding`
>
> This is an abstract class for SVCB-compatible RR types.
> SVCB-compatible RR types, as defined in the Draft, shares the wire
> format and the semantics of their RDATA fields with SVCB to allow
> implementations to share the processing of these RR types. So we do
> so.
>
> The interface of this class is straightforward: It has three
> attributes `priority`, `target`, and `params`, which correspond the
> RDATA fields SvcPriority, TargetName, and SvcParams, resp.
>
> SVCB RR type is defined specifically within IN class. Thus, this
> class is placed in the `Resolv::DNS::Resource::IN` namespace.
>
> ## `Resolv::DNS::Resource::IN::SVCB`, `Resolv::DNS::Resource::IN::HTTPS`
>
> Just inherits ServiceBinding class.
>
> ## `Resolv::DNS::SvcParam`
>
> This class represents a pair of a SvcParamKey and a SvcParamValue.
> Aligned with the design of `Resolv::DNS::Resource`, each SvcParamKey
> has its own subclass of `Resolv::DNS::SvcParam`.
>
> ## `Resolv::DNS::SvcParam::Generic`
>
> This is an abstract class representing a SvcParamKey that is unknown
> to this library. `Generic.create(key)` dynamically defines its
> subclass for specific `key`. E.g., `Generic.create(667)` will define
> `Generic::Key667`.
>
> This class holds SvcParamValue in its wire format.
>
> SvcParam with an unknown SvcParamKey will be decoded as a subclass of
> this class. Also, users of this library can generate a non-supported
> SvcParam if they know its wire format.
>
> ## `Resolv::DNS::SvcParams`
>
> This is conceptually a set of `SvcParam`s, whose elements have the
> unique SvcParamKeys. It behaves like a set, and for convenience
> provides indexing by SvcParamKey.
>
> - `#initialize(params)` takes an Enumerable of `SvcParam`s as the
>   initial content. If it contains `SvcParam`s with the duplicate key,
>   the one that appears last takes precedence.
> - `#[](key)` fetches the `SvcParam` with the given key. The key can be
>   specified by its name (e.g., `:alpn`) or number (e.g., `1`).
> - `#add(param)` adds a `SvcParam` to the set. If the set already has a
>   `SvcParam` with the same key, it will be replaced.
> - `#delete(key)` deletes a `SvcParam` by its key and returns it. The key
>   can be specified by its name or number.

* Update comments referring to draft-ietf-dnsop-svcb-https-12

Published as RFC 9460. https://datatracker.ietf.org/doc/rfc9460/

[draft-ietf-dnsop-svcb-https-12]: https://datatracker.ietf.org/doc/draft-ietf-dnsop-svcb-https/12/
[RFC 9460]: https://datatracker.ietf.org/doc/rfc9460/
[DDR]: https://datatracker.ietf.org/doc/draft-ietf-add-ddr/

https://github.com/ruby/resolv/commit/b3ced7f039
2023-11-24 01:35:33 +00:00
Eric Mueller 055a4f09ca [rubygems/rubygems] Don't require 'json' unless it's actually needed
https://github.com/rubygems/rubygems/commit/97ee203fd5
2023-11-23 18:03:17 +00:00
Eric Mueller c424d15cb9 [rubygems/rubygems] Add --json bundle-outdated flag to produce json-parseable output
https://github.com/rubygems/rubygems/commit/65efa44bc0
2023-11-23 18:03:17 +00:00
Eric Mueller a54c98a29f [rubygems/rubygems] Factor group-filtering to a private method to reduce repetition
We're about to expand the repeated bit of code, so drying it up a little
is warranted.

https://github.com/rubygems/rubygems/commit/e69c658be6
2023-11-23 18:03:16 +00:00
tomoya ishida 11d7c75fb3 [ruby/irb] Handle handle_exception's exception
(https://github.com/ruby/irb/pull/780)

https://github.com/ruby/irb/commit/d42138c477
2023-11-23 17:33:13 +00:00
Stan Lo e8b9058964 [ruby/irb] Hint debugger command in irb:rdbg session
(https://github.com/ruby/irb/pull/768)

When user enters irb:rdbg session, they don't get the same hint that the
`debug` gem provides, like

```
(rdbg) n    # next command
```

This means that users may accidentally execute commands when they want to
retrieve the value of a variable.

So this commit adds a Reline output modifier to add a simiar hint:

```
irb:rdbg(main):002> n # debug command
```

It is not exactly the same as `debug`'s because in this case the importance
is to help users distinguish between value evaluation and debugger command
execution.

https://github.com/ruby/irb/commit/fdf24de851
2023-11-23 07:29:12 +00:00
hogelog e2078ccd5a [ruby/irb] Fix failure of more command with -R option
(https://github.com/ruby/irb/pull/781)

https://github.com/ruby/irb/commit/7d6849e44e
2023-11-23 07:24:35 +00:00
tomoya ishida 8d6175bf64 [ruby/irb] Require prism >= 0.18.0 (MatchWriteNode#targets and
CaseMatchNode)
(https://github.com/ruby/irb/pull/778)

https://github.com/ruby/irb/commit/943c14b12e
2023-11-22 20:29:51 +00:00
Kevin Newton 1f06d168ba [ruby/prism] Add new doc to gemspec
https://github.com/ruby/prism/commit/99dfca6c1d
2023-11-22 15:15:07 +00:00
heyogrady e3ef05a434 [ruby/prism] Add `CP949` encoding
https://github.com/ruby/prism/commit/9e78dfdf69
2023-11-22 09:12:35 -05:00
David Rodriguez c05495530e [rubygems/rubygems] Fix universal lockfiles regression
If a platform specific variant would not match the current Ruby, we would still be
considering it compatible with the initial resolution and adding its
platform to the lockfile, but we would later fail to materialize it for
installation due to not really being compatible.

Fix is to only add platforms for variants that are also compatible with
current Ruby and RubyGems versions.

https://github.com/rubygems/rubygems/commit/75d1290843
2023-11-22 13:17:12 +00:00
Benoit Daloze 018e6abf85 [ruby/prism] Move CallNode#name field between receiver and arguments
* The same order as in source code.
* CallOrWriteNode, CallOperatorWriteNode, CallAndWriteNode already have
  the correct order so it was also inconsistent with them.

https://github.com/ruby/prism/commit/4434e4bc22
2023-11-22 12:15:20 +00:00
tomoya ishida ea60bf912c [ruby/irb] Rescue Exception, ignore warning in completion
doc_namespace
(https://github.com/ruby/irb/pull/777)

https://github.com/ruby/irb/commit/c2f671611a
2023-11-22 12:06:25 +00:00
John Bond 9e24d747ff [ruby/resolv] IPv6: update to_s method to be RFC5952 compliant
(https://github.com/ruby/resolv/pull/25)

* IPv6: update to_s method to be RFC5952 compliant

I noticed that the resolv library does not honour RFC 5952 Section 4.2.2.
in relation to textural representation of ipv6 addresses:

   The symbol "::" MUST NOT be used to shorten just one 16-bit 0 field.
   For example, the representation 2001:db8:0:1:1:1:1:1 is correct, but
   2001:db8::1:1:1:1:1 is not correct.

Fixes https://github.com/ruby/resolv/pull/24

https://github.com/ruby/resolv/commit/5efcd6ed70

Co-authored-by: Sorah Fukumori <sora134@gmail.com>
2023-11-22 10:35:36 +00:00
Burdette Lamar d68e5c6d19 [ruby/open3] [DOC] Open3 doc (https://github.com/ruby/open3/pull/21)
https://github.com/ruby/open3/commit/3bdb402b18
2023-11-21 22:25:28 +00:00
Bo Anderson 57fa69f26f [rubygems/rubygems] Fix invalid platform removal missing adjacent platforms
https://github.com/rubygems/rubygems/commit/4ce66c41a2
2023-11-21 19:11:15 +00:00
Kevin Newton 7d6f812c31 [ruby/prism] Update to v0.18.0
https://github.com/ruby/prism/commit/1398879d79
2023-11-21 13:59:10 -05:00
Vinicius Stock 7a9bb6d2a7 [ruby/prism] Fix constant path full name when parent is not a
constant
(https://github.com/ruby/prism/pull/1742)

* Raise if constant path parts contains nodes that can't be used to build full name

* Fix typo in constant path error documentation

Co-authored-by: Tim Morgan <tim@timmorgan.org>

---------

https://github.com/ruby/prism/commit/d73a053262

Co-authored-by: Tim Morgan <tim@timmorgan.org>
2023-11-21 16:39:27 +00:00
Haldun Bayhantopcu 8966d06b96 [ruby/prism] Warning for ENDs in methods
(https://github.com/ruby/prism/pull/1899)

https://github.com/ruby/prism/commit/1b41c2d56c
2023-11-21 16:36:12 +00:00
tomoya ishida f954a5663a [ruby/irb] Bump version to 1.9.1
(https://github.com/ruby/irb/pull/773)

https://github.com/ruby/irb/commit/997df3e849
2023-11-21 13:02:21 +00:00
Ryan Garver e16ff17374 Rename the big5-hkscs stuff to something more generic and add UAO sharing common code.
Merge the Big5 extensions into pm_big5.c
2023-11-20 21:18:31 -05:00
ima1zumi 7164715666 [ruby/irb] Enable Setting Completer Type through `IRB_COMPLETOR`
(https://github.com/ruby/irb/pull/771)

I propose introducing the capability to set the IRB completion kinds via an environment variable, specifically `IRB_COMPLETOR=type`.
This feature aims to enhance the Rails console experience by allowing Rails users to specify their preferred completion more conveniently.

Currently, when using the Rails console, there's no straightforward way to globally set the type completion across a Rails application repository.
It's possible to configure this setting by placing a `.irbrc` file at the project root. However, using a .irbrc file is not ideal as it allows for broad configurations and can potentially affect the production environment.
My suggestion focuses on allowing users to set the completion to 'type' in a minimal.

This enhancement would be particularly beneficial for teams writing RBS in their Rails applications.
This type completer, integrated with RBS, would enhance completion accuracy, improving the Rails console experience.

https://github.com/ruby/irb/commit/032f6da25f
2023-11-21 00:04:41 +00:00
Kevin Newton f2ed7eaba0 [ruby/prism] Add character APIs for locations
(https://github.com/ruby/prism/pull/1809)

https://github.com/ruby/prism/commit/d493ccd093
2023-11-20 16:07:06 +00:00
Burdette Lamar 37585fd62a [ruby/open3] [DOC] RDoc for Open3
(https://github.com/ruby/open3/pull/20)

https://github.com/ruby/open3/commit/4c9e7492eb
2023-11-19 02:42:33 +00:00
Ryan Garver cd4316a51f [ruby/prism] Big5 HKSCS encoding
https://github.com/ruby/prism/commit/3ca9823eb4
2023-11-18 13:52:17 -05:00
tomoya ishida 631b500dd5 [ruby/irb] Fix irb crash on `{}.` completion
(https://github.com/ruby/irb/pull/764)

https://github.com/ruby/irb/commit/07e4d540cc
2023-11-18 17:49:06 +00:00
Maple Ong d976e7cc4b [ruby/prism] Update gemspec
https://github.com/ruby/prism/commit/1a10f6f9c0
2023-11-16 17:13:17 +00:00
Burdette Lamar 2524c8b551 [ruby/open3] [DOC] RDoc for Open3
(https://github.com/ruby/open3/pull/19)

https://github.com/ruby/open3/commit/577bee9696
2023-11-16 16:27:41 +00:00
Hiroshi SHIBATA c65bb5a0f8 Warn bundled gems before Ruby 3.4.0 2023-11-16 18:14:48 +09:00
Hiroshi SHIBATA 7415901ac2 Always revert or skip extended require of RubyGems. 2023-11-16 18:14:48 +09:00
Nobuyoshi Nakada e374512682 [ruby/rdoc] Revert "chore: Remove unnecessary argument for `join` method"
This reverts commit https://github.com/ruby/rdoc/commit/4a1c74bc0a09.

Since RDoc still supports ruby 2.6 which has not deprecated `$,`, the
argument of `Array#join` is not unnecessary yet.

https://github.com/ruby/rdoc/commit/72897d32ed
2023-11-16 02:22:08 +00:00
toshimaru 8d160b9350 [ruby/rdoc] chore: Remove unnecessary argument for `join` method
https://github.com/ruby/rdoc/commit/4a1c74bc0a
2023-11-16 01:43:12 +00:00
toshimaru 72242e69aa [ruby/rdoc] fix: Fix NoMethodError for `tokens_to_s` method
Calling `tokens_to_s` gets an error if `token_stream` is nil:

```
undefined method `compact' for nil:NilClass (NoMethodError)
```

So, fall back to an empty array if `@token_stream` is nil.

https://github.com/ruby/rdoc/commit/452e4a2600
2023-11-16 01:43:12 +00:00
Kevin Newton d2e7a70ee6 [ruby/prism] Track the then keyword for conditionals
https://github.com/ruby/prism/commit/fef0019a25
2023-11-15 23:08:11 +00:00
Samuel Giddins b69bbf588a [rubygems/rubygems] User bundler UA when downloading gems
Gem::RemoteFetcher uses Gem::Request, which adds the RubyGems UA.
Gem::RemoteFetcher is used to download gems, as well as the full index.
We would like the bundler UA to be used whenever bundler is making
requests.

This PR also avoids unsafely mutating the headers hash on the shared
`Gem::RemoteFetcher.fetcher` instance, which could cause corruption or
incorrect headers when making parallel requests. Instead, we create one
remote fetcher per rubygems remote, which is similar to the connection
segregation bundler is already doing

https://github.com/rubygems/rubygems/commit/f0e8dacdec
2023-11-15 08:33:14 +00:00
Kevin Newton ed75518192
[ruby/prism] Rename librubyparser to libprism
librubyparser was an artifact of the prototype that was initially
named ruby-parser. Instead, this renames it to libprism to be
consistent with the actual name.

https://github.com/ruby/prism/commit/8600b06811
2023-11-14 16:22:03 -05:00
Nobuyoshi Nakada 9935512275 [ruby/rdoc] Fix TIDYLINK after braces
(https://github.com/ruby/rdoc/pull/1015)

TIDYLINK multi-word label should not include braces.

https://github.com/ruby/rdoc/commit/41ad3191e9
2023-11-14 07:59:56 +00:00
Paul Bob 33b92c2d6b [rubygems/rubygems] improvement: include response body on fetch_http error
https://github.com/rubygems/rubygems/commit/de4189af35
2023-11-14 03:18:55 +00:00
Benoit Daloze bbfd735b88 [rubygems/rubygems] TruffleRuby uses a bash prelude in default launchers
https://github.com/rubygems/rubygems/commit/e119f4208a
2023-11-13 14:57:15 +00:00
tomoya ishida 90b49024c0 [ruby/reline] Fallback to 256color if COLORTERM != truecolor
(https://github.com/ruby/reline/pull/604)

* Fallback to 256color if COLORTERM != truecolor

* Add Reline::Face.force_truecolor to force truecolor without COLORTERM env

https://github.com/ruby/reline/commit/090e1e4df0
2023-11-13 12:42:31 +00:00
Nobuyoshi Nakada 8e64c87f64 [rubygems/rubygems] Make sure to `require "rubygems"` explicitly
This is also done in bundler/lib/bundler/rubygems_integration.rb, but
bundler/lib/bundler.rb loads this file before it.

https://github.com/rubygems/rubygems/commit/8840d8507b
2023-11-13 11:33:00 +00:00
David Rodríguez 5bdbe242b3 [rubygems/rubygems] Add a warning in an edge case of using `gemspec` DSL
If a Gemfile duplicates a development dependency also defined in a local
gemspec with a different requirement, the requirement in the local
gemspec will be silently ignored.

This surprised me.

I think we should either:

* Make sure both requirements are considered, like it happens for
  runtime dependencies (I added a spec to illustrate the current behavior
  here).

* Add a warning that the requirement in the gemspec will be ignored.

I think the former is slightly preferable, but it may cause some
bundle's that previously resolve to no longer resolver.

I went with the latter but the more I think about it, the more this
seems like it should behave like the former.

https://github.com/rubygems/rubygems/commit/ad6843972f
2023-11-13 11:06:10 +09:00
David Rodríguez e2d7e53c5c [rubygems/rubygems] This can be frozen now
https://github.com/rubygems/rubygems/commit/d06544add2
2023-11-13 11:06:10 +09:00
David Rodríguez 3757d9027c [rubygems/rubygems] Remove now unnecessary dups
https://github.com/rubygems/rubygems/commit/56ce2a6445
2023-11-13 11:06:10 +09:00
David Rodríguez e6c84d05d0 [rubygems/rubygems] Remove now unnecessary dup
https://github.com/rubygems/rubygems/commit/3c1a6a7dfa
2023-11-13 11:06:10 +09:00
David Rodríguez c7bf511cbf [rubygems/rubygems] Add a note about `required_rubygems_version` in Bundler
https://github.com/rubygems/rubygems/commit/9509d98b5c
2023-11-13 11:06:10 +09:00
David Rodríguez a4d80eee17 [rubygems/rubygems] Let RuboCop target Ruby 3.0
https://github.com/rubygems/rubygems/commit/70243b1d72
2023-11-13 11:06:10 +09:00
David Rodríguez 50482cd1e5 [rubygems/rubygems] Drop support for Ruby 2.6 and Ruby 2.7 in Bundler
https://github.com/rubygems/rubygems/commit/93619c97ff
2023-11-13 11:06:10 +09:00
David Rodríguez 54511303a4 [rubygems/rubygems] Drop support for Ruby 2.6 and Ruby 2.7 in RubyGems
https://github.com/rubygems/rubygems/commit/10c26a483d
2023-11-13 11:06:10 +09:00
David Rodríguez 435eb56f61 [rubygems/rubygems] Automatically lock extra ruby platforms
Since we started locking the specific platform in the lockfile, that has
created an annoying situation for users that don't develop on Linux.
They will create a lockfile on their machines, locking their local
platform, for example, darwin. But then that lockfile won't work
automatically when deploying to Heroku for example, because the lockfile
is frozen and the Linux platform is not included.

There's the chance though that resolving against two platforms (Linux +
the local platform) won't succeed while resolving for just the current
platform will. So, instead, we check other platform specific variants
available for the resolution we initially found, and lock those
platforms and specs too if they satisfy the resolution.

This is only done when generating new lockfiles from scratch, existing
lockfiles should keep working as before, and it's only done for "ruby
platforms", i.e., not Java or Windows which have their own complexities,
and so are excluded.

With this change, we expect that MacOS users can bundle locally and
deploy to Heroku without needing to do anything special.

https://github.com/rubygems/rubygems/commit/5f24f06bc5
2023-11-13 11:06:10 +09:00
David Rodríguez f273132bc0 [rubygems/rubygems] Extract builder to create a `LazySpecification` from full spec
https://github.com/rubygems/rubygems/commit/957d3d9a7f
2023-11-13 11:06:10 +09:00
David Rodríguez 58b0a67432 [rubygems/rubygems] Extract a new small platform helper
https://github.com/rubygems/rubygems/commit/8f7340df8e
2023-11-13 11:06:10 +09:00
David Rodríguez bd6aaa78c3 [rubygems/rubygems] Remove unused `SpecSet#merge`
https://github.com/rubygems/rubygems/commit/53e0490b55
2023-11-13 11:06:10 +09:00
David Rodríguez 196d1bf56e [rubygems/rubygems] Pass source to `LazySpecification` initializer
https://github.com/rubygems/rubygems/commit/05120e2fe8
2023-11-13 11:06:10 +09:00
David Rodríguez 636b70d2a6 [rubygems/rubygems] Allow setting metadata on LazySpecification
This is a step forward towards eventually including metadata in the
lockfile.

https://github.com/rubygems/rubygems/commit/56fc02b251
2023-11-13 11:06:10 +09:00
David Rodríguez ea7cde64fb [rubygems/rubygems] Set LazySpecification dependencies directly
https://github.com/rubygems/rubygems/commit/2462c8e04d
2023-11-13 11:06:10 +09:00
Kevin Newton 94f82a65f7 [ruby/prism] Add the ability to convert nodes to dot
https://github.com/ruby/prism/commit/3e4b4fb947
2023-11-12 02:53:33 +00:00
Kevin Newton 85db7baccb [ruby/prism] Remove extra locals added by ...
https://github.com/ruby/prism/commit/b7850f2d30
2023-11-10 21:50:12 +00:00
Mateus Pereira 03aa1092ad [ruby/prism] Add source code and changelog uris
https://github.com/ruby/prism/commit/33a85f7867
2023-11-10 21:49:27 +00:00
ima1zumi 8044feb7ab [ruby/irb] Bump version to 1.9.0
(https://github.com/ruby/irb/pull/757)

https://github.com/ruby/irb/commit/41548b8bd0
2023-11-10 19:27:30 +00:00
Burdette Lamar 82ce47415b [ruby/open3] [DOC] RDoc for Open3
(https://github.com/ruby/open3/pull/18)

https://github.com/ruby/open3/commit/9f3f5d004c
2023-11-10 17:15:06 +00:00
tomoya ishida c4efd17061 [ruby/irb] Add command line option to select which completor to use
(https://github.com/ruby/irb/pull/754)

* Add command line option to select which completor to use

* Add test for completor argv

https://github.com/ruby/irb/commit/1dec2708c9
2023-11-09 13:15:26 +00:00
Kevin Newton 201853f4e1 [ruby/prism] Provide Parameters#signature for mirroring Method#parameters
https://github.com/ruby/prism/commit/90b3245528
2023-11-08 22:17:43 +00:00
Jeremy Evans ddd99a5290 [ruby/tempfile] Make Tempfile#open return the underlying File
Add test for this behavior.

https://github.com/ruby/tempfile/commit/0ca31a6b8d
2023-11-08 16:47:29 +00:00
git 32e89b7f9c * remove trailing spaces. [ci skip] 2023-11-08 15:20:01 +00:00
Jeremy Evans ddcfc9feab [ruby/tempfile] Fix Tempfile#{dup,clone}
Instead of storing the delegate in @tmpfile, use __getobj__, since
delegate library already handles dup/clone for that.  Copy the
unlinked, mode, and opts instance variables to the returned object
when using dup/clone.

Split the close/unlink finalizer into two finalizers. The close
finalizer always closes when any Tempfile instance is GCed, since
each Tempfile instance uses a separate file descriptor. The unlink
finalizer unlinks only when the original and all duped/cloned
Tempfiles are GCed, since all share the same path.

For Tempfile#open, undefine the close finalizer after closing the
current file, the redefine the close finalizer with the new file.

Fixes [Bug #19441]

https://github.com/ruby/tempfile/commit/dafabf9c7b
2023-11-08 15:19:52 +00:00
Han Young b4bf8c9ee2 [rubygems/rubygems] Ensure we are using the same extension dir
Since #6945 the extension dir changed to Gem::BasicSpecification's implementation, we didn't hook that in rubygems_ext.rb. So for universal rubies, we ended up using the universal platform name when installing, but arch replaced platform name when checking. This lead to native extensions can never be correctly installed on universal rubies.

Hook Gem::BasicSpecifications so the behavior is consistent on installing and checking.

https://github.com/rubygems/rubygems/commit/8d699ed096
2023-11-08 12:40:22 +00:00
Jean Boussier d898e8d6f8 Refactor rb_shape_transition_shape_capa out
Right now the `rb_shape_get_next` shape caller need to
first check if there is capacity left, and if not call
`rb_shape_transition_shape_capa` before it can call `rb_shape_get_next`.

And on each of these it needs to checks if we got a TOO_COMPLEX
back.

All this logic is duplicated in the interpreter, YJIT and RJIT.

Instead we can have `rb_shape_get_next` do the capacity transition
when needed. The caller can compare the old and new shapes capacity
to know if resizing is needed. It also can check for TOO_COMPLEX
only once.
2023-11-08 11:02:55 +01:00
tomoya ishida e344010465 [ruby/irb] Type based completion using Prism and RBS
(https://github.com/ruby/irb/pull/708)

* Add completor using prism and rbs

* Add TypeCompletion test

* Switchable completors: RegexpCompletor and TypeCompletion::Completor

* Add completion info to irb_info

* Complete reserved words

* Fix [*] (*) {**} and prism's change of KeywordParameterNode

* Fix require, frozen_string_literal

* Drop prism<=0.16.0 support

* Add Completor.last_completion_error for debug report

* Retrieve `self` and `Module.nesting` in more safe way

* Support BasicObject

* Handle lvar and ivar get exception correctly

* Skip ivar reference test of non-self object in ruby < 3.2

* BaseScope to RootScope, move method objects constant under Methods

* Remove unused Splat struct

* Drop deeply nested array/hash type calculation from actual object. Now, calculation depth is 1

* Refactor loading rbs in test, change preload_in_thread not to cache Thread object

* Use new option added in prism 0.17.1 to parse code with localvars

* Add Prism version check and warn when :type completor cannot be enabled

* build_type_completor should skip truffleruby (because endless method definition is not supported)

https://github.com/ruby/irb/commit/1048c7ed7a
2023-11-08 02:46:33 +00:00
tomoya ishida c8d4b103a9 [ruby/irb] Fix dancing-ruby Ctrl+C stop
(https://github.com/ruby/irb/pull/735)

https://github.com/ruby/irb/commit/802b1cb6d8
2023-11-08 09:17:23 +09:00
David Rodríguez e6e4b4884d
[rubygems/rubygems] Hack to get `Gem::Specification#extensions_dir` documented
https://github.com/rubygems/rubygems/commit/625b8293f7
2023-11-08 09:04:28 +09:00
David Rodríguez 9f67118d7b
[rubygems/rubygems] Simplify selecting specs with `force_ruby_platform` set
https://github.com/rubygems/rubygems/commit/5f90a43635

Co-authored-by: Martin Emde <martin.emde@gmail.com>
2023-11-08 09:04:28 +09:00
David Rodríguez a131ea39b7
[rubygems/rubygems] Better error when having an insecure install folder
https://github.com/rubygems/rubygems/commit/e41156e272
2023-11-08 09:04:28 +09:00
David Rodríguez 05ea3bcf14
[rubygems/rubygems] Remove redundant error class
It's a `BundlerError`.

https://github.com/rubygems/rubygems/commit/53ea676dab
2023-11-08 09:04:28 +09:00
David Rodríguez 5b076e00ce
[rubygems/rubygems] Fix regression on old git versions
https://github.com/rubygems/rubygems/commit/abd91ca2e5
2023-11-08 09:04:28 +09:00
David Rodríguez 7f7a7f13ed
[rubygems/rubygems] Don't show bug report template when GEM_HOME has no writable bit
Instead, don't check that at all and proceed. If something fails to be
written inside GEM_HOME, we'll eventually fail with a proper permissions
error.

In addition to that, the writable bit in GEM_HOME is not even reliable,
because only the immediate parent is actually checked when writing. For
example,

```
$ mkdir -p foo/bar
$ chmod -w foo
$ touch foo/bar/baz # writes without issue
```

https://github.com/rubygems/rubygems/commit/4bced7ac73
2023-11-08 09:04:28 +09:00
David Rodríguez 2d719cd146
[rubygems/rubygems] Remove unnecessary rescue
https://github.com/rubygems/rubygems/commit/c0b549f943
2023-11-08 09:04:28 +09:00
Vít Ondruch ca7444cc44
[rubygems/rubygems] Allow `--install-dir` to be specified together with `--user-install`
The combination of `install-dir` and `--user-install` used to be
disabled for no good reason. This even makes problem on Linux
distributions such as Fedora, where `--user-install` is set by default
via operating_system.rb.

The `--install-dir` is already prefered over the `--user-install` by
the implementation, therefore just drop the check.

https://github.com/rubygems/rubygems/commit/313b1c5e76
2023-11-08 09:04:28 +09:00
Vít Ondruch 42cf1307c3
[rubygems/rubygems] Make the user installation less exceptional
The main purpose is to put handling of user installation into the same
place as e.g. handling the --build-root option handling. There is no
reason why the --build-root option should not prefix also paths used for
user installation.

Please note that the `util_installer` in
`test_generate_plugins_with_user_install` enforced the `:install_dir`,
which is against what user install is about.

https://github.com/rubygems/rubygems/commit/0b10cb41aa
2023-11-08 09:04:28 +09:00
ima1zumi e8ef010a81 [ruby/reline] Bump version to 0.4.0
(https://github.com/ruby/reline/pull/601)

https://github.com/ruby/reline/commit/d15ab72d4f
2023-11-07 15:38:53 +00:00
Jean Boussier ced84beb25 [ruby/cgi] Add snake case aliases for escapeURIComponent
As agreed in [Feature #18822]

https://github.com/ruby/cgi/commit/9d1161ec9d
2023-11-07 10:22:30 +00:00
Hiroshi SHIBATA 123b2e2fb4 [ruby/cgi] Bump up 0.4.0
https://github.com/ruby/cgi/commit/6ddd5fc7d7
2023-11-07 08:29:31 +00:00
Hiroshi SHIBATA b13d00a7c0 [ruby/open-uri] Bump up 0.4.0
https://github.com/ruby/open-uri/commit/09df813305
2023-11-07 16:37:06 +09:00
Hiroshi SHIBATA 31dfebccbf [ruby/English] Bump up 0.8.0
https://github.com/ruby/English/commit/826ff728cf
2023-11-07 07:32:00 +00:00
Keith R. Bennett 78e07e2983 [ruby/English] Combine duplicate aliases into single sections to more clearly denote sameness and make more concise.
https://github.com/ruby/English/commit/dcff090f6f
2023-11-07 07:24:50 +00:00
Hiroshi SHIBATA 9857499d3d [ruby/fileutils] Bump up 1.7.2
https://github.com/ruby/fileutils/commit/577fd38f15
2023-11-07 07:15:34 +00:00
Hiroshi SHIBATA 3ac15f7e57 [ruby/base64] Bump up 0.2.0
https://github.com/ruby/base64/commit/09e839e5ad
2023-11-07 07:01:35 +00:00
Burdette Lamar 48d8f62cdd [ruby/base64] Enhanced Rdoc for Base64
(https://github.com/ruby/base64/pull/7)

* Enhanced Rdoc for Base64

* Enhanced RDoc for Base64

https://github.com/ruby/base64/commit/155c39a949
2023-11-07 06:59:52 +00:00
Hiroshi SHIBATA 84b2a6ad5d [ruby/drb] Removed old version on doc section
https://github.com/ruby/drb/commit/104f1a4db3
2023-11-07 15:37:45 +09:00
Hiroshi SHIBATA ef3feae8e7 [ruby/drb] Load DRb::VERSION automatically
https://github.com/ruby/drb/commit/b250502c43
2023-11-07 15:36:55 +09:00
BurdetteLamar 8d56260910 [ruby/logger] [DOC] Fix broken link
https://github.com/ruby/logger/commit/8c135bce9a
2023-11-07 15:35:37 +09:00
Hiroshi SHIBATA 01d86818ff [ruby/ostruct] Bump up 0.6.0
https://github.com/ruby/ostruct/commit/0985296e72
2023-11-07 06:16:31 +00:00
Hiroshi SHIBATA 65e1f918d9 [ruby/drb] Bump up 2.2.0
https://github.com/ruby/drb/commit/c62076f940
2023-11-07 05:40:13 +00:00
Hiroshi SHIBATA 7d2d0f054f [ruby/logger] Bump up 1.6.0
https://github.com/ruby/logger/commit/0996f90650
2023-11-07 05:17:52 +00:00
Hiroshi SHIBATA 360607c7f1 [ruby/time] Bump up 0.3.0
https://github.com/ruby/time/commit/8dba14997c
2023-11-07 05:09:48 +00:00
Hiroshi SHIBATA acf0f8551e [ruby/timeout] Bump up 0.4.1
https://github.com/ruby/timeout/commit/a65e49cc31
2023-11-07 04:56:40 +00:00
Hiroshi SHIBATA 027f0a4564
[ruby/delegate] Bump up 0.3.1
https://github.com/ruby/delegate/commit/d4bdf89328
2023-11-07 13:37:17 +09:00
Hiroshi SHIBATA c3a11f1cfc [ruby/securerandom] Bump up 0.3.0
https://github.com/ruby/securerandom/commit/12c4ef3ea1
2023-11-07 13:21:23 +09:00
Hiroshi SHIBATA eb4dd7001f [ruby/net-protocol] Bump up 0.2.2
https://github.com/ruby/net-protocol/commit/2d3c4b43a8
2023-11-07 04:06:59 +00:00
Hiroshi SHIBATA 0c55886fc2 [ruby/tempfile] Bump up 0.2.0
https://github.com/ruby/tempfile/commit/d6ddf7881e
2023-11-07 12:54:09 +09:00
Hiroshi SHIBATA b94c407f69 [ruby/find] Bump up 0.2.0
https://github.com/ruby/find/commit/192237e766
2023-11-07 12:53:16 +09:00
Hiroshi SHIBATA b4901d54a5 [ruby/getoptlong] Bump up 0.2.1
https://github.com/ruby/getoptlong/commit/f49629dfaa
2023-11-07 03:47:15 +00:00
Hiroshi SHIBATA bf33085340 [ruby/observer] Bump up 0.1.2
https://github.com/ruby/observer/commit/6c978e6196
2023-11-07 03:42:58 +00:00
Hiroshi SHIBATA 308d794366 [ruby/pstore] Bump up 0.1.3
https://github.com/ruby/pstore/commit/6d5c0833e7
2023-11-07 03:10:45 +00:00
Hiroshi SHIBATA eeaa2cdba2 [ruby/mutex_m] Bump up 0.2.0
https://github.com/ruby/mutex_m/commit/635da25a09
2023-11-07 02:52:46 +00:00
Hiroshi SHIBATA ad81af22d4
[ruby/tmpdir] Bump up 0.2.0
https://github.com/ruby/tmpdir/commit/8bbd87c8ac
2023-11-07 11:39:02 +09:00
Hiroshi SHIBATA f32c5e1c94 [ruby/open3] Bump up 0.2.0
https://github.com/ruby/open3/commit/0db9a0afe7
2023-11-07 02:32:01 +00:00
Hiroshi SHIBATA 1fdb8ef156 [ruby/rinda] Bump up 0.2.0
https://github.com/ruby/rinda/commit/f6d76b3927
2023-11-07 02:27:08 +00:00
Hiroshi SHIBATA d9f1211a2f [ruby/tsort] Bump up 0.2.0
https://github.com/ruby/tsort/commit/2b3fe78646
2023-11-07 01:59:17 +00:00
Hiroshi SHIBATA c9ee600cef [ruby/weakref] Bump up 0.1.3
https://github.com/ruby/weakref/commit/f763384744
2023-11-07 01:46:40 +00:00
Hiroshi SHIBATA 3f33bfa1e5 [ruby/optparse] Bump up 0.4.0
https://github.com/ruby/optparse/commit/acbf6e3e12
2023-11-07 01:40:53 +00:00
Hiroshi SHIBATA e8fda04d0a [ruby/prettyprint] Bump up 0.2.0
https://github.com/ruby/prettyprint/commit/5ea64f43fa
2023-11-07 01:10:12 +00:00
Hiroshi SHIBATA 0ac39f226d [ruby/pp] Bump up 0.5.0
https://github.com/ruby/pp/commit/6e086e6df9
2023-11-07 01:00:08 +00:00
Nobuyoshi Nakada 07df8a5d5e [ruby/English] Remove `$IGNORECASE`
`$=` has been obsolete and has no effect since 1.9.

https://github.com/ruby/English/commit/121939695a
2023-11-07 00:41:15 +00:00
HASUMI Hitoshi 16403f41ab [ruby/reline] Introduce a new class Reline::Face to configure
character attributes
(https://github.com/ruby/reline/pull/552)

* Reine::Face

* fix test_yamatanooroti

* Define singleton methods to make accessors to attributes of a face

* s/display/foreground/

* s/default/default_style/ && s/normal_line/default/ && s/enhanced_line/enhanced/

* fix typo

* FaceConfig.new now takes keyword arguments

* Update lib/reline/face.rb

Co-authored-by: Stan Lo <stan001212@gmail.com>

* Update test/reline/test_face.rb

Co-authored-by: Stan Lo <stan001212@gmail.com>

* Fix to correspond to frozen_string_literal

* Face::FaceConfig -> Face::Config

* ref https://github.com/ruby/reline/pull/552#pullrequestreview-1677282576

* delete unused ivar

* ref https://github.com/ruby/reline/pull/552#discussion_r1358783723

* insert "\e[0m" into all SGR

* tiny fix

* ESSENTIAL_DEFINE_NAMES

ref https://github.com/ruby/reline/pull/552#discussion_r1367722247

* Change to Hash-accessor style

- Reline::Face[:completion_dialog].enhanced ->
  Reline::Face[:completion_dialog][:enhanced]
- Reline::Face.configs shows all defined values

* Cache array method call in local variable

* Tests for Face configuration variations

* resolve https://github.com/ruby/reline/pull/552#pullrequestreview-1710938154

* amend  to

* check invalid SGR parameter in :style

* The order of define values should be preserved

* Update test/reline/test_face.rb

Co-authored-by: Stan Lo <stan001212@gmail.com>

* Update test/reline/test_face.rb

Co-authored-by: Stan Lo <stan001212@gmail.com>

* Add methods: load_initial_config and reset_to_initial_config. And teardown in tests

* omission in amending "style: :default" to "style: :reset"

* refs https://github.com/ruby/reline/issues/598

* Fix link

* amend method name

* Update lib/reline/face.rb

Co-authored-by: ima1zumi <52617472+ima1zumi@users.noreply.github.com>

---------

https://github.com/ruby/reline/commit/fdc1d3b1e5

Co-authored-by: Stan Lo <stan001212@gmail.com>
Co-authored-by: ima1zumi <52617472+ima1zumi@users.noreply.github.com>
2023-11-06 14:40:42 +00:00
Hiroshi SHIBATA 460c7b2293 [ruby/uri] Bump up 0.13.0
https://github.com/ruby/uri/commit/b50d37f7a1
2023-11-06 10:08:41 +00:00
Hiroshi SHIBATA 00e5abae3f
[ruby/yaml] Bump up 0.3.0
https://github.com/ruby/yaml/commit/f83b0404d5
2023-11-06 19:03:04 +09:00
Hiroshi SHIBATA bda3f67f8b [ruby/shellwords] Bump up 0.2.0
https://github.com/ruby/shellwords/commit/fc63ac832d
2023-11-06 09:46:21 +00:00
Hiroshi SHIBATA b5e7065d9a [ruby/singleton] Bump up 0.2.0
https://github.com/ruby/singleton/commit/3c7fb5f258
2023-11-06 09:44:09 +00:00
Hiroshi SHIBATA ebb1816718 [ruby/benchmark] Bump up 0.3.0
https://github.com/ruby/benchmark/commit/81af12352d
2023-11-06 18:33:03 +09:00
Hiroshi SHIBATA 5a1934416f [ruby/un] Bump up 0.3.0
https://github.com/ruby/un/commit/1f636a6239
2023-11-06 09:29:53 +00:00
Hiroshi SHIBATA 479717b450 [ruby/un] Removed commented-out code
https://github.com/ruby/un/commit/0d6669bff0
2023-11-06 09:29:53 +00:00
Hiroshi SHIBATA 7a6c72e03d
Update rdoc parsers generated by racc-1.7.3 2023-11-06 17:53:00 +09:00
Hiroshi SHIBATA ee13da3e2a [ruby/rdoc] Bump up 6.6.0
https://github.com/ruby/rdoc/commit/9c14229876
2023-11-06 17:40:34 +09:00
Hiroshi SHIBATA e3a19b8a43 [ruby/net-http] Bump up 0.4.0
https://github.com/ruby/net-http/commit/4be99c204c
2023-11-06 08:23:09 +00:00
Hiroshi SHIBATA 66d266244c [ruby/net-http] Removed obsolated Revision constant
https://github.com/ruby/net-http/commit/c1c5638014
2023-11-06 08:22:39 +00:00
Kevin Newton 5a132c7864
Update prism to v0.17.1 2023-11-03 13:59:07 -04:00
Kevin Newton c44c982c93
[ruby/prism] Bump to version 0.17.0
https://github.com/ruby/prism/commit/61a306cd5c
2023-11-03 11:17:37 -04:00
Kevin Newton 47163f9cf9 [ruby/prism] Rename suppress warnings to verbose
https://github.com/ruby/prism/commit/fbb30216ca
2023-11-03 14:54:13 +00:00
Kevin Newton 4b5f516f2e [ruby/prism] Split comment
We were previously holding a type field on Comment to tell what
kind of comment it was. Instead, let's just use actual classes for
this.

https://github.com/ruby/prism/commit/e76830ca6e
2023-11-03 14:35:08 +00:00
Kevin Newton 8587d9a8bf
[ruby/prism] Wire up options through the Java parser
https://github.com/ruby/prism/commit/13fa262669
2023-11-03 10:13:50 -04:00
Kevin Newton d7d3243364
[ruby/prism] Properly support the start line option
https://github.com/ruby/prism/commit/33cc75a4b7
2023-11-03 10:13:50 -04:00
Kevin Newton 6496591194
[ruby/prism] Rename serialization APIs for consistency
https://github.com/ruby/prism/commit/5a2252e3ac
2023-11-03 10:13:49 -04:00
Kevin Newton 05f5c545d2
[ruby/prism] Wire up options through the FFI API
https://github.com/ruby/prism/commit/f0aa8ad93b
2023-11-03 10:13:49 -04:00
Kevin Newton ca7297efd3
[ruby/prism] Wire up options through the Ruby API
https://github.com/ruby/prism/commit/8582d372a3
2023-11-03 10:13:49 -04:00
Kevin Newton 2a0f2b7763
[ruby/prism] Create an options struct for passing all of the possible options
https://github.com/ruby/prism/commit/99e81619de
2023-11-03 10:13:49 -04:00
Hiroshi SHIBATA 42f368ead5
Surpressing additional message if it missed to detect gem name 2023-11-02 15:48:34 +09:00
Hiroshi SHIBATA e10f7c9d5b
Fix to detect gem name logic. It's mistake to migrate bundled_gems.rb from rubygems_integration.rb
https://github.com/ioquatix/bake/pull/15#issuecomment-1777985097
2023-11-02 15:48:34 +09:00
Hiroshi SHIBATA e34e8b93f8
Support Pathname object for warning feature of bundled gems 2023-11-02 13:32:53 +09:00
Kevin Newton 90b21b864d [prism] Updates for sync 2023-11-01 13:10:29 -04:00
Kevin Newton 493439c9ce [ruby/prism] Documentation for pm_strncasecmp
https://github.com/ruby/prism/commit/26934263b7
2023-11-01 13:10:29 -04:00
Kevin Newton 4490979615 [ruby/prism] Finish Ruby documentation
https://github.com/ruby/prism/commit/dfdcc98a3c
2023-11-01 13:10:29 -04:00
Kevin Newton 79034fbd50 [ruby/prism] More Ruby docs
https://github.com/ruby/prism/commit/ca9a660f52
2023-11-01 13:10:29 -04:00
Kevin Newton 953138698e [ruby/prism] Docs for node.rb and parse_result.rb
https://github.com/ruby/prism/commit/085da4feb9
2023-11-01 13:10:29 -04:00
Kevin Newton f12617ec98 [ruby/prism] Fix up Prism and Debug docs
https://github.com/ruby/prism/commit/c2b7724d91
2023-11-01 13:10:29 -04:00
Jemma Issroff e80ca70b9b [ruby/prism] Flip incorrect names of OptionalKeywordParameterNode and RequiredKeywordParameterNode
https://github.com/ruby/prism/commit/c31f61e898
2023-11-01 14:40:45 +00:00
Jemma Issroff d0625099e0 [ruby/prism] Split KeywordParameterNode into Optional and Required
Prior to this commit, KeywordParameterNode included both optional
and required keywords. With this commit, it is split in two, with
`OptionalKeywordParameterNode`s no longer having a value field.

https://github.com/ruby/prism/commit/89084d9af4
2023-11-01 14:40:44 +00:00
Cody Cutrer a1e24ab484 [rubygems/rubygems] avoid dependency on set
it was a performance improvement only, but it causes failures in
unrelated tests

https://github.com/rubygems/rubygems/commit/b4149cb9bf
2023-11-01 02:29:56 +00:00
Cody Cutrer 836d9fe46b [rubygems/rubygems] Add Bundler::Plugin.loaded? helper
Useful if your plugin introduces new methods to the DSL, so that
Gemfiles can easily abort if the plugin hasn't loaded yet

https://github.com/rubygems/rubygems/commit/b733055c6e
2023-11-01 02:29:56 +00:00
Cody Cutrer b5d54fc159 [rubygems/rubygems] Only remove bundler plugin gem when it's inside the cache
https://github.com/rubygems/rubygems/commit/8d51390ca4
2023-10-31 13:53:05 +00:00
Kevin Newton b413760d66
[prism] Update prism to latest 2023-10-30 12:35:39 -04:00
Kevin Newton 7bf3d9343f [ruby/prism] parse_inline_comments -> parse_comments
https://github.com/ruby/prism/commit/bd4d248fd6
2023-10-30 15:53:37 +00:00
Christian van Rensen 14fa5e39d7 [ruby/net-http] fix no_proxy behaviour
https://github.com/ruby/net-http/commit/f4951dc42a
2023-10-30 09:27:06 +00:00
Hiroshi SHIBATA f757a5d3ce [ruby/yaml] Compatibility for Psych 4
https://github.com/ruby/yaml/commit/b4b72ae0b4
2023-10-30 08:35:13 +00:00
tomoya ishida db7a4be846 [ruby/irb] Easter egg for autocomplete mode
(https://github.com/ruby/irb/pull/737)

* Show easter-egg inside document dialog in autocomplete mode

* Show more easter_egg(dancing or logo) when Alt+d is pressed in autocomplete mode

https://github.com/ruby/irb/commit/a8e5cc7354
2023-10-28 14:47:46 +00:00
License Update 2714d7507a [rubygems/rubygems] Update SPDX license list as of 2023-10-05
https://github.com/rubygems/rubygems/commit/e69a43ac9f
2023-10-27 22:14:37 +00:00
Kevin Newton c201dbc0ad [ruby/prism] Prism.parse_inline_comments
https://github.com/ruby/prism/commit/5b72f84480
2023-10-27 18:09:14 +00:00
Vinicius Stock 7e4d2bb81d [ruby/prism] Move static annotations into _static files
https://github.com/ruby/prism/commit/9a6d735890
2023-10-27 13:45:53 +00:00
Vinicius Stock 544f64075b [ruby/prism] Add RBI and RBS templates for Prism
https://github.com/ruby/prism/commit/b62305ff3e

Co-authored-by: Stan Lo <st0012@users.noreply.github.com>
2023-10-27 13:45:52 +00:00
Kevin Newton a40e2b8ee9 [ruby/prism] Fix parsing lone assoc splat within hash patterns
https://github.com/ruby/prism/commit/1da5e05672
2023-10-27 02:09:33 +00:00
Kevin Newton 21dc64534b [ruby/prism] Regenerate snapshots
https://github.com/ruby/prism/commit/160df9a687
2023-10-26 15:19:52 -04:00
Kevin Newton d1bb858d47 [ruby/prism] Match existing Ruby prettyprint
https://github.com/ruby/prism/commit/6d8358c083
2023-10-26 15:19:43 -04:00
Kevin Newton 6241cfab74
[prism] handle locals consistently 2023-10-26 15:08:31 -04:00
Kevin Newton 018f0a9c5f [ruby/prism] Rename to lefts/rights
https://github.com/ruby/prism/commit/e6deed05a5
2023-10-26 14:59:13 -04:00
Kevin Newton 922f48f081 [ruby/prism] Remove RequiredDestructuredParameterNode in favor of MultiTargetNode
https://github.com/ruby/prism/commit/6d1858192e
2023-10-26 14:59:07 -04:00
Jemma Issroff 7e4ee92de2 [ruby/prism] Add KeywordSplat flag to ArgumentsNode
Method calls with keyword splat args compile differently than
without since they merge the keyword arg hash with the keyword splat
hash. We know this information at parse time, so can set a flag
which the compiler can use.

https://github.com/ruby/prism/commit/e5f8a9a3cd
2023-10-26 18:47:50 +00:00
Kevin Newton 51ea82a770 [ruby/prism] Expose options on match last line nodes
https://github.com/ruby/prism/commit/0284b38861
2023-10-26 13:58:40 +00:00
Kevin Newton feb1427ad8 [ruby/prism] Compile with WASI
https://github.com/ruby/prism/commit/73c44b0b9c
2023-10-26 13:33:22 +00:00
Michael Chui 0164ce893f add #to_str to URI::Generic 2023-10-26 10:12:49 +09:00
Samuel Giddins 3fe2f2689f [rubygems/rubygems] Raise exception on unexpected EOF in marshal
Instead of NoMethodError being raised by accidentally trying to use nil

https://github.com/rubygems/rubygems/commit/ac8f812bbf
2023-10-25 18:52:38 +00:00
Samuel Giddins 7e7d1f0679 [rubygems/rubygems] Avoid regexp match on every call to `Gem::Platform.local`
The result of `arch` would be ignored if `@local` is set, so wrap all
the logic in `@local ||=` to short-circuit everything

https://github.com/rubygems/rubygems/commit/b67d39f3e0
2023-10-25 18:51:37 +00:00
Samuel Giddins fa3cc4afcb [rubygems/rubygems] Set file path when eval-ing local specification in EndpointSpecification
Not strictly necessary, but there is no reason not to be helpful and set the path

https://github.com/rubygems/rubygems/commit/894c0303dd
2023-10-25 17:24:06 +00:00
OKURA Masafumi bf1362306e [Doc] Improve documentation of PP
* Remove mention to `require 'pp'` for `pretty_inspect`
* Mention the need to add `require 'pp'` to customize
  `#pretty_print(pp)` method
2023-10-25 16:49:09 +09:00
Hiroshi SHIBATA c5861903ac [rubygems/rubygems] Handle CI configuration on ignore list for Gem::Specification#files
https://github.com/rubygems/rubygems/commit/4bb0ef3e55
2023-10-25 00:46:09 +00:00
Hiroshi SHIBATA 5c4978c11c [rubygems/rubygems] Handle empty array
https://github.com/rubygems/rubygems/commit/7c0afdd9af
2023-10-24 16:31:43 +00:00
dearblue 062d6050b0 [rubygems/rubygems] Ignore non-tar format `.gem` files during search
Previously, `rake install` or `rake update` would fail if there was a non-tar format `.gem` file in the current working directory.

https://github.com/rubygems/rubygems/commit/f562788f1d
2023-10-23 19:52:22 +00:00
Mau Magnaguagno f20e91fbf7 [ruby/prism] Avoid String#chars in DedentingHeredoc#to_a
Prefer String#[] directly.

https://github.com/ruby/prism/commit/916f991220
2023-10-23 14:56:18 +00:00
Hiroshi SHIBATA 8942c73e6a [rubygems/rubygems] Disabled Style/HashSyntax for keyword arguments
https://github.com/rubygems/rubygems/commit/9b61b33568
2023-10-23 07:59:08 +00:00
David Rodríguez e7d845b1d0
[rubygems/rubygems] Restore using old way of passing Ruby version to resolver
We used `Bundler::RubyVersion.system.gem_version` for a long time, but I
changed this to `Gem.ruby_version` at
https://github.com/rubygems/rubygems/commit/94f96439438e. It's unclear why I did that
though since I believe it was unrelated to the fix in there.

Bootboot patches `Bundler::RubyVersion` to customize how Bundler works
with Ruby versions, and that change broke that.

Since it's unclear to me how to achieve what Bootboot is doing with the
current code, and there was no strong reason for the change, let's
restore it for now.

https://github.com/rubygems/rubygems/commit/8ec36c6017
2023-10-23 13:59:01 +09:00
Martin Emde 6dcd4e90d8
[rubygems/rubygems] Handle base64 encoded checksums in lockfile for future compatibility.
Save checksums using = as separator.

https://github.com/rubygems/rubygems/commit/a36ad7d160
2023-10-23 13:59:01 +09:00
Martin Emde c667de72ff
[rubygems/rubygems] Improve errors and register checksums reliably
Improve error reporting for checksums, raises a new error class.

Solve for multi-source checksum errors.

Add CHECKSUMS to tool/bundler/(dev|standard|rubocop)26_gems.rb

https://github.com/rubygems/rubygems/commit/26ceee0e76

Co-authored-by: Samuel Giddins <segiddins@segiddins.me>
2023-10-23 13:59:01 +09:00
Martin Emde 6362bfdc33
[rubygems/rubygems] rename Index#== to Index#subset?
https://github.com/rubygems/rubygems/commit/a96a561087
2023-10-23 13:59:01 +09:00
Martin Emde 92f23a48e3
[rubygems/rubygems] Refactor Checksum classes and methods to reduce
code.
(https://github.com/rubygems/rubygems/pull/6917)

https://github.com/rubygems/rubygems/commit/2238bdaadc
2023-10-23 13:59:01 +09:00
Samuel Giddins c5fd94073f
[rubygems/rubygems] Refactor to checksums stored via source
This gets the specs passing, and handles the fact that we expect
checkums to be pinned only to a particular source

This also avoids reading in .gem files during lockfile generation,
instead allowing us to query the source for each resolved gem to grab
the checksum

Finally, this opens up a route to having user-stored checksum databases,
similar to how other package managers do this!

Add checksums to dev lockfiles

Handle full name conflicts from different original_platforms when adding checksums to store from compact index

Specs passing on Bundler 3

https://github.com/rubygems/rubygems/commit/86c7084e1c
2023-10-23 13:59:01 +09:00
Mercedes Bernard 69d7e9a12e
[rubygems/rubygems] Use the server checksum, then calculate from gem on disk if possible
1. Use the checksum provided by the server if provided: provides security
knowing if the gem you downloaded matches the gem on the server

2. Calculate the checksum from the gem on disk: provides security knowing
if the gem has changed between installs

3. In some cases, neither is possible in which case we don't put anything
in the checksum and we maintain functionality as it is today

Add the checksums to specs in the index if we already have them

Prior to checksums, we didn't lose any information when overwriting specs
in the index with stubs. But now when we overwrite EndpointSpecifications
or RemoteSpecifications with more generic specs, we could lose checksum
info. This manually sets checksum info so we keep it in the index.

https://github.com/rubygems/rubygems/commit/de00a4f153
2023-10-23 13:59:01 +09:00
Thong Kuah ad08674d8d
[rubygems/rubygems] Add CHECKSUMS for each gem in lockfile
We lock the checksum for each resolved spec under a new CHECKSUMS
section in the lockfile.

If the locked spec does not resolve for the local platform, we preserve
the locked checksum, similar to how we preserve specs.

Checksum locking only makes sense on install. The compact index
information is only available then.

https://github.com/rubygems/rubygems/commit/bde37ca6bf
2023-10-23 13:59:01 +09:00
Martin Emde 499e66d05c [rubygems/rubygems] Gem::NameTuple equality ignores Gem::Platform/string platform variation
https://github.com/rubygems/rubygems/commit/49aaa46708
2023-10-21 20:35:34 +00:00
Stan Lo 745879b5ed [ruby/irb] Minor refactors around irb.rb
(https://github.com/ruby/irb/pull/736)

* Remove dead method

* Simplify IRB.version

* Move private Irb methods together

* Centralise @CONF initialization/assignment in init.rb

* Move attr_* calls above initialize method

https://github.com/ruby/irb/commit/cf23be4395
2023-10-21 18:06:00 +00:00
Hiroshi SHIBATA 0976488970 [ruby/logger] Bump up required ruby version to 2.5
https://github.com/ruby/logger/commit/ac911eae2b
2023-10-20 02:37:07 +00:00
Hiroshi SHIBATA 13b33b109f [ruby/logger] Use Gemfile instead of Gem::Specification#add_development_dependency
https://github.com/ruby/logger/commit/7b51af263f
2023-10-20 02:37:04 +00:00
Hiroshi SHIBATA 1640dbdedd
Sort gem names 2023-10-20 09:13:55 +09:00
Hiroshi SHIBATA 2a56a6c3af
racc is also extracted to bundled gems 2023-10-20 09:13:55 +09:00
Samuel Giddins 205cbc09d3 [rubygems/rubygems] Reuse Gem::RemoteFetcher instance in bundler
Closes https://github.com/rubygems/rubygems/issues/7076

Bundler will now use the same (shared) remote fetcher instance that
RubyGems uses.

This will allow installs to use a shared connection pool, which
represents a significant performance improvement on a clean install.

https://github.com/rubygems/rubygems/commit/cd87b40fe1
2023-10-19 21:40:21 +00:00
Samuel Giddins af222d4db2 [rubygems/rubygems] Update vendored thor to v1.3.0
See https://github.com/rails/thor/releases/tag/v1.3.0

https://github.com/rubygems/rubygems/commit/3c7165474b
2023-10-19 20:02:47 +00:00
Matt Valentine-House 62e340251b Don't add anonymous locals when ISEQ binary debug is on 2023-10-19 16:57:43 +01:00
Hiroshi SHIBATA 5e5a8cf752 [ruby/ostruct] Use Gemfile instead of Gem::Specification#add_development_dependency
https://github.com/ruby/ostruct/commit/ed49920766
2023-10-19 06:55:40 +00:00
Hiroshi SHIBATA 3605c9ae60
Don't need to refer SINCE constant 2023-10-19 13:51:31 +09:00
Jeremy Evans de07645019 [ruby/drb] Support :SSL{Min,Max}Version config options
These are necessary to get the tests passing with LibreSSL 3.8.1+,
which dropped support for TLSv1.0 and TLSv1.1 for security reasons.

This updates the tests to use TLSv1.2 on OpenBSD.  This is only
strictly necessary on OpenBSD 7.4+, but it will work fine in previous
versions as well.

https://github.com/ruby/drb/commit/32707b2db5
2023-10-18 21:13:21 +00:00
Kevin Newton 6873f96abc [ruby/prism] Bump to version 0.15.1
https://github.com/ruby/prism/commit/d906a8ceba
2023-10-18 19:19:38 +00:00
Kevin Newton 0f1e040068 [ruby/prism] Bump to version 0.15.0
https://github.com/ruby/prism/commit/ee429f8d50
2023-10-18 16:49:58 +00:00
Kevin Newton 8210cc4218 [ruby/prism] Fix lex compat when dedent should be 0
https://github.com/ruby/prism/commit/41c0e0e06e
2023-10-18 16:09:16 +00:00
Kevin Newton c82b10bbc3 [ruby/prism] Modify less of the CRuby locals
https://github.com/ruby/prism/commit/aca24b3a17
2023-10-18 16:08:32 +00:00
Kevin Newton 5d0604366e [ruby/prism] Add * and & to methods with ...
https://github.com/ruby/prism/commit/e8114a786a
2023-10-18 16:08:31 +00:00
Kyle Stevens ef3f9f1a68 [rubygems/rubygems] Allow uninstalling multiple versions of same gem
Currently, you can install multiple versions of the same gem just fine:

```
$ gem install simplecov:0.19.0 simplecov:0.22.0
Fetching simplecov-0.19.0.gem
Successfully installed simplecov-0.19.0
Parsing documentation for simplecov-0.19.0
Installing ri documentation for simplecov-0.19.0
Done installing documentation for simplecov after 0 seconds
Fetching simplecov-0.22.0.gem
Successfully installed simplecov-0.22.0
Parsing documentation for simplecov-0.22.0
Installing ri documentation for simplecov-0.22.0
Done installing documentation for simplecov after 0 seconds
2 gems installed
```

But to uninstall both of them, you need to run the equivalent uninstall
command twice:

```
~$ gem uninstall simplecov:0.19.0 simplecov:0.22.0
Successfully uninstalled simplecov-0.22.0
~$ gem uninstall simplecov:0.19.0 simplecov:0.22.0
Gem 'simplecov' is not installed
Successfully uninstalled simplecov-0.19.0
```

This resolves that problem by using the gem's full name (which includes
the version) when tracking which ones have already been uninstalled so
when it gets to the second version listed it doesn't think it was
already uninstalled.

https://github.com/rubygems/rubygems/commit/d96101b753
2023-10-18 10:17:58 +00:00
Hiroshi SHIBATA ac8ece81f2 Tweak the grammar 2023-10-18 14:51:48 +09:00
Hiroshi SHIBATA 46766e922b normalize gem name without .so or .bundle 2023-10-18 14:51:48 +09:00
Hiroshi SHIBATA 3b690b726d reject bundled gems if they are declared in Gemfile 2023-10-18 14:51:48 +09:00
tompng 2a8ac8ead5 [ruby/rdoc] Delay DidYouMean until NotFoundError#message is called
https://github.com/ruby/rdoc/commit/b59ca2f981
2023-10-17 11:07:57 +00:00
Kevin Newton 5523a23469 [ruby/prism] Attach magic comments to the parse result
https://github.com/ruby/prism/commit/c7ef25a79a
2023-10-16 15:40:19 -07:00
Mau Magnaguagno 55a0d2c63b [ruby/prism] Avoid unnecessary delete_prefix in LibRubyParser.resolve_type
Only remove const prefix from non-pointer types.

https://github.com/ruby/prism/commit/97c9ffeb42
2023-10-16 10:39:44 +00:00
David Rodríguez 77ffa1a7c3 [rubygems/rubygems] Raise an error when top level dependency does not resolve under all locked platforms
https://github.com/rubygems/rubygems/commit/25304f3e8d
2023-10-16 13:52:57 +09:00
David Rodríguez 73ba4b76c2 [rubygems/rubygems] Automatically remove invalid platforms before re-resolving
https://github.com/rubygems/rubygems/commit/40989271dd
2023-10-16 13:52:56 +09:00
David Rodríguez b7ad9eda3c [rubygems/rubygems] Tweak platform mismatch resolution errors
https://github.com/rubygems/rubygems/commit/20460bc1ee
2023-10-16 13:52:56 +09:00
David Rodríguez a1c73f1c88 [rubygems/rubygems] Consistent usage of `local_platform` in Definition
https://github.com/rubygems/rubygems/commit/5f28a68d79
2023-10-16 13:52:55 +09:00
David Rodríguez a05904c8ce [rubygems/rubygems] The `lock` command should not be affected by frozen setting
The `lock` command is specifically designed to manage the lockfile, so
running it should take precedence over any "frozen" setting.

Besides that, "frozen" is not specifically designed as "lockfile cannot
be updated" but as "installation of gems should be prevented if gemfile
is not in sync with the lockfile".

The lock command does not install any gems and preserves the property of
the lockfile being in sycn with its gemfile, so I think frozen should
not influence it.

The current behavior is quite confusing when frozen is set. On an app
where rubocop can get lockfile updates

```
$ bundle lock --update rubocop
Writing lockfile to /path/to/Gemfile.lock
```

Completely silent, it makes you think that it has written the lockfile,
but still no updates.

In verbose mode, it gives a bit more information, but still confusing
and unexpected, and does not change the lockfile:

```
$ bundle lock --update rubocop --verbose
Running `bundle lock --update "rubocop" --verbose` with bundler 2.4.20
Frozen, using resolution from the lockfile
Writing lockfile to /path/to/Gemfile.lock
```

With this commit, it updates the lockfile as expected.

https://github.com/rubygems/rubygems/commit/1d501ae8ea
2023-10-16 13:52:12 +09:00
David Rodríguez 4dbee36f84 [rubygems/rubygems] Use instantiated definition directly
https://github.com/rubygems/rubygems/commit/bc233af4d2
2023-10-16 13:52:11 +09:00
Ellen Marie Dash f37e9f42b9 [rubygems/rubygems] [PathSupport] Simplify logic: If `Gem.default_dir` is writable, use it.
I couldn't find a cross-platform way to check "can I create this directory?"

So I removed that, and went back to the original simpler logic of
"if the directory is writable, use it."

https://github.com/rubygems/rubygems/commit/3aa86a56db
2023-10-16 13:51:09 +09:00
Ellen Marie Dash 724398cce6 [rubygems/rubygems] Remove outdated/incorrect comment.
The function is also significantly simpler than it used to be,
to the point I'm not sure it needs a comment.

https://github.com/rubygems/rubygems/commit/29a0551e37
2023-10-16 13:51:08 +09:00
Ellen Marie Dash 3f5da31760 [rubygems/rubygems] Rephrase "Defaulting to user installation" message.
https://github.com/rubygems/rubygems/commit/b7c531347e

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2023-10-16 13:51:07 +09:00
David Rodriguez cbf2e133c1
Re-resolve when lockfile is invalid
Move the check for unmet dependencies in lockfile just in time to be
able to re-resolve if unmet dependencies are found.
2023-10-16 13:49:49 +09:00
Samuel Giddins 83f929316e [rubygems/rubygems] Fix force_ruby_platform: when the lockfile only locks the ruby platform
https://github.com/rubygems/rubygems/commit/7c50064c3c
2023-10-15 04:46:32 +00:00
Alexandre ZANNI 7865cebfb7 [ruby/cgi] doc: fix method name
there was probably a copy paste mistake in the example of unescapeURIComponent (copied from unescape)

https://github.com/ruby/cgi/commit/f8fb627e90
2023-10-14 16:46:14 +00:00
tomoya ishida 177d8ee056 [ruby/irb] Bump version to 1.8.3
(https://github.com/ruby/irb/pull/731)

https://github.com/ruby/irb/commit/de79375ac1
2023-10-14 14:42:37 +00:00
tomoya ishida 4e5c505bad [ruby/irb] Restore IRB::InputCompletor for compatibility
(https://github.com/ruby/irb/pull/730)

https://github.com/ruby/irb/commit/77265efc5f
2023-10-14 14:12:43 +00:00
Mau Magnaguagno f6564fdd37 [ruby/prism] Simplify DedentingHeredoc#to_a
Move common ``results << token`` outside case-when.

https://github.com/ruby/prism/commit/84d0722ee9
2023-10-13 21:11:07 +00:00
Kevin Newton e700582d98 [ruby/prism] Bump version to 0.14.0
https://github.com/ruby/prism/commit/1731bf4520
2023-10-13 19:45:37 +00:00
Kevin Newton 11e946da2f [ruby/prism] Fix up PR failings
https://github.com/ruby/prism/commit/11255f636e
2023-10-13 15:31:30 -04:00
Kevin Newton 37d958eaf4 Remove old unescaping code 2023-10-13 15:31:30 -04:00
Hiroshi SHIBATA 35edc14ee1 Ignore duplicated warning with native extension 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA c6728caeb7 Fix wrong gem name 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA fe5329f032 Ignore warning on LoadError when running under Bundler 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA 62eea99a1c Added recovery instructions for RubyGems 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA fdf0589a95 Surpressing double warnings 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA b49346ee73 Warn only LoadError without Bundler environment 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA 57c2ae206f Move additional warnings for Gem author under Gem::BUNDLED_GEMS. 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA ea05ddbeff Move path normalization into Gem from Bundler class 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA c2bdb198d7 Dont't handle inline Gemfile 2023-10-13 16:22:09 +09:00
Hiroshi SHIBATA 75644f98e5 Use Gem::BUNDLED_GEMS.warning? at Bundler.setup 2023-10-13 16:22:09 +09:00
Stan Lo 3aba21511b [ruby/irb] Bump version to 1.8.2
https://github.com/ruby/irb/commit/47693a2213
2023-10-12 21:36:13 +00:00
tomoya ishida 1126bd8c65 [ruby/irb] Fix require path completion disturbing string method
completion
(https://github.com/ruby/irb/pull/726)

https://github.com/ruby/irb/commit/e42dc74ce0
2023-10-12 16:54:09 +00:00
tomoya ishida cf21c72cdb [ruby/irb] Fix test runner exit bug
(https://github.com/ruby/irb/pull/728)

* Remove useless test setup and teardown that sets MAIN_CONTEXT to nil

* Avoid adding command methods to main object in test

https://github.com/ruby/irb/commit/f204829a08
2023-10-12 13:55:47 +00:00
tomoya ishida e029375a7d [ruby/irb] Decouple RubyLex from prompt and line_no
(https://github.com/ruby/irb/pull/701)

* Remove instance variable prompt and line_no from RubyLex

* Fix prompt test

* Rename prompt generating method and make it private

https://github.com/ruby/irb/commit/1ceb97fe2e
2023-10-12 12:53:31 +00:00
Nobuyoshi Nakada 52709a4862 Fix `dir_config` cache for -include and -lib options
Set to "--with-" options, not "--without-" keys.
2023-10-12 17:46:01 +09:00
Nobuyoshi Nakada 1cef5f597d Include default values in `dir_config` cache keys
The extconf.rb in mysql2 gem repeats `dir_config('mysql')`, without
and with the default path.  The third call returns the former results
even with the default path.  Since it does not check the results of
the third call, that `nil` is passed to `find_library` as a path, and
fails with `NoMethodError`.
2023-10-12 17:46:01 +09:00
Takashi Kokubun 5140e6a4c3 Fix calling exit if irb_context is nil
Trying to avoid a flaky failure like:
https://github.com/ruby/ruby/actions/runs/6486918029/job/17616113816
2023-10-11 16:22:20 -07:00
Martin Emde 9dcaa83259 [rubygems/rubygems] Avoid excess Arrays when partitioning Gem::Version.canonical_segments
https://github.com/rubygems/rubygems/commit/338c48f935
2023-10-11 22:18:46 +00:00
Ellen Marie Dash 8a8b23c0cc [lib/rubygems/path_support.rb] Rephrase comment
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2023-10-11 19:07:29 +00:00
Ellen Marie Dash be32109d64 [rubygems/rubygems] Move "Defaulting to user installation ..." message, so `--install-dir` and `--user-install` can suppress it.
https://github.com/rubygems/rubygems/commit/6677fc6853
2023-10-11 19:07:29 +00:00