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

87136 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA ae98d19cf9 Test with Ubuntu 24.04 2024-09-04 18:21:53 +09:00
Hiroshi SHIBATA 56817865d6 [rubygems/rubygems] Removed unused stringio
Fixed https://github.com/rubygems/rubygems/pull/7996

https://github.com/rubygems/rubygems/commit/16bfcac883
2024-09-04 08:57:17 +00:00
git 7fc1fd8977 Update bundled gems list as of 2024-09-04 2024-09-04 07:02:15 +00:00
Nobuyoshi Nakada e884d65094
Ignore blocks to `Test::Unit::Assertions#pend` silently
Although `pend` in test-unit gem expects the block does not pass if it
is given, our `pend` should ignore the block silently as same as it
just skips the test with no message by default.  Add an unused
parameter, to suppress the warning for the block to be ignored.
2024-09-04 14:49:25 +09:00
Hiroshi SHIBATA a3e08718b4
Use bundler/inline to download diffy gem 2024-09-04 14:44:34 +09:00
ydah ab18b1b4f5 Implement VALIAS NODE keyword locations 2024-09-04 14:36:35 +09:00
Nobuyoshi Nakada 37d7ae06af
[Bug #20708] Retry `open` on EINTR
Co-Authored-By: Martin Dorey <martin.dorey@hds.com>
2024-09-04 10:42:48 +09:00
Nobuyoshi Nakada ade240e578
Adjust indents [ci skip] 2024-09-04 10:28:52 +09:00
Jeremy Evans 08f14b8d4c
Allow Errno::EACCES when testing connection timeout
Some packaging systems that include support for running tests,
such as OpenBSD's, do not allow outbound network connections
during testing for security reasons. EACCES is the error raised by
OpenBSD in this case.
2024-09-03 18:21:01 -07:00
Hiroshi SHIBATA 974b404327
Bump up openssl-3.0.15 2024-09-04 08:41:38 +09:00
Peter Zhu e7fbdf8187 Fix indentation broken in 53eaa67 [ci skip] 2024-09-03 13:45:54 -04:00
Peter Zhu ef42e04a1a Don't traverse garbage objects in heap traversal
The object could be garbage (e.g. T_NONE, T_MOVED, or T_ZOMBIE) so we
don't want to traverse those.
2024-09-03 13:44:09 -04:00
Peter Zhu 53eaa67305 Unpoision the object in rb_gc_impl_garbage_object_p 2024-09-03 13:43:33 -04:00
Durable Programming Team 675529b9c6 [rubygems/rubygems] standardize pretty-print output for Gem::Source and subclasses
https://github.com/rubygems/rubygems/commit/6d5fbf82f1
2024-09-03 17:40:12 +00:00
Kevin Newton 767d0a1716
[PRISM] Fix up compile warning for sign comparison 2024-09-03 13:16:24 -04:00
Kevin Newton f7b097dea0 [PRISM] Keep script lines option for eval iseqs as well 2024-09-03 12:12:08 -04:00
tomoya ishida f1349924df [ruby/irb] Fix easter_egg run without RDoc, fix input-method test
run without RDoc
(https://github.com/ruby/irb/pull/998)

* EasterEgg no longer depend on RDoc

* Run most of the input-method tests even if RDoc is not avialable

https://github.com/ruby/irb/commit/30fa1595d9
2024-09-03 15:45:40 +00:00
Mari Imaizumi 0889f64021 [ruby/reline] Add test for reset_variables in Reline::Config
(https://github.com/ruby/reline/pull/741)

* Fix reset variables

* Add assertion for reload

* Add helper method to get instance variable value of Reline::Config

https://github.com/ruby/reline/commit/386f619ff5
2024-09-03 15:32:29 +00:00
tomoya ishida ad9d2c6435 [ruby/reline] Fix redisplay/insert_text called from pre_input_hook
(https://github.com/ruby/reline/pull/742)

* Fix redisplay/insert_text called from pre_input_hook

* Rename insert_pasted_text to insert_multiline_text

It is now used from Reline.insert_text which is not inserting pasted text

https://github.com/ruby/reline/commit/694a540939
2024-09-03 15:19:44 +00:00
Peter Zhu 3c63a01295 Move responsibility of heap walking into Ruby
This commit removes the need for the GC implementation to implement heap
walking and instead Ruby will implement it.
2024-09-03 10:05:38 -04:00
ydah a2243ee48b Implement ALIAS NODE keyword locations 2024-09-03 22:09:08 +09:00
ydah af143d8a74 Implement UNDEF NODE keyword locations 2024-09-03 21:15:12 +09:00
Jean Boussier b7fa2dd0d0 rb_enc_str_asciionly_p: avoid always fetching the encoding
Profiling of `JSON.dump` shows a significant amount of time spent
in `rb_enc_str_asciionly_p`, in large part because it fetches the
encoding.

It can be made twice as fast in this scenario by first checking the
coderange and only falling back to fetching the encoding if the
coderange is unknown.

Additionally we can skip fetching the encoding for the common
popular encodings.
2024-09-03 12:21:36 +02:00
zverok 245ed2fc89 Range#step: restore legacy behavior for String ranges 2024-09-03 16:21:42 +09:00
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 6986536488.

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