87112 Commits

Author SHA1 Message Date
Hiroshi SHIBATA
452eb24b15
Added missing client_payload for ruby-build 2024-09-03 16:11:34 +09:00
Takashi Kokubun
1b8fb4860b Revert "Experiment with removing --profile ruby for now"
This reverts commit 6986536488ba23c033c043ef8765438f22df7bf5.

We were just missing the secrets.
2024-09-02 23:37:15 -07:00
Takashi Kokubun
6986536488 Experiment with removing --profile ruby for now 2024-09-02 23:31:58 -07:00
Takashi Kokubun
ad613d0884 Try to fix AWS_CLI_OPTS with AWS_ACCESS_KEY_ID 2024-09-02 23:29:43 -07:00
Takashi Kokubun
20c3401543 Drop --profile ruby on the release workflow 2024-09-02 23:25:20 -07:00
Zack Deveau
e7cb70be4e Improve String#rindex performance on OSX
On OSX, String#rindex is slow due to the lack of `memrchr`.
The fallback implementation finds a match by instead doing
a `memcmp` on every single character in the search string
looking for a substring match.

For OSX hosts, this changeset introduces a simple `memrchr`
implementation, `rb_memrchr`, that can be used instead. An
example benchmark below demonstrates an 8000 char long
search string with a 10 char substring near the end.

```
ruby-master | substring near the end | osx

UTF-8
       user     system      total        real
index  0.000111   0.000000   0.000111 (  0.000110)
rindex  0.000446   0.000005   0.000451 (  0.000454)
```

```
ruby-patched | substring near the end | osx

UTF-8
       user     system      total        real
index  0.000112   0.000000   0.000112 (  0.000111)
rindex  0.000057   0.000001   0.000058 (  0.000057)
```
2024-09-03 14:25:25 +09:00
Nobuyoshi Nakada
5fd3942466 [ruby/optparse] Prefer require_relative
https://github.com/ruby/optparse/commit/bb08cd47a8
2024-09-03 04:43:25 +00:00
Étienne Barrié
f4883e7904 [flori/json] Use the compiled extension in test
https://github.com/flori/json/commit/148afef84c
2024-09-03 11:51:51 +09:00
Jean Boussier
d612f9fd34 [flori/json] Remove outdated ifdef checks
`json` requires Ruby 2.3, so `HAVE_RUBY_ENCODING_H` and `HAVE_RB_ENC_RAISE`
are always true.

https://github.com/flori/json/commit/5c8dc6b70a
2024-09-03 11:51:51 +09:00
David Rodríguez
81c71efc55
Vendor securerandom in Bundler as well
It is loaded by `Fetcher` so in most case it's fine.

But if using `bundler/inline` and a gem need to be fetched,
`securerandom` will be loaded and cause a conflict.

Can be reproduced with:

```ruby
require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'
  gem 'graphql', '~> 2.0'
  gem 'graphql-client', '~> 0.18'
end

require 'json'
require 'graphql/client'
require 'graphql/client/http'
```

Ref: https://github.com/rails/rails/pull/52473#issuecomment-2284667451

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2024-09-03 10:49:13 +09:00
David Rodríguez
e66e3cf1b9
Change automatiek to properly vendor securerandom
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2024-09-03 10:49:13 +09:00
David Rodríguez
053caa313b
Fix gem exec rails new foo failing on Ruby 3.2
The default version of securerandom (0.2.2) gets activated by RubyGems,
but does not match Rails requirements (>= 0.3), leading to an error like
this:

```
$ gem exec rails new repro
/Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:2246:in `raise_if_conflicts': Unable to activate activesupport-7.2.1, because securerandom-0.2.2 conflicts with securerandom (>= 0.3) (Gem::ConflictError)
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:1383:in `activate'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:1421:in `block in activate_dependencies'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:1403:in `each'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:1403:in `activate_dependencies'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/specification.rb:1385:in `activate'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/core_ext/kernel_gem.rb:62:in `block in gem'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/core_ext/kernel_gem.rb:62:in `synchronize'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/core_ext/kernel_gem.rb:62:in `gem'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/exec_command.rb:193:in `activate!'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/commands/exec_command.rb:73:in `execute'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command.rb:326:in `invoke_with_build_args'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:255:in `invoke_command'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:194:in `process_args'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/command_manager.rb:152:in `run'
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/gem_runner.rb:56:in `run'
	from /Users/deivid/code/rubygems/rubygems/exe/gem:12:in `<main>'
