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

12685 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA 443e417885 [rubygems/rubygems] bin/rubocop -A --only Style/RedundantParentheses
https://github.com/rubygems/rubygems/commit/7cc647c8f3
2024-01-11 13:51:52 +09:00
Hiroshi SHIBATA ff0119354e [rubygems/rubygems] bin/rubocop -A --only Performance/StringInclude
https://github.com/rubygems/rubygems/commit/34df962cf4
2024-01-11 13:51:52 +09:00
Kenta Murata 08e22c64b3 [rubygems/rubygems] Use cache_home instead of data_home in default_spec_cache_dir
https://github.com/rubygems/rubygems/commit/d2801fcfde
2024-01-11 04:21:38 +00:00
Cody Cutrer 94e1d3f3fa [rubygems/rubygems] include MatchMetadata in Bundler::LazySpecification
I'm running into a case in my plugin where matches_current_metadata? is
getting called on a lazy specification, and adding this fixes it

https://github.com/rubygems/rubygems/commit/24f962cb42
2024-01-11 04:19:13 +00:00
Brave Hager d5e83a0601 [rubygems/rubygems] Update documentation to use squiggly heredoc
https://github.com/rubygems/rubygems/commit/4691b959ad
2024-01-11 00:51:48 +00:00
Aaron Patterson 881c5a1846 [ruby/prism] Add a "repeated flag" to parameter nodes
It's possible to repeat parameters in method definitions like so:

```ruby
def foo(_a, _a)
end
```

The compiler needs to know to adjust the local table size to account for
these duplicate names.  We'll use the repeated parameter flag to account
for the extra stack space required

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

Co-Authored-By: Kevin Newton <kddnewton@gmail.com>
Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com>
2024-01-10 15:24:26 +00:00
Hiroshi SHIBATA d16f992e1b Extract mutex_m as bundled gems 2024-01-10 17:28:16 +09:00
Nobuyoshi Nakada 1817d644ee mkmf.rb: use kwargs 2024-01-10 09:18:18 +09:00
Kevin Newton 80da9b1547 [ruby/prism] Clarify __END__ comment
https://github.com/ruby/prism/commit/3e36d5eabc
2024-01-09 19:02:26 +00:00
Mark Young 7015cb2479 [ruby/abbrev] Provide a 'Changelog' link on rubygems.org/gems/abbrev
By providing a 'changelog_uri' in the metadata of the gemspec a
'Changelog' link will be shown on https://rubygems.org/gems/abbrev
which makes it quick and easy for someone to check on the changes
introduced with a new version.

Details of this functionality can be found on https://guides.rubygems.org/specification-reference/

