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

12685 Коммитов

Автор SHA1 Сообщение Дата
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
Stan Lo d1cf793adc [ruby/irb] Remove documents about deprecated/WIP features and some
slight adjustments
(https://github.com/ruby/irb/pull/811)

https://github.com/ruby/irb/commit/6a9193e88b
2023-12-12 18:46:07 +00:00
Martin Emde f671c5d179 [rubygems/rubygems] Make RubyDsl a little easier to read; avoid a Hash sometimes
https://github.com/rubygems/rubygems/commit/2dca83722b
2023-12-12 15:26:01 +00:00
Martin Emde d1c25605f6 [rubygems/rubygems] Resolve `ruby file: ".ruby-version"` relative to Gemfile
https://github.com/rubygems/rubygems/commit/0cbbaed8a5
2023-12-12 12:40:17 +00:00
Stan Lo 28a9a4275c [ruby/irb] Remove trailing space
This is required to fix ruby/ruby's CI

https://github.com/ruby/irb/commit/3c77213209
2023-12-12 11:27:39 +00:00
Burdette Lamar 35990cb38c [ruby/irb] [DOC] RDoc for module IRB
(https://github.com/ruby/irb/pull/738)

[DOC] RDoc for module IRB

https://github.com/ruby/irb/commit/f3a0626298
2023-12-12 10:34:38 +00:00
Nobuyoshi Nakada e411bd5b36 [ruby/securerandom] [DOC] Satisfy RDoc coverage
https://github.com/ruby/securerandom/commit/ddf2672e47
2023-12-12 06:40:44 +00:00
Nobuyoshi Nakada dbd704ae6f [ruby/securerandom] [DOC] Add documents of methods and constants
https://github.com/ruby/securerandom/commit/9a99978135
2023-12-12 06:40:43 +00:00
Yusuke Endoh cb93d10ae5 [ruby/securerandom] [DOC] Improve the document about reproducibility of uuid_v7
https://github.com/ruby/securerandom/pull/19/files#r1329476195

https://github.com/ruby/securerandom/commit/156cbb8448
2023-12-12 06:36:10 +00:00
Martin Emde 1e5c8afb15 [rubygems/rubygems] Ensure that the lockfile mtime is not altered on frozen install
https://github.com/rubygems/rubygems/commit/6847709ee0
2023-12-12 02:39:57 +00:00
Samuel Giddins e223dde329 [rubygems/rubygems] Allow bundle pristine to run in parallel
Also fix running when BUNDLE_NO_INSTALL happens to be set, same as with install/update commands

https://github.com/rubygems/rubygems/commit/a555fd6ccd
2023-12-12 02:10:53 +00:00
Franz Liedke 6414f260fc [rubygems/rubygems] Refactor: Wrap filesystem access
https://github.com/rubygems/rubygems/commit/119d4bdc09
2023-12-12 01:08:20 +00:00
Franz Liedke 0653fb026c [rubygems/rubygems] Refactor: Move filesystem access into Definition class
https://github.com/rubygems/rubygems/commit/2720da2659
2023-12-12 01:08:20 +00:00
Franz Liedke 0ec88b54f3 [rubygems/rubygems] bundle lock: Always touch the lockfile
https://github.com/rubygems/rubygems/commit/fd2e71dfdb
2023-12-12 01:08:19 +00:00
David Rodríguez a848c070d2
[rubygems/rubygems] Remove doc not adding much value
https://github.com/rubygems/rubygems/commit/c241a88962
2023-12-12 10:04:57 +09:00
David Rodríguez 0b24c71a5a
[rubygems/rubygems] Improve enabling bundled gems warnings
https://github.com/rubygems/rubygems/commit/7be5b40ca9
2023-12-12 10:04:57 +09:00
David Rodríguez a06bf001b2
[rubygems/rubygems] Remove non-transparent requirement added to prerelease gems
I think we can safely assume these days that all RubyGems and Bundler
versions that will ever bundle a new gem created in 2023 support
prereleases.

So this non transparent requirement is not necessary.

In my opinion, it should be the gem author to explicitly add this
constraint, not RubyGems.

https://github.com/rubygems/rubygems/commit/b165e6d725
2023-12-12 10:04:57 +09:00
Vít Ondruch b37288c047
[rubygems/rubygems] Make the "auto-user-install" logic easier to follow
https://github.com/rubygems/rubygems/commit/4b4d9c0106
2023-12-12 10:04:56 +09:00
David Rodríguez c032dfb5cb
[rubygems/rubygems] Fix installing from source when same bundler version already a default gem
https://github.com/rubygems/rubygems/commit/620119308e
2023-12-12 10:04:56 +09:00
David Rodríguez 23289ad45b
[rubygems/rubygems] Extract some common strings to variables
https://github.com/rubygems/rubygems/commit/48bc573310
2023-12-12 10:04:56 +09:00
David Rodríguez a811ebf3d5
[rubygems/rubygems] Revert missing extensions patch
https://github.com/rubygems/rubygems/commit/4016c6c024
2023-12-12 10:04:56 +09:00
Samuel Giddins 505715ddf1 [rubygems/rubygems] Fewer allocations in gem installation
For now, on a small rails app I have hanging around:

```
==> memprof.after.txt <==
Total allocated: 872.51 MB (465330 objects)
Total retained:  40.48 kB (326 objects)

==> memprof.before.txt <==
Total allocated: 890.79 MB (1494026 objects)
Total retained:  40.40 kB (328 objects)
```

Not a huge difference in memory usage, but it's a drastic improvement
in total number of allocations.

Additionally, this will pay huge dividends once
https://github.com/ruby/zlib/pull/61 is merged, as it will allow us to
completely avoid allocations in the repeated calls to readpartial,
which currently accounts for most of the memory usage shown above.

https://github.com/rubygems/rubygems/commit/f78d45d927
2023-12-11 23:14:58 +00:00
Martin Emde e186cebe42 [rubygems/rubygems] Override initialize in bundle rubygems_ext for NameTuple
https://github.com/rubygems/rubygems/commit/f63ce682d2
2023-12-11 15:40:08 +00:00
Daisuke Aritomo 1ab91b12fa [rubygems/rubygems] Stream output from ext builds when --verbose
Uses Open3.popen2e in place of Open3.capture2e in Gem::Ext::Builder.
This change aims to stream stdout/stderr of ext builds when in verbose
mode, instead of printing everything at once when the build completes.

Nice for debugging gem builds that consumes longer times.

https://github.com/rubygems/rubygems/commit/dcdcb5adda
2023-12-11 11:07:36 +00:00
Stan Lo 130268e264 [ruby/irb] Simplify show_source's super calculation
(https://github.com/ruby/irb/pull/807)

https://github.com/ruby/irb/commit/2cccc448de
2023-12-10 04:21:46 +00:00
Yusuke Endoh edb8fc24d4 [ruby/error_highlight] Bump version
https://github.com/ruby/error_highlight/commit/942a723d32
2023-12-09 08:34:08 +00:00
Benoit Daloze a94a2eea34 [rubygems/rubygems] Upstream RubyGems changes from TruffleRuby
https://github.com/rubygems/rubygems/commit/749a508968
2023-12-08 17:01:23 +00:00
Schneems f2c13ff9e8 [ruby/syntax_suggest] v2.0.0
https://github.com/ruby/syntax_suggest/commit/53b2a1b03c
2023-12-08 16:49:33 +00:00
Akinori MUSHA 49cdf063d6 [ruby/set] Bump version to 1.0.4
https://github.com/ruby/set/commit/efc8c8c9f5
2023-12-08 12:37:30 +00:00
Hiroshi SHIBATA cc9826503d
Revert "Skip to warn like 'bigdecimal/util' feature."
This reverts commit 8f6cf72e66.
2023-12-08 20:25:04 +09:00
David Rodríguez 01a2a0abc6 [rubygems/rubygems] Migrate documentation to be generated with nronn
https://github.com/rubygems/rubygems/commit/55281f0eaa
2023-12-08 16:01:01 +09:00
David Rodríguez 1c3aa4b977 [rubygems/rubygems] Add extra blank line to `bundle outdated` docs
If it's not there, when migrating to `nronn`, generated man page is
messed up.

https://github.com/rubygems/rubygems/commit/7161347648
2023-12-08 16:01:01 +09:00
David Rodríguez dc64a04a12 [rubygems/rubygems] Revert "Merge pull request #7148 from Paul-Bob/improvement/include_response_body_on_fetch_http_error"
This reverts commit https://github.com/rubygems/rubygems/commit/e5a4fd9eb617, reversing
changes made to https://github.com/rubygems/rubygems/commit/c5a5363b0c98.

https://github.com/rubygems/rubygems/commit/e21c45c4c3
2023-12-08 16:01:01 +09:00
Hiroshi SHIBATA 8f6cf72e66
Skip to warn like 'bigdecimal/util' feature. 2023-12-08 15:57:08 +09:00
David Rodríguez 64e985333f Improve bundled gems warnings for subfeatures
Before, when requiring "bigdecimal/math" in a Bundler context:

> /Users/deivid/.asdf/installs/ruby/3.3.0-dev/lib/ruby/3.3.0+0/bigdecimal/math.rb:2: warning: bigdecimal was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec.

After:

> foo.rb:1: warning: bigdecimal/math is found in bigdecimal, which will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec.
2023-12-08 15:55:15 +09:00
David Rodríguez a530dfef2b Improve bundled gem warnings
Before, when requiring "bigdecimal" in a Bundler context:

> foo.rb:1: warning: bigdecimal which will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec.

After:

> foo.rb:1: warning: bigdecimal was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec.
2023-12-08 15:55:15 +09:00
David Rodríguez d61af5c49a The SINCE and WARNED hashes take gem names, not features 2023-12-08 15:55:15 +09:00
Samuel Giddins 4817166e54 [rubygems/rubygems] Extract generate_index command to rubygems-generate_index gem
So generate_index can be implemented with dependencies, such as the compact index

Took this approach from feedback in https://github.com/rubygems/rubygems/pull/6853

Running `gem generate_index` by default will use an installed rubygems-generate_index, or install and then use the command from the gem

Apply suggestions from code review

https://github.com/rubygems/rubygems/commit/fc1cb9bc9e

Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
2023-12-08 06:09:51 +00:00
Martin Emde 0166d56f2b [rubygems/rubygems] Don't memoize in NameTuple lock_name
The result of this is already memoized and no other NameTuple
methods memoize.

https://github.com/rubygems/rubygems/commit/b7cce0c64a
2023-12-08 05:51:03 +00:00
Yuji Yaginuma 8bb90f4d77 [rubygems/rubygems] Use `Minitest::TestTask` in a template file for `minitest`
`minitest` has introduced a rake task for running test on 5.16.0.
https://github.com/minitest/minitest/blob/master/History.rdoc#5160--2022-06-14-

This has some tasks related to running tests and it's useful for
`minitest` user I think.
https://github.com/minitest/minitest#rake-tasks-

This PR changed to use the task in a template file for `minitest`

https://github.com/rubygems/rubygems/commit/7a86d13062
2023-12-08 03:25:43 +00:00
David Rodríguez 2755cb1b2f [rubygems/rubygems] Use modern hashes consistently
https://github.com/rubygems/rubygems/commit/bb66253f2c
2023-12-07 22:29:33 +00:00
Stan Lo 5809b75019 [ruby/irb] Debugging command warning should not be specific to the
`debug` command
(https://github.com/ruby/irb/pull/806)

https://github.com/ruby/irb/commit/b7b57311cc
2023-12-07 16:09:15 +00:00
Kevin Newton 10bc0bd4ab [ruby/prism] Remove warnings check from parse_success? method
https://github.com/ruby/prism/commit/e30a241fb3
2023-12-07 14:39:11 +00:00
Hiroshi SHIBATA a41d6c825c [ruby/open-uri] Bump up 0.4.1
https://github.com/ruby/open-uri/commit/d72508a7f4
2023-12-07 07:22:20 +00:00
Andrew Kane 41c00bc97e [ruby/open-uri] Set default for max_redirects and add exception class
https://github.com/ruby/open-uri/commit/dcdcb885cc
2023-12-07 07:00:54 +00:00
Andrew Kane d97479f9c9 [ruby/open-uri] Add :max_redirects option
https://github.com/ruby/open-uri/commit/7fd5ea09a7
2023-12-07 07:00:53 +00:00
Ellen Marie Dash 7d32830b8c [rubygems/rubygems] Make --build-root disable auto-user-install.
https://github.com/rubygems/rubygems/commit/6a06b0763f
2023-12-07 13:56:23 +09:00
David Rodríguez 33bd956257 [rubygems/rubygems] Better approach to falling back to user installation when GEM_HOME not writable
https://github.com/rubygems/rubygems/commit/f67bced16b
2023-12-07 13:56:22 +09:00
Vít Ondruch aabf2ce181 [rubygems/rubygems] Use globals variables for standard input/output
Replace use of `STDIN`, `STDOUT` and `STDERR` constants by their
`$stdin`, `$stdout` and `$stderr` global variable equivalents.

This enables easier testing via standard means, such as `assert_output`
for minitest or `expect { print 'foo' }.to output.to_stdout` for RSpec
test suites.

https://github.com/rubygems/rubygems/commit/a0a6fc1b76
2023-12-07 13:55:31 +09:00
Hiroshi SHIBATA 214f6d6598 Move replace_require into bundled_gems.rb 2023-12-07 11:37:08 +09:00
Kevin Newton fe6ee5e921 [ruby/prism] Move flag position consistently to front
https://github.com/ruby/prism/commit/6e69a81737
2023-12-06 20:50:02 +00:00
Eric Mueller 9336bbb0b2 [rubygems/rubygems] Bundler::Fetcher uses Bundler::CIDetector
Additionally, the result is memoized, as it's used twice in a row.

This change does result in a net behavioral diff, as the list of ENVs
being checked has been updated (now includes buildkite, taskcluster,
cirrus, dsari, and drops buildbox and snap)

https://github.com/rubygems/rubygems/commit/3fb445a5a1
2023-12-06 20:05:25 +00:00
Eric Mueller 6fd3b358ff [rubygems/rubygems] Duplicate Gem::CIDetector into bundler
Because bundler needs to support older versions of rubygems, we can't
actually rely on Gem::CIDetector (yet - in a year or so they might be
able to consolidate, if they don't change futher). So we're copying it
into the Bundler:: namespace, and enforcing that they stay completely in
sync with a test. No other tests are needed, since Gem::CIDetector is
already tested, and this is and will remain identical.

https://github.com/rubygems/rubygems/commit/abc67f0da1
2023-12-06 20:05:25 +00:00
Eric Mueller a6c912a80d [rubygems/rubygems] Gem::UpdateSuggestion uses Gem::CIDetector
https://github.com/rubygems/rubygems/commit/e5b0458342
2023-12-06 20:05:24 +00:00
Eric Mueller b1b78c4f9f [rubygems/rubygems] Introduce the Gem::CIDetector
This is based on the list in Gem::UpdateSuggestion and Bundler::Fetcher;
these have similar purposes (determining whether/what CI we're executing
in), and can benefit from being combined and updated (they're both
slightly out of date).

Noteable changes:
* We'll consider ourselves to be on a CI in more cases - if CI_NAME or
  TASKCLUSTER_ROOT_URL are set specifically, since those represent two
  cases that were either overlooked or are no longer covered by the
  existing implementation. (Or possibly TaskCluster still does provide
  RUN_ID, but failed to document it)
* We will notice/track a few additional services in ci_strings (cirrus,
  dsari, taskcluster), stop tracking 'snap' (they went under in 2017),
  and update buildbox to buildkite (they've been called that for 8
  years, and the BUILDBOX envs have been deprecated for 3).
* We'll also sort/uniq/downcase the values (all of which only matter
  because of the special case of CI_NAME).

https://github.com/rubygems/rubygems/commit/60652b942f
2023-12-06 20:05:23 +00:00
Hiroshi SHIBATA d411d8f5fe [rubygems/rubygems] Try to load Gem::BUNDLED_GEMS on Bundler
`bundle exec ruby foo.rb` ignore to load gem_prelude.rb. Because warnings feature
  is not working with `bundle exec ruby`.

https://github.com/rubygems/rubygems/commit/a0d4ed92a7
2023-12-06 10:10:44 +00:00
Nobuyoshi Nakada e03e872eea [ruby/rdoc] Only word-ending colon separates new definition
When followed by non-space characters, rather it looks like a URL or a
path name on Windows.

https://github.com/ruby/rdoc/commit/72c6560773
2023-12-06 09:35:44 +00:00
Nobuyoshi Nakada 379f06797d [ruby/rdoc] Needs more backslash to match escaping backslashs
https://github.com/ruby/rdoc/commit/1904e9076d
2023-12-06 09:35:43 +00:00
Martin Emde d9a1bb4b09 [rubygems/rubygems] Use String#unpack1 available since ruby 3.0
https://github.com/rubygems/rubygems/commit/46258d6cb4
2023-12-06 02:45:37 +00:00
Martin Emde 5f0ea3f590 [rubygems/rubygems] Converts Bundler lockfile checksum validation to opt-in only
Looks for the CHECKSUMS section in the lockfile, activating the feature
only if the section exists. Without a CHECKSUMS section, Bundler will
continue as normal, validating checksums when gems are installed while
checksums from the compact index are present.

https://github.com/rubygems/rubygems/commit/2353cc93a4
2023-12-05 21:09:53 +00:00
Schneems c175e265da [ruby/syntax_suggest] Remove duplicate error messages
Before:

```
Expected a newline or semicolon after the statement
Cannot parse the expression
Expected a newline or semicolon after the statement
Cannot parse the expression

   1  describe "webmock tests" do
  22    it "body" do
  27      query = Cutlass::FunctionQuery.new(
> 28        port: port
> 29        body: body
  30      ).call
  34    end
  35  end
```

After:

```
Expected a newline or semicolon after the statement
Cannot parse the expression

   1  describe "webmock tests" do
  22    it "body" do
  27      query = Cutlass::FunctionQuery.new(
> 28        port: port
> 29        body: body
  30      ).call
  34    end
  35  end
```

https://github.com/ruby/syntax_suggest/commit/becf097e5e
2023-12-05 17:51:29 +00:00
Schneems 6d39d6d214 [ruby/syntax_suggest] Update docs, clean up PR
Removes or updates mentions of Ripper

https://github.com/ruby/syntax_suggest/commit/08aaa3f50a
2023-12-05 17:51:29 +00:00
Schneems 62c9695911 [ruby/syntax_suggest] Support lexing with Prism
https://github.com/ruby/syntax_suggest/commit/7f4176a914
2023-12-05 17:51:28 +00:00
Schneems cce29750d7 [ruby/syntax_suggest] Initial support for the prism parser
Prism will be the parser in Ruby 3.3. We need to support 3.0+ so we will have to "dual boot" both parsers.

Todo:

- LexAll to support Prism lex output
- Add tests that exercise both Ripper and prism codepaths on CI
- Handle https://github.com/ruby/prism/issues/1972 in `ripper_errors.rb`
- Update docs to not mention Ripper explicitly
- Consider different/cleaner APIs for separating out Ripper and Prism

https://github.com/ruby/syntax_suggest/commit/a7d6991cc4
2023-12-05 17:51:27 +00:00
Stan Lo b29ed63883 [ruby/irb] Bump version to v1.10.1
(https://github.com/ruby/irb/pull/801)

https://github.com/ruby/irb/commit/a1e431bd83
2023-12-05 16:34:19 +00:00
Stan Lo f55746a93d [ruby/irb] Disable pager when TERM is not set too
(https://github.com/ruby/irb/pull/802)

https://github.com/ruby/irb/commit/173980974b
2023-12-05 16:32:13 +00:00
Stan Lo ef387e6730 [ruby/irb] Pager should be disabled when TERM=dumb
(https://github.com/ruby/irb/pull/800)

For apps/libs that test against IRB, it's recommended to set `TERM=dumb`
so they get minimum disruption from Reline's interactive-focus features.

Therefore, we should follow the convention to disable pager when `TERM=dumb`.

https://github.com/ruby/irb/commit/8a3002a39e
2023-12-05 16:03:06 +00:00
Nobuyoshi Nakada 113f5d7fd7 [ruby/rdoc] Allow any single-word token upto 2 before C method implementation
Previously only unknown word `intern` is allowed between a single-word
token before a C method.  Now any single-word token, such as `inline`
which is used for `ArithmeticSequence` in enumerator.c, is allowed
instead.

https://github.com/ruby/rdoc/commit/3a214c1dd1
2023-12-05 08:48:19 +00:00
Nobuyoshi Nakada c0baa3783f [ruby/rdoc] Reduce matched substring allocations
https://github.com/ruby/rdoc/commit/aaed688a97
2023-12-05 08:48:18 +00:00
Hiroshi SHIBATA d691b1a141 [ruby/rdoc] Bump up 6.6.1
https://github.com/ruby/rdoc/commit/7cf353a696
2023-12-05 07:37:08 +00:00
Hiroshi SHIBATA f19de1289b [ruby/tempfile] Bump up 0.2.1
https://github.com/ruby/tempfile/commit/1450bb4f1c
2023-12-05 07:02:17 +00:00
Akshay Birajdar 494e2e4bfb [ruby/tempfile] Alias #to_s to #inspect
https://github.com/ruby/tempfile/commit/e515889412
2023-12-05 06:43:42 +00:00
Hiroshi SHIBATA e7cc791838 [ruby/cgi] Bump up 0.4.1
https://github.com/ruby/cgi/commit/929e6264b5
2023-12-05 06:38:55 +00:00
Toshimaru 56ccad060d [ruby/rdoc] Early return when `token_stream` is `nil`
https://github.com/ruby/rdoc/commit/04f75d8516

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-12-05 06:21:52 +00:00
toshimaru cda431f538 [ruby/rdoc] fix: fix `NoMethodError` when `token_stream` is nil
The change in #1055 might be a breaking change.
So, just simply wrap `token_stream` with `Array`

https://github.com/ruby/rdoc/commit/d8c19d7fa1

Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
2023-12-05 06:21:51 +00:00
David Rodríguez 16669cd6ad [rubygems/rubygems] Fix crash when duplicating a dev dependency in Gemfile & gemspec
https://github.com/rubygems/rubygems/commit/e78c0a4a48
2023-12-05 14:28:42 +09:00
David Rodríguez 7ab877761e [rubygems/rubygems] Instead of checking writability, try to write
Checking writability is prone to errors. For example:

$ mkdir -p foo/bar
$ chmod -w foo
$ touch foo/bar/baz # succeeds even if foo is not writable

https://github.com/rubygems/rubygems/commit/6056138b6a
2023-12-05 14:28:41 +09:00
Mau Magnaguagno 57178a9720 [rubygems/rubygems] Prefer String#split with block in Gem::YAMLSerializer#load
String#split supports a block since Ruby 2.6, avoiding intermediate array.

https://github.com/rubygems/rubygems/commit/69cdf9e9d4
2023-12-05 14:28:39 +09:00
Mau Magnaguagno 5f789350dc [rubygems/rubygems] Prefer String#split with block in Bundler::CompactIndexClient::Cache#versions
String#split supports a block since Ruby 2.6, avoiding intermediate array.

https://github.com/rubygems/rubygems/commit/4e864a8f2e
2023-12-05 14:28:39 +09:00
Mau Magnaguagno a3cd7b3e27 [rubygems/rubygems] Prefer String#split with block in Bundler::YAMLSerializer#load
String#split supports a block since Ruby 2.6, avoiding intermediate array.

https://github.com/rubygems/rubygems/commit/5b324969cd
2023-12-05 14:28:38 +09:00
Schneems 5a2d70ef73 [ruby/syntax_suggest] Bump minimum Ruby version & update standardrb
https://github.com/ruby/syntax_suggest/commit/73753518e9
2023-12-04 22:29:44 +00:00
Schneems 13482ab1e6 [ruby/syntax_suggest] Update standardrb to Ruby 3.0 standards
https://github.com/ruby/syntax_suggest/commit/2771dcabe0
2023-12-04 22:18:40 +00:00
Kevin Newton d35aa58b2f [ruby/prism] Fix up docs for lex_compat
https://github.com/ruby/prism/commit/9131e84060
2023-12-04 17:15:19 +00:00
Kevin Newton ea9f89eeb6 [ruby/prism] Ripper compat docs update
https://github.com/ruby/prism/commit/5f70b32b02
2023-12-04 17:00:14 +00:00
Stan Lo 52eabf2e32 [ruby/irb] Bump version to v1.10.0
(https://github.com/ruby/irb/pull/798)

https://github.com/ruby/irb/commit/4acc9b8d6c
2023-12-03 17:06:41 +00:00
jinroq d4b1f56f50
[Fix] Support when nil is assigned to variable `name` (#9105)
* Add `!name.nil?` to if condition
2023-12-02 13:17:53 -08:00
Nobuyoshi Nakada c9c1670f7e [ruby/rdoc] Markup punctuations need to be separated with a space
https://github.com/ruby/rdoc/commit/83f0149fc1
2023-12-02 12:40:12 +00:00
Gary Tou 4ee1f0fb5d [ruby/irb] Implement `history` command
(https://github.com/ruby/irb/pull/761)

* Implement `history` command

Lists IRB input history with indices. Also aliased as `hist`.

* Add tests for `history` command

* Address feedback: `puts` with multiple arguments instead of `join`ing

* Address feedback: Handle nil from splitting an empty input string

* Refactor line truncation

* Add `-g` grep option to `history` command

* Add `history` command to README

* Remove unused `*args` parameter

* Allow spaces to be included in grep

* Allow `/` to be included in grep regex

* Handle `input` being an empty string

* Exclude "#{index}: " from matching the grep regex

* Add new line after joining

https://github.com/ruby/irb/commit/3f9eacbfa9
2023-12-02 04:32:04 +00:00
Kevin Newton 492c82cb41 [ruby/prism] Prism.parse_success?(source)
A lot of tools use Ripper/RubyVM::AbstractSyntaxTree to determine
if a source is valid. These tools both create an AST instead of
providing an API that will return a boolean only.

This new API only creates the C structs, but doesn't bother
reifying them into Ruby/the serialization API. Instead it only
returns true/false, which is significantly more efficient.

https://github.com/ruby/prism/commit/7014740118
2023-12-01 20:53:34 +00:00
Samuel Giddins 0ed55bf097 [rubygems/rubygems] Reduce array allocations when loading definition
The same array was being re-created in a loop (as well as the `generic_local_platform`), which is avoidable by hoisting it to a frozen array created once

https://github.com/rubygems/rubygems/commit/009a3c6d0d
2023-12-01 19:50:03 +00:00
Kevin Newton ec83bd7356 [ruby/prism] Provide heredoc? queries
https://github.com/ruby/prism/commit/e148e8fe6a
2023-12-01 18:46:52 +00:00
hogelog ef466ac931 [ruby/irb] Scrub past history input before split
(https://github.com/ruby/irb/pull/795)

* Scrub past history input before split

* Don't rewrite ENV["LANG"]

https://github.com/ruby/irb/commit/0f344f66d9
2023-12-01 18:04:03 +00:00
Eric Mueller 73440e1ef2 [rubygems/rubygems] Many major_deprecations supply :removed_message
Generally the removed message is very similar, but often it needs to
specify that the feature has "been removed" instead of "will be
removed", or "been deprecated". And a few chunks of text needed more
substantial updates. And a number of them seemed to have been carefully
crafted to make sense in either context, so I left those alone.

https://github.com/rubygems/rubygems/commit/8d42cf9104
2023-12-01 17:52:38 +00:00
Eric Mueller 079dfa1812 [rubygems/rubygems] major_deprecation accepts :removed_message
If supplied, it uses that in place of the message for the case where the
deprecation version is already past.

https://github.com/rubygems/rubygems/commit/1deb73663c
2023-12-01 17:52:37 +00:00
Kevin Newton cdb74d74af [ruby/prism] Change numbered parameters
Previously numbered parameters were a field on blocks and lambdas
that indicated the maximum number of numbered parameters in either
the block or lambda, respectively. However they also had a
parameters field that would always be nil in these cases.

This changes it so that we introduce a NumberedParametersNode that
goes in place of parameters, which has a single uint8_t maximum
field on it. That field contains the maximum numbered parameter in
either the block or lambda.

As a part of the PR, I'm introducing a new UInt8Field type that
can be used on nodes, which is just to make it a little more
explicit what the maximum values can be (the maximum is actually 9,
since it only goes up to _9). Plus we can do a couple of nice
things in serialization like just read a single byte.

https://github.com/ruby/prism/commit/2d87303903
2023-12-01 12:03:09 -05:00
Martin Emde cbe57caa24 [ruby/prism] Fix comments after HEREDOCs again.
The problem was deeper than just looking back a single token.
You can push the heredoc_end token way back into the list.
We need to save the last location of a heredoc end to see if
it's the last token in the file.

Fixes https://github.com/ruby/prism/pull/1954

https://github.com/ruby/prism/commit/91dfd4eecd
2023-12-01 15:17:20 +00:00
Kevin Newton abb1fe2868 [PRISM] Consolidate prism encoding files 2023-11-30 21:37:56 -05:00
Kevin Newton 10d3897e13 [PRISM] Big5 encodings 2023-11-30 21:37:56 -05:00
Kevin Newton 7b5bb978fb [PRISM] Alias CP51932 to EUC-JP 2023-11-30 21:37:56 -05:00
Kevin Newton 9ba92327f2 [PRISM] Consolidate SJIS encodings 2023-11-30 21:37:56 -05:00
Ellen Marie Dash 7008d97b76 [rubygems/rubygems] Only show "Defaulting to user installation" message when it matters.
https://github.com/rubygems/rubygems/commit/61b0947225
2023-11-30 19:58:40 +00:00