```

Vendoring our own securerandom fixes the issue since that way we avoid
activating the gem internally.
2024-09-03 10:49:13 +09:00
David Rodríguez
24c51e1cbb
Let automatiek convert requires that are indented to require_relative as well 2024-09-03 10:49:13 +09:00
Nobuyoshi Nakada
a33416a333
Fix runnable symlinks
Fix symlinks to executable as relative paths from `bin` directory.
2024-09-03 09:59:28 +09:00
yui-knk
c93d07ed74 [Bug #20695] Do not create needless string object in parser
`set_parser_s_value` does nothing in parser therefore no need to
create string object in parser `set_yylval_node`.

# Object allocation

Run `ruby benchmarks/lobsters/benchmark.rb` with the patch

```diff
diff --git a/benchmarks/lobsters/benchmark.rb b/benchmarks/lobsters/benchmark.rb
index 240c50c..6cdd0ac 100644
--- a/benchmarks/lobsters/benchmark.rb
+++ b/benchmarks/lobsters/benchmark.rb
@@ -7,6 +7,8 @@ Dir.chdir __dir__
 use_gemfile

 require_relative 'config/environment'
+printf "allocated_after_load=%d\n", GC.stat(:total_allocated_objects)
+exit
 require_relative "route_generator"

 # For an in-mem DB, we need to load all data on every boot