https://github.com/ruby/abbrev/commit/9643a03ee8
2024-01-09 16:07:39 +00:00
Hiroshi SHIBATA 149373ce7f
racc is extracted at Ruby 3.3, not 3.4 2024-01-09 17:14:55 +09:00
Avdi Grimm 544c87d009 [rubygems/rubygems] Refer to underscores as underscores
https://github.com/rubygems/rubygems/commit/aa3ae5d245
2024-01-08 21:45:25 +00:00
Stan Lo 8f4eda5092 [ruby/irb] Make SourceFinder ignore binary sources
(https://github.com/ruby/irb/pull/836)

https://github.com/ruby/irb/commit/73b35bb7f4
2024-01-08 12:42:39 +00:00
Nobuyoshi Nakada 76c20b06aa Add `MakeMakefile["C"]` 2024-01-08 00:33:31 +09:00
Nobuyoshi Nakada bca1493815
[DOC] Documentation of mkmf.rb 2024-01-07 21:49:47 +09:00
Nobuyoshi Nakada 7fcc6f04ac [ruby/rdoc] Visibility should begin from `public` for each scope
Even for singleton class definition such as `class << self` that
shares the same container with the outer scope, its visibility is
separated and set to `public` by default.

https://github.com/ruby/rdoc/commit/baf26363b9
2024-01-07 11:39:46 +00:00
Nobuyoshi Nakada 2325b72cf3 [ruby/rdoc] Singleton method visibility should be isolated
Each singleton method definition of the form `def recv.method` has
visibility separate from the outer scope and is set to `public` by
default.

https://github.com/ruby/rdoc/commit/810913a7ea
2024-01-07 11:39:45 +00:00
BurdetteLamar 76afbda5b5 [ruby/net-http] Tweak to Net::HTTP What's Here
https://github.com/ruby/net-http/commit/3bf641ca63
2024-01-06 18:26:38 +00:00
Stan Lo 4bdfc9070c [ruby/irb] Refactor exit command
(https://github.com/ruby/irb/pull/835)

* Remove unnecessary code from the exit command's implementation

1. The parameters of `IRB.irb_exit` were never used. But there are some
   libraries seem to call it with arguments + it's declared on the top-level
   IRB constant. So I changed the params to anonymous splat instead of removing them.
2. `Context#exit` was completely unnecessary as `IRB.irb_exit` doesn't use
   the `@irb` instance it passes. And since it's (or should be treated as)
   a private method, I simply removed it.
3. The `exit` command doesn't use the status argument it receives at all.
   But to avoid raising errors on usages like `exit 1`, I changed the argument to
   anonymous splat instead removing it.

* Make exit an actual command

* Update readme

https://github.com/ruby/irb/commit/452b543a65
2024-01-06 17:15:16 +00:00
Stan Lo 3dac27897e [ruby/irb] Require Reline v0.4.2+
(https://github.com/ruby/irb/pull/834)

https://github.com/ruby/irb/commit/eff8d0d46a
2024-01-06 12:16:12 +00:00
Nobuyoshi Nakada f6847e9456 [ruby/rdoc] Ignore `locale` at `write_options`
`@locale` is set from `@locale_name` and loaded from `@locale_dir`
after `write_options`, and `RDoc::I18n::Locale` does not seem to
expected to be loaded.

https://github.com/ruby/rdoc/commit/fd610f7023
2024-01-06 10:17:49 +00:00
Nobuyoshi Nakada 4112585be5
Too much nestings make editors confused
Get rid of nested double quotes inside nested interpolations.  Also,
remove comments that are no longer needed by the documents.
2024-01-06 13:47:06 +09:00
Jeremy Evans 4d03140009 [ruby/net-http] Don't invoke response block more than once due to retry
If a socket error occurs while performing a streaming download via
the response block provided to transport_request, avoid calling
the response block again as this would result in duplicate data
received by the client.

Fixes https://github.com/ruby/net-http/pull/86
Fixes https://github.com/ruby/net-http/pull/87

Fixes [Bug #11526]

https://github.com/ruby/net-http/commit/114d01b092

Co-authored-by: Jeremy Stanley <jeremy@instructure.com>
2024-01-05 16:51:37 +00:00
Jeremy Evans 37657c79b6 [ruby/uri] Make URI#to_s prepend relative path with / if there is a host or port
Otherwise, the path could be considered part of the host or port.

This is better than modifying the path to make it absolute when
a host or port is set.  We could also raise for invalid paths
when a host or port is set using check_path, but that results
in weird errors, and won't catch issues (such as ftp allowing a
relative path).

Fixes [Bug #19916]

https://github.com/ruby/uri/commit/ac32aa005b
2024-01-05 16:07:55 +00:00
Stan Lo 99933751c1 [ruby/reline] Bump version to v0.4.2
(https://github.com/ruby/reline/pull/633)

https://github.com/ruby/reline/commit/5b59e48070
2024-01-05 14:32:18 +00:00
Hiroshi SHIBATA 75a8b48fba [ruby/net-http] Bump version to 0.4.1
https://github.com/ruby/net-http/commit/21e226c0bc
2024-01-05 08:25:03 +00:00
Martin Emde 098d97e96d [rubygems/rubygems] Quote Etag in `If-None-Match` header of compact index request
https://github.com/rubygems/rubygems/commit/d26bcd7551
2024-01-05 02:06:58 +00:00
Takashi Kokubun 5ff1524fde [ruby/erb] Version 4.0.4
https://github.com/ruby/erb/commit/b68bfed6a8
2024-01-04 22:34:59 +00:00
tomoya ishida 542011ff68 [ruby/reline] Fix pasting tab-indented code crash
(https://github.com/ruby/reline/pull/630)

https://github.com/ruby/reline/commit/90155fd0d9
2024-01-04 11:53:06 +00:00
hyuraku 577bc8254e [rubygems/rubygems] remove useless comments from unpack_command.rb
https://github.com/rubygems/rubygems/commit/7576c21295
2024-01-04 00:39:54 +00:00
Kevin Newton 3a3fcf56d0 [ruby/prism] Fix rational when parsing non decimal integer
https://github.com/ruby/prism/commit/75d4331f7f
2024-01-03 17:18:02 +00:00
Stan Lo 66e0d92de5 [ruby/irb] Avoid completing empty input
(https://github.com/ruby/irb/pull/832)

The candidate list for empty input is all methods + all variables +
all constants + all keywords. It's a long list that is not useful.

https://github.com/ruby/irb/commit/812dc2df7b
2024-01-03 13:47:51 +00:00
Kevin Newton 23beceedb7 [ruby/prism] IndexTargetNode should always have ATTRIBUTE_WRITE
Because this is a user-facing change, we also need to deal with the
fact that CRuby 3.3.0 was just released.

In order to support workflows that want to parse exactly as CRuby
parses in a specific version, this PR introduces a new option to
the options struct that is "version". This allows you to specify
that you want "3.3.0" parsing.

I'm not sure if this is the correct solution. Another solution is
to just fork and keep around the old branch for security patches.
Or we could keep around a copy of the source files within this
repository as another directory and only update when necessary.
There are a lot of potential solutions here.

Because this change is so small and the check for it is so minimal,
I've decided to go with this enum. If this ends up entirely
cluttering the codebase with version checks, we'll come up with
another solution. But for now this works, so we're going to go in
this direction for a bit until we determine it's no longer working.

https://github.com/ruby/prism/commit/d8c7e6bd10
2024-01-02 18:51:18 +00:00
Stan Lo 676748abca [ruby/irb] Make show_source resolve top-level constant names
(https://github.com/ruby/irb/pull/831)

https://github.com/ruby/irb/commit/5843616c78
2024-01-01 17:40:38 +00:00
tomoya ishida c0e3c3b6fe [ruby/irb] Fix display_document params in noautocomplete mode
(https://github.com/ruby/irb/pull/826)

* Fix display_document params in noautocomplete mode

* Fix wrong preposing and target order in display_document

The fixed wrong-ordered value is not used in RegexpCompletor, so this change does not affect the test.

https://github.com/ruby/irb/commit/08208adb5e
2024-01-01 13:57:15 +00:00
Nobuyoshi Nakada 569a06aa2f [ruby/rdoc] Allow empty name rdoc-ref as a local link
https://github.com/ruby/rdoc/commit/914a6af137
2023-12-31 15:19:50 +00:00
Nobuyoshi Nakada 5fd1738148 [ruby/securerandom] Update file list to package
https://github.com/ruby/securerandom/commit/647e5f0af8
2023-12-29 16:10:30 +00:00
tomoya ishida 6f33e3c53d [ruby/reline] Revert kill_ring.rb file permission
(https://github.com/ruby/reline/pull/623)

https://github.com/ruby/reline/commit/38e9cb2899
2023-12-29 08:23:28 +00:00
Alexander Momchilov bc3b9356b2 [ruby/reline] Replace `object_id` comparison with `equal?`
(https://github.com/ruby/reline/pull/617)

https://github.com/ruby/reline/commit/63deef4ae5
2023-12-29 04:05:28 +00:00
Blake Imsland e86b4c29fc [ruby/securerandom] Increase speed of UUID generation
https://github.com/ruby/securerandom/commit/b587b8c7cb
2023-12-29 02:43:45 +00:00
Nobuyoshi Nakada 96c6b9384c
[DOC] Remove lib/io.rb only for document of ruby/etc 2023-12-27 12:59:01 +09:00
Hiroshi SHIBATA 50b783ccac [ruby/syntax_suggest] Typofix by misspell
https://github.com/ruby/syntax_suggest/commit/66e1cf0b3e
2023-12-26 02:10:25 +00:00
Hiroshi SHIBATA 1966a61a1e Merge RubyGems-3.6.0.dev and Bundler-2.6.0.dev from master branch 2023-12-25 21:12:49 +09:00
David Rodríguez df941aa90d [ruby/resolv] Fix typo
https://github.com/ruby/resolv/commit/5dfdcfb7c7
2023-12-25 21:12:49 +09:00
Burdette Lamar 5384e5dfde [ruby/irb] Remove dead doc (https://github.com/ruby/irb/pull/819)
https://github.com/ruby/irb/commit/2d5a1afdf5
2023-12-25 21:12:49 +09:00
Earlopain 86fa418dea [ruby/ipaddr] Consider IPv4-mapped IPv6 addresses link local/loopback if IPV4 address is private
Same as #57

https://github.com/ruby/ipaddr/commit/d56acecb80
2023-12-25 21:12:49 +09:00
Luke Randall da77c79d80 [ruby/ipaddr] Fix regressions in exception messages
Changes introduced by 09edfd4 have broken some exception
messages, and added the address as an unnecessary
suffix in others.

https://github.com/ruby/ipaddr/commit/74a043109c
2023-12-25 21:12:49 +09:00
Kasumi Hanazuki eb53131367 [ruby/ipaddr] ntop: Measure address size in bytes
`IPAddr.ntop` takes the binary representation of an IP address, whose
length should be 4 or 16 *bytes* (not characters/codepoints).

The current implementation accepts strings in any encoding, but for
some values in non-BINARY encoding, it fails proper length check and
raises an `AddressFamilyError`. Since passing strings in a multibyte
encoding has never worked correctly for years, this patch makes it an
explicit error with an `InvalidAddressError`.

Fixes: https://github.com/ruby/ipaddr/issues/56

https://github.com/ruby/ipaddr/commit/a33fd14d4a
2023-12-25 21:12:49 +09:00
Hiroshi SHIBATA 6931222883 [ruby/securerandom] Typofix by misspell
https://github.com/ruby/securerandom/commit/e8be08901a
2023-12-25 21:12:49 +09:00
Nobuyoshi Nakada 3d40f11564 [ruby/tempfile] [DOC] Missing documents
https://github.com/ruby/tempfile/commit/6932d6bc6f
2023-12-25 21:12:49 +09:00
Sutou Kouhei 60e46926ba [ruby/csv] Bump version
https://github.com/ruby/csv/commit/0cba3e766d
2023-12-25 21:12:49 +09:00
Nobuyoshi Nakada bf2532f039 [ruby/etc] [DOC] Add empty io.rb for `IO#pathconf` to satisfy the coverage
https://github.com/ruby/etc/commit/0353d7c8ee
2023-12-25 21:12:49 +09:00
Mark Young 1e1da75031 [ruby/timeout] Provide a 'Changelog' link on rubygems.org/gems/timeout
By providing a 'changelog_uri' in the metadata of the gemspec
a 'Changelog' link will be shown on https://rubygems.org/gems/timeout
which makes it quick and easy for someone to check on the changes
introduced with a new version.

Details of this functionality can be found on https://guides.rubygems.org/specification-reference/

https://github.com/ruby/timeout/commit/47a6f0313b
2023-12-25 21:12:49 +09:00
Nobuyoshi Nakada bb6cf76362 [ruby/timeout] [DOC] Missing documents
https://github.com/ruby/timeout/commit/301ad4cfdc
2023-12-25 21:12:49 +09:00
Mark Young 24e0f6fcab [ruby/net-protocol] Provide a 'Changelog' link on rubygems.org/gems/net-protocol
By providing a 'changelog_uri' in the metadata of the gemspec
a 'Changelog' link will be shown on https://rubygems.org/gems/net-protocol
which makes it quick and easy for someone to check on the changes
introduced with a new version.

Details of this functionality can be found on https://guides.rubygems.org/specification-reference/

https://github.com/ruby/net-protocol/commit/46e78a2a0a
2023-12-25 21:12:49 +09:00
Mark Young da06c09725 [ruby/base64] Provide a 'Changelog' link on rubygems.org/gems/base64
By providing a 'changelog_uri' in the metadata of the gemspec
a 'Changelog' link will be shown on https://rubygems.org/gems/base64
which makes it quick and easy for someone to check on the changes
introduced with a new version.

Details of this functionality can be found on https://guides.rubygems.org/specification-reference/

https://github.com/ruby/base64/commit/7cab043d67
2023-12-25 21:12:49 +09:00
Martin Emde df11b3daf8 [rubygems/rubygems] Let the guards have some space to breathe
https://github.com/rubygems/rubygems/commit/73f1609715
2023-12-25 21:12:49 +09:00
Martin Emde 56804ddd2b [rubygems/rubygems] Use a mutex around Checksum::Store @store access
Not wrapping to_lock since access to it is single threaded and
read-only at the time of writing the lockfile.

https://github.com/rubygems/rubygems/commit/3b53aa1b12
2023-12-25 21:12:49 +09:00
Hiroshi SHIBATA 5b8e685877 [ruby/rdoc] Typofix by misspell
https://github.com/ruby/rdoc/commit/6231b03476
2023-12-25 21:12:49 +09:00
Nobuyoshi Nakada e324953090 [ruby/rdoc] Fix support for `rb_file_const` and `rb_curses_define_const`
Constant definitions using these functions have been supported, but
since RDoc::Parser::C#gen_const_table did not consider other than
`rb_define_const` the documents for them have not been found, without
`Document-const` direvtive.

Fixes https://github.com/ruby/rdoc/issues/1067

https://github.com/ruby/rdoc/commit/cdad51a60b
2023-12-25 21:12:49 +09:00
Nobuyoshi Nakada e55a57af1e [ruby/optparse] [DOC] Add missing documents
https://github.com/ruby/optparse/commit/324ff21f04
2023-12-25 21:12:49 +09:00
Hiroshi SHIBATA 27ead9907d
Typofix under lib and test, tool directories 2023-12-25 11:32:42 +09:00
Akinori MUSHA c66ff6face [ruby/set] Bump version to 1.1.0
https://github.com/ruby/set/commit/d6cab5bcc8
2023-12-23 16:50:33 +09:00
Akinori MUSHA 67882d7695 [ruby/set] Use the pattern argument instead of a block
https://github.com/ruby/set/commit/c63047c2ce
2023-12-23 16:50:31 +09:00
Akinori MUSHA 6fc3171e8a [ruby/set] The arity of initialize_clone is -1 in Ruby >= 3
https://github.com/ruby/set/commit/32a9689696
2023-12-23 16:50:30 +09:00
Akinori MUSHA 271c74a473 [ruby/set] Drop support for Ruby 2
https://github.com/ruby/set/commit/64dad673d8
2023-12-23 16:50:29 +09:00
Takashi Kokubun ef06510265 RJIT: Prefer STDERR over $stderr
When $stderr is redirected, you'll have no way to see why RJIT got
broken. This reference must always be the actual stderr.
2023-12-22 21:48:26 -08:00
Hiroshi SHIBATA 7d7a84e99f Merge RubyGems-3.5.3 and Bundler-2.5.3 2023-12-23 09:34:26 +09:00
Takashi Kokubun 19d082dcfa RJIT: Distinguish Pointer with Array
This is more convenient for accessing those fields.
2023-12-22 11:24:04 -08:00
Takashi Kokubun f263e44746 RJIT: Avoid retaining unrelated local variables in memory 2023-12-21 23:00:18 -08:00
Takashi Kokubun f3c82df944 RJIT: Minimize string allocations in InsnCompiler 2023-12-21 21:59:33 -08:00
Takashi Kokubun 9a3c49ee5d RJIT: Convert opt_case_dispatch keys with #to_value
comptime_key is a Ruby object and the value is not valid in machine code.

This PR also implements `CMP r/m64, imm32 (Mod 01: [reg]+disp8)` that is
now needed for running mail.gem benchmark.
2023-12-21 17:47:36 -08:00
Takashi Kokubun 3c18277629 RJIT: Clean up unnecessary documentation 2023-12-21 16:47:13 -08:00
Takashi Kokubun 18a97affa3 RJIT: Fix a wrong comparison in set_local_type 2023-12-21 16:45:37 -08:00
Takashi Kokubun 68bcca4c2b RJIT: Fix unwanted shadowing in set_local_type
local_idx should not be overwritten.
2023-12-21 15:48:37 -08:00
Hiroshi SHIBATA 82496f2b38 Merge RubyGems-3.5.2 and Bundler-2.5.2 2023-12-22 07:24:04 +09:00
Takashi Kokubun c28177cd57 RJIT: Print an error message first
Creating a backtrace can crash if RJIT is triggered by branch_stub_hit.
In that case, it's useful to at least print the error message.
2023-12-20 09:17:46 -08:00
Stan Lo 31959f1f13 [ruby/irb] Bump version to v1.11.0
(https://github.com/ruby/irb/pull/818)

https://github.com/ruby/irb/commit/7421359b92
2023-12-20 19:11:02 +09:00
Burdette Lamar 4ad1007fd2 [ruby/irb] [DOC] Change indexes.rdoc to indexes.md
(https://github.com/ruby/irb/pull/812)

* Change indexes.rdoc to indexes.md

* Change indexes.rdoc to indexes.md

* Change indexes.rdoc to indexes.md

https://github.com/ruby/irb/commit/b1cd53cbf7
2023-12-20 19:11:02 +09:00
Stan Lo 2793a30b69 [ruby/irb] Warn users about errors in loading RC files
(https://github.com/ruby/irb/pull/817)

1. Because `IRB.rc_file` always generates an rc file name, even if the
   file doesn't exist, we should check the file exists before trying to
   load it.
2. If any type of errors occur while loading the rc file, we should
   warn the user about it.

https://github.com/ruby/irb/commit/37ffdc6b19
2023-12-20 19:11:01 +09:00
Takashi Kokubun 8d5af353b2 RJIT: Avoid retaining comments unless --rjit-dump-disasm
This significantly reduces retained objects on RJIT.
2023-12-19 00:05:19 -08:00
Takashi Kokubun eb872d1752 RJIT: Share rb_vm_insns_count for vm_insns_count 2023-12-18 23:55:40 -08:00
Nobuyoshi Nakada 46085ef970 [DOC] No ducuments for internal library 2023-12-19 10:20:40 +09:00
Samuel Giddins 83bdf127b8 Avoid warning when requiring bigdecimal/util when bigdecimal is in gemfile 2023-12-16 17:34:45 +09:00
Hiroshi SHIBATA 80d63fbea5 [ruby/readline] Bump up v0.0.4
https://github.com/ruby/readline/commit/7dbc5bd8d9
2023-12-16 13:49:13 +08:00
hogelog cb636fe707 [ruby/readline] Fix readline-ext gem loading in non Unix-like environments
https://github.com/ruby/readline/commit/6e1e5d0eb8
2023-12-16 13:49:12 +08:00
ima1zumi 20fbdae5fe [ruby/reline] Bump version to 0.4.1
(https://github.com/ruby/reline/pull/612)

https://github.com/ruby/reline/commit/8937279e0f
2023-12-16 13:47:04 +08:00
Hiroshi SHIBATA 4fd3c85acd
[ruby/ipaddr] Bump up v1.2.6
https://github.com/ruby/ipaddr/commit/247459faa5
2023-12-16 13:20:55 +08:00
Hiroshi SHIBATA 8936bb74c6 [ruby/abbrev] Bump up v0.1.2
https://github.com/ruby/abbrev/commit/b362e8e3b9
2023-12-16 13:06:47 +08:00
Hiroshi SHIBATA 2b3fc0407a
[ruby/securerandom] Bump up v0.3.1
https://github.com/ruby/securerandom/commit/890d659970
2023-12-16 12:10:38 +08:00
Hiroshi SHIBATA 1a244730a9
[ruby/open3] Bump up v0.2.1
https://github.com/ruby/open3/commit/b890922205
2023-12-16 11:48:49 +08:00
Hiroshi SHIBATA 6c7c4ac407 [ruby/rdoc] Bump up v6.6.2
https://github.com/ruby/rdoc/commit/895f1affc0
2023-12-16 11:42:30 +08:00
Hiroshi SHIBATA 711e85674e
Pin versions that are RubyGems 2.5.1 and Bundler 2.5.1 2023-12-16 10:13:35 +08:00
Samuel Giddins f4e9336d43
Partly pick commit from https://github.com/rubygems/rubygems/pull/7285
Refactor vendoring to allow validating vendoring is reproducible

  Helps ensure that unsuspecting diffs to the vendored code arent accidentally introduced
2023-12-16 10:13:20 +08:00
David Rodríguez 0ff34aa13e [rubygems/rubygems] More improves to default gem home selection for installation
https://github.com/rubygems/rubygems/commit/966daf7d42
2023-12-16 10:07:05 +08:00
David Rodríguez 299eb8d117 [rubygems/rubygems] Improve command suggestion when gems are missing
Previous attempt to use a full path when the running version is
different than the one that would be activated by default are different
was not correct.

This is because if this error happens in a `bundle exec` context, the
`Gem.loaded_specs` is cleared because we're in an exec'd process, so
will be always using a full path in these cases.

This alternative approach should do what I was expecting.

https://github.com/rubygems/rubygems/commit/e0bb8bf51b
2023-12-16 10:06:07 +08:00
David Rodríguez c8e9cd2b8b [rubygems/rubygems] Fix Ruby DSL no longer working as expected
https://github.com/rubygems/rubygems/commit/f6258e5679

Co-authored-by: AndrewSwerlick <andrew.swerlick@gmail.com>
2023-12-16 10:04:38 +08:00
Martin Emde f933cde939 [rubygems/rubygems] Let the guards have some space to breathe
https://github.com/rubygems/rubygems/commit/73f1609715
2023-12-15 19:36:24 +00:00
Martin Emde d9b39093e2 [rubygems/rubygems] Use a mutex around Checksum::Store @store access
Not wrapping to_lock since access to it is single threaded and
read-only at the time of writing the lockfile.

https://github.com/rubygems/rubygems/commit/3b53aa1b12
2023-12-15 19:36:24 +00:00
Martin Emde 1cfe874ef8 [rubygems/rubygems] Remove test-only & unused methods from Checksum::Store
https://github.com/rubygems/rubygems/commit/79636dec12
2023-12-15 19:36:24 +00:00
Samuel Giddins 5a66ea23d2 [rubygems/rubygems] Use mkdir_p helper in bundler.rb
Small refactor, no functional change

https://github.com/rubygems/rubygems/commit/5edb7a1026
2023-12-15 15:32:56 +00:00
Nobuyoshi Nakada 20f4f00764 [ruby/rdoc] [DOC] nodoc for probably internal methods
https://github.com/ruby/rdoc/commit/f7dd147a8c
2023-12-16 00:26:39 +09:00
Nobuyoshi Nakada e15d690db1 [ruby/rdoc] [DOC] Add missing documents
https://github.com/ruby/rdoc/commit/e4c90340d0
2023-12-16 00:26:37 +09:00
Nobuyoshi Nakada 578eb02b16 [ruby/rdoc] Require fileutils before using it
https://github.com/ruby/rdoc/commit/edb2523018
2023-12-16 00:25:53 +09:00
Nobuyoshi Nakada b257181ccc [ruby/rdoc] Remove unused method `RDoc::Encoding.remove_frozen_string_literal`
https://github.com/ruby/rdoc/commit/7a8e9a97fa
2023-12-16 00:25:51 +09:00
Samuel Giddins 1cd4b59e8c [rubygems/rubygems] Save array allocation for every dependency in Gemfile
Only need to check for lack of git key when branch option is present

https://github.com/rubygems/rubygems/commit/ebfca1b389
2023-12-15 14:53:10 +00:00
Samuel Giddins ca7f7c0f51 [rubygems/rubygems] Refactor vendoring to allow validating vendoring is reproducible
Helps ensure that unsuspecting diffs to the vendored code arent accidentally introduced

https://github.com/rubygems/rubygems/commit/7c425d49dd
2023-12-15 14:48:25 +00:00
David Rodríguez 7c72755da8 [rubygems/rubygems] Fix `ruby setup.rb` leaving traces in source folder
It's the `Gem::Installer` below what installs executables, and the code
being deleted here is now actually creating a `gems/` folder in the root
of the source repo when running `ruby setup.rb`.

https://github.com/rubygems/rubygems/commit/0e69a8b0d6
2023-12-15 11:52:38 +00:00
Hiroshi SHIBATA c3ae4b6ae1
Revert "[Bug #20060] Properly return matched gem name in case of EXACT"
This reverts commit 75c40802cb.

  This change is now working correctly with warning cases.
2023-12-15 14:06:53 +08:00
David Rodríguez 8e37cd8a8b Fix gem detection for names with dash 2023-12-15 14:04:36 +08:00
Kevin Newton 8bbe835cd8
Bump prism to version 0.19.0 2023-12-14 15:06:09 -05:00
David Rodríguez a79a1d3028 [rubygems/rubygems] Upgrade vendored libraries
To match the versions that will be included in final ruby release.

https://github.com/rubygems/rubygems/commit/84394919fb
2023-12-14 15:04:22 +00:00
Hiroshi SHIBATA e3631277c3
Removed duplicated LICENSE files 2023-12-14 20:22:49 +08:00
Vít Ondruch 612616925b
[rubygems/rubygems] Allow "default_user_install" to be overridden.
For Ruby re-distributors, automatic user-install might be the right
default. Therefore printing warning about installing into user directory
is not always desirable. Let the default_user_install method be
customizable.

https://github.com/rubygems/rubygems/commit/2320dba544
2023-12-14 20:22:49 +08:00
David Rodríguez 45b511433d
[rubygems/rubygems] Improve install advice when some gems are not found
This problem is quite specific to our dev environment, but I guess the
fix could be handy for other situations.

After merging a change to treat default gems as regular gems, I get this
when trying to run `rubocop` on our repo:

```
$ bin/rubocop  --only Performance/RegexpMatch
Could not find json-2.6.3 in locally installed gems
Run `bundle install --gemfile /Users/deivid/code/rubygems/rubygems/tool/bundler/lint_gems.rb` to install missing gems.
```

However, when running the suggested command, nothing changes and I still
get the same error:

```
$ bundle install --gemfile /Users/deivid/code/rubygems/rubygems/tool/bundler/lint_gems.rb
Using ast 2.4.2
Using bundler 2.4.10
Using json 2.6.3
Using parallel 1.23.0
Using racc 1.7.1
Using parser 3.2.2.3
Using rainbow 3.1.1
Using regexp_parser 2.8.1
Using rexml 3.2.5
Using rubocop-ast 1.29.0
Using ruby-progressbar 1.13.0
Using unicode-display_width 2.4.2
Using rubocop 1.52.1
Using rubocop-performance 1.14.2
Bundle complete! 2 Gemfile dependencies, 14 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

$ bin/rubocop  --only Performance/RegexpMatch
Could not find json-2.6.3 in locally installed gems
Run `bundle install --gemfile /Users/deivid/code/rubygems/rubygems/tool/bundler/lint_gems.rb` to install missing gems.
```

The problem is that our `bin/rubocop` script uses the development
version of Bundler (which has the change causing the problem), but the
advice recommands the default version of Bundler, which does not yet
have the change.

This commit changes the advice to recommend to use the same version of
Bundler that run into the problem in the first place.

So in the above situation you now get:

```
$ bin/rubocop  --only Performance/RegexpMatch
Could not find json-2.6.3 in locally installed gems
Run `/Users/deivid/code/rubygems/rubygems/bundler/exe/bundle install --gemfile /Users/deivid/code/rubygems/rubygems/tool/bundler/lint_gems.rb` to install missing gems.
```

And running that fixes the problem:

```
$ /Users/deivid//rubygems/rubygems/bundler/exe/bundle install --gemfile /Users/deivid/code/rubygems/rubygems/tool/bundler/lint_gems.rb
Fetching gem metadata from https://rubygems.org/.........
Fetching json 2.6.3
Installing json 2.6.3 with native extensions
Bundle complete! 2 Gemfile dependencies, 14 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
```

https://github.com/rubygems/rubygems/commit/10a9588c6d
2023-12-14 20:22:48 +08:00
David Rodríguez d718654bb1
[rubygems/rubygems] Remove extension building sync stuff no longer present in RubyGems
https://github.com/rubygems/rubygems/commit/59a85388b9
2023-12-14 20:22:48 +08:00
David Rodríguez 41095f4de0
[rubygems/rubygems] RubyGems > 3.2.0.rc.1 is now always provided
https://github.com/rubygems/rubygems/commit/929b521f3a
2023-12-14 20:22:48 +08:00
David Rodríguez 778438d423
[rubygems/rubygems] Gem::Specification always has `default_stubs` now
https://github.com/rubygems/rubygems/commit/30db1eb4a5
2023-12-14 20:22:48 +08:00
David Rodríguez 5cf6f7f885
[rubygems/rubygems] Remove more methods now defined in all RubyGems versions
https://github.com/rubygems/rubygems/commit/e015200ffa
2023-12-14 20:22:48 +08:00
David Rodríguez 7564038864
[rubygems/rubygems] Remove check only necessary for ancient RubyGems
https://github.com/rubygems/rubygems/commit/ffa2f03489
2023-12-14 20:22:48 +08:00
David Rodríguez 04dd2a8aae
[rubygems/rubygems] This patch should be no longer needed
https://github.com/rubygems/rubygems/commit/1139e90931
2023-12-14 20:22:48 +08:00
David Rodríguez b45c1523a8
[rubygems/rubygems] Gem::Specification.find_all_by_name is always defined now
https://github.com/rubygems/rubygems/commit/1d61c7686b
2023-12-14 20:22:48 +08:00
David Rodríguez b300f5a0e1
[rubygems/rubygems] Revert "Improve default gem handling"
This reverts commit https://github.com/rubygems/rubygems/commit/091b4fcf2b99.

https://github.com/rubygems/rubygems/commit/dcade3235f
2023-12-14 20:22:48 +08:00
Drew Stevenson beefce1444 [rubygems/rubygems] Warn for duplicate meta data links
Match order of METADATA_LINK_KEYS to order used by rubygems.org in Links model.
Add missing download_uri key.

https://github.com/rubygems/rubygems/commit/d2922cd6e9
2023-12-14 00:06:05 +00:00
Martin Emde c1f4bfd41f [rubygems/rubygems] Revert "Merge pull request #7167 from nevinera/add-json-output-option-to-bundle-outdated"
This reverts commit https://github.com/rubygems/rubygems/commit/a4ac5116b8ea, reversing
changes made to https://github.com/rubygems/rubygems/commit/8a6b180d0ae5.

https://github.com/rubygems/rubygems/commit/a1efe4015d
2023-12-13 22:50:45 +00:00
Hiroshi SHIBATA 5a0cbc9344 Detect bootsnap from all frames 2023-12-14 07:48:08 +09:00
Hiroshi SHIBATA 8b0c626962 Skip warning feature with Bootsnap
Bootsnap modified full feature path to require. We can't handle it for
  warning correctly.
2023-12-14 07:48:08 +09:00
Akira Matsuda 75c40802cb [Bug #20060] Properly return matched gem name in case of EXACT
this follows up 4e6861d337
2023-12-14 07:47:56 +09:00
Samuel Giddins baf2ec2ca8 [rubygems/rubygems] Use match? when regexp match data is unused
Improved performance / reduced allocations

https://github.com/rubygems/rubygems/commit/b04726c9a7
2023-12-13 22:00:26 +00:00
Martin Emde 7f4b271a61 [rubygems/rubygems] Store Checksum::Store indexed by spec.lock_name
https://github.com/rubygems/rubygems/commit/34d6c6c72f
2023-12-13 20:28:37 +00:00
Samuel Giddins 6aa26af683 [rubygems/rubygems] Add 3.4 as a supported ruby version
Since ruby trunk will be 3.4 very soon

https://github.com/rubygems/rubygems/commit/36dd9a35dc
2023-12-13 19:02:24 +00:00
Takashi Kokubun 0f1c7e3bcb
RJIT: Just skip generating code for aarch64/arm64 (#9221) 2023-12-13 09:36:06 -08:00
David Rodríguez a4b43e9264 [rubygems/rubygems] Add missing resolv, timeout, and net-protocol licenses
https://github.com/rubygems/rubygems/commit/00694651a3
2023-12-13 15:47:43 +00:00
tomoya ishida 745ab3e4c7 [ruby/irb] Warn and do nothing if block is passed to measure command
(https://github.com/ruby/irb/pull/813)

https://github.com/ruby/irb/commit/e79a90a1e6
2023-12-13 11:06:26 +00:00
Hiroshi SHIBATA a7ad9f3836
We need only one line for detecting caller gem name 2023-12-13 17:30:48 +09:00
Hiroshi SHIBATA 5f5f8dbbb6 [ruby/resolv] Bump up 0.3.0
https://github.com/ruby/resolv/commit/22153c2a45
2023-12-13 15:11:21 +09:00
David Rodríguez ac939d9ca3 [rubygems/rubygems] Improve default gem handling
If a gem is specified in the Gemfile (or resolved as a transitive
dependency), it's always resolved from remote/installed sources. Default
gems are only used as a fallback for gems not included in the bundle.

I believe this leads to more consistent behavior and more portable apps,
since all gems will be installed to the configured bundle path,
regardless of whether they are default gems or not.

https://github.com/rubygems/rubygems/commit/091b4fcf2b
2023-12-13 13:02:22 +09:00
David Rodríguez 1a7aa5560f [rubygems/rubygems] Refactor `bundle info`
https://github.com/rubygems/rubygems/commit/0e919eaa87
2023-12-13 13:02:22 +09:00
David Rodríguez 70428247c6 [rubygems/rubygems] Remove dead code
https://github.com/rubygems/rubygems/commit/fad186df39
2023-12-13 13:02:21 +09:00
David Rodríguez 6b3c9cebe9 Normalize bundler bindir
This makes bundler consistent with all other gems, and makes the default
installation of Bundler in the release package look like any other
bundler installation.

Before (on preview3, for example), Bundler executable is installed at:

lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/libexec/bundle

Now it's installed in the standard location:

lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/exe/bundle
2023-12-13 12:59:23 +09:00
Hiroshi SHIBATA 5015481e53 Removed duplicated LICENSE file 2023-12-13 12:16:55 +09:00
Vít Ondruch befbcfd90c [rubygems/rubygems] Explain the 3 states `options[:user_install]` can have.
This was issue previously, so hopefully this comment tries to state this
explicitly for future readers.

https://github.com/rubygems/rubygems/commit/8ccd830f85
2023-12-13 12:16:55 +09:00
Vít Ondruch 402fd96ddc [rubygems/rubygems] Make sure `--no-user-install` is respected for auto user installation
The `options[:user_install]` might have three states:
* `true`: `--user-install`
* `false`: `--no-user-install` and
* `nil`: option was not specified

However, this had not been respected previously and the `false` and `nil`
were treated the same. This could lead to auto user installation despite
`--no-user-install` being specified on the command line.

Fixes https://github.com/rubygems/rubygems/pull/7237

https://github.com/rubygems/rubygems/commit/9281545474
2023-12-13 12:16:55 +09:00
David Rodríguez 20d99a2f5f [rubygems/rubygems] Resolv needs vendoring too
https://github.com/rubygems/rubygems/commit/cdfc6923e4
2023-12-13 12:16:55 +09:00
David Rodríguez f188a41afe [rubygems/rubygems] Use vendored timeout from RubyGems
https://github.com/rubygems/rubygems/commit/cfc5018c54
2023-12-13 12:16:55 +09:00
David Rodríguez a7c9163b5d [rubygems/rubygems] Vendor timeout in RubyGems too
https://github.com/rubygems/rubygems/commit/e2e7440ede
2023-12-13 12:16:55 +09:00
David Rodríguez 90317472e8 [rubygems/rubygems] Use vendored net-http in Bundler
https://github.com/rubygems/rubygems/commit/0d758e8926
2023-12-13 12:16:55 +09:00
David Rodríguez ce924ce1fb [rubygems/rubygems] Vendor net-http and net-protocol in RubyGems
https://github.com/rubygems/rubygems/commit/99d91c9ed2
2023-12-13 12:16:55 +09:00
David Rodríguez 8d1a203664 [rubygems/rubygems] Require `rubygems/request` where it's used
https://github.com/rubygems/rubygems/commit/73b9498658
2023-12-13 12:16:55 +09:00
David Rodríguez 1572322e17
Sync with upstream rubygems (#9206) 2023-12-12 11:49:25 -08:00