```

## Before

```
ruby 3.4.0dev (2024-08-31T18:30:25Z master d6fc8f3d57) [arm64-darwin21]
...
allocated_after_load=2143519
```

## After

```
ruby 3.4.0dev (2024-09-01T00:40:04Z fix_bugs_20695 d1bae52f75) [arm64-darwin21]
...
allocated_after_load=1579662
```

## Ruby 3.3.0 for reference

```
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin21]
...
allocated_after_load=1732702
```
2024-09-03 08:40:07 +09:00
Peter Zhu
1b82d63462 Fix flaky test_latest_gc_info_need_major_by
It's possible for a GC to run between the calls of GC.latest_gc_info,
which would cause the test to fail. We can disable GC so that GC only
triggers manually.
2024-09-02 18:14:48 -04:00
Nobuyoshi Nakada
c1fecc5eab [rubygems/rubygems] Simplify Gem.read_binary and Gem.write_binary
Since `Gem.open_file` no longer locks the target file and is same as
`File.open` now, simply `Gem.read_binary` should read in binary mode.
Also the body of `Gem.write_binary` is same as `File.binwrite`.

https://github.com/rubygems/rubygems/commit/44df9045df
2024-09-02 17:28:50 +00:00
Nobuyoshi Nakada
1f00f6a09e [rubygems/rubygems] Avoid another race condition of open mode
Instead, just open in CREATE and APPEND mode.
Also, move the workaround for old Solaris as fallback to retry.

https://github.com/rubygems/rubygems/commit/2daad257be
2024-09-02 15:51:10 +00:00
Burdette Lamar
b539b43b2b [ruby/rdoc] [DOC] Fix links (https://github.com/ruby/rdoc/pull/1169)
https://github.com/ruby/rdoc/commit/a576ff890f
2024-09-02 15:36:53 +00:00
tomoya ishida
fe2db1bed9 [ruby/reline] Get console handle again and retry when Win32API call
fails
(https://github.com/ruby/reline/pull/734)

https://github.com/ruby/reline/commit/66291b5e3c
2024-09-02 14:34:39 +00:00
David Rodríguez
bb511c3f10 [rubygems/rubygems] Don't try to remove previous install folder if it's empty
Ruby ships with empty directories for default gems. If Ruby
installations has unsafe world-writable permissions, we will complain
when about to install a gem that happens to be also a default gem,
because we'll start by removing the previous install folder and that's
supposed to be insecure due to too loose permissions.

However, if the folder is empty, we don't actually need to remove
anything, so we can skip the whole thing, avoiding the errors.

https://github.com/rubygems/rubygems/commit/2f3cd8ac4e
2024-09-02 14:01:15 +00:00
David Rodríguez
b00b0d5f8f [rubygems/rubygems] Improve insecure gem overwrite message
https://github.com/rubygems/rubygems/commit/7c71dac22e
2024-09-02 14:01:14 +00:00
Jun Aruga
4303a02f46 CI: windows.yml: Drop pull-request - path-ignore.
It's to avoid the stucking "Windows result" job.
It seems only the files included in the list of the pull-request - path-ignore,
GitHub Actions "Windows result" permanently waits for the jobs that don't exist.
2024-09-02 15:36:09 +02:00
Jun Aruga
c853e48fc1 .travis.yml: Drop all the pipelines due to jobs not starting.
Remove `.travis.yml` as a temporary workaround.
2024-09-02 15:36:09 +02:00
Jun Aruga
3d83df2b96 .travis.yml: Allow failures for arm64/arm32 pipelines.
Right now, the arm64 servers on Travis took around 7 hours to start the jobs.
Therefore, allow failures for the arm64 and arm32 pipelines

https://app.travis-ci.com/github/ruby/ruby/builds/272105049
2024-09-02 15:36:09 +02:00
David Rodríguez
9d522cc44d [rubygems/rubygems] Make ruby-core check not depend on ENV
I found it useful to be able to use `GEM_COMMAND` outside of a ruby-core
env, so I made the ruby-core env detection not depend on it.

https://github.com/rubygems/rubygems/commit/6cb389c290
2024-09-02 12:31:15 +00:00
Takashi Kokubun
b6e7e903a0 redmine-backporter: Support matching multiple revs
with `done` command
2024-09-02 02:25:29 -07:00
Takashi Kokubun
7d47f3c94f redmine-backporter: Clarify the actual control flow
The `rev && has_commit(rev, "ruby_#{TARGET_VERSION.tr('.','_')}")`
case seems to be used if and only if it's manually specified in the
argument to the done command. It was hard to notice it with the previous
code.
2024-09-02 02:22:45 -07:00
dependabot[bot]
73c39a5f93 Bump actions/upload-artifact from 4.3.6 to 4.4.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.6 to 4.4.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](834a144ee9...50769540e7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-02 12:41:27 +09:00
git
0642f71a32 Update default gems list at 745b4775c5d8b28f6e5fa26b928239 [ci skip] 2024-09-02 02:30:26 +00:00
Hiroshi SHIBATA
745b4775c5 [ruby/logger] Bump up 1.6.1
https://github.com/ruby/logger/commit/bda937b4cc
2024-09-02 02:29:24 +00:00
Hiroshi SHIBATA
eb144ef91e Skip show_doc tests if RDoc is not available 2024-09-01 20:00:13 +09:00
Hiroshi SHIBATA
4aa3491bd2 Skip RDoc related feature if Gem::RDoc is not available 2024-09-01 20:00:13 +09:00
Nobuyoshi Nakada
185602e696 [ruby/io-console] Fix mixing declarations and code for older versions
https://github.com/ruby/io-console/commit/504292b487
2024-09-01 03:46:44 +00:00
Nobuyoshi Nakada
37db194c02 [ruby/io-console] Support older rubies
https://github.com/ruby/io-console/commit/cad8169568
2024-09-01 03:46:43 +00:00
Nobuyoshi Nakada
afd12873e0
Update dependencies of io-console 2024-09-01 12:00:12 +09:00
dependabot[bot]
44771e4a79 Bump github/codeql-action from 3.26.5 to 3.26.6
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.5 to 3.26.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2c779ab0d0...4dd16135b6)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-01 11:47:20 +09:00
Durable Programming Team
d6fc8f3d57 [rubygems/rubygems] fix @license typo preventing licenses from being correctly unmarshalled
https://github.com/rubygems/rubygems/commit/d6ba7ef79f
2024-08-31 18:30:25 +00:00
Nobuyoshi Nakada
e69945fc57 [ruby/io-console] Workaround for old TruffleRuby
https://github.com/ruby/io-console/commit/f10c946ac7
2024-08-31 08:43:59 +00:00
Nobuyoshi Nakada
4a1ea9b63a [ruby/io-console] Store console IO in Ractor-local storage
Ractor requires a shareable class has shareable constants only, but IO
is not shareable unless frozen.

https://github.com/ruby/io-console/commit/65e0ff895c
2024-08-31 08:43:59 +00:00
git
5dbb67a593 Update default gems list at 365ededfdf4fa33000411e63d7a1c2 [ci skip] 2024-08-31 05:46:57 +00:00
Nobuyoshi Nakada
365ededfdf [ruby/io-console] io-console is considered Ractor-safe
https://github.com/ruby/io-console/commit/b1adc15af7
2024-08-31 05:46:05 +00:00
git
2afde63eef * remove trailing spaces. [ci skip] 2024-08-31 05:22:36 +00:00
Hiroshi SHIBATA
32f134bb85
Added pre-release suffix for development version of default gems
https://github.com/ruby/stringio/issues/81
2024-08-31 14:22:17 +09:00
Hiroshi SHIBATA
f304afd26d
Added check method with released version of rubygems.org 2024-08-31 14:22:17 +09:00
git
a4ede0c4a8 Update default gems list at 7900128ab2d8c1d3c52e9c3e14df3c [ci skip] 2024-08-31 05:15:46 +00:00
Hiroshi SHIBATA
7900128ab2 [ruby/uri] Bump up 0.13.1
https://github.com/ruby/uri/commit/31ec9cea66
2024-08-31 05:14:54 +00:00
git
53d8dca3b3 Update default gems list at 818e3037ed8635ae2ed63a5d783cb3 [ci skip] 2024-08-31 05:05:21 +00:00
Takashi Kokubun
818e3037ed [ruby/zlib] Bump up 3.1.1
https://github.com/ruby/zlib/commit/d756bb0a0f
2024-08-31 05:04:30 +00:00
Mari Imaizumi
a2b3cb65ea [ruby/reline] Implement re-read-init-file
(https://github.com/ruby/reline/pull/740)

https://github.com/ruby/reline/commit/59e4ade807
2024-08-31 03:26:50 +00:00