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

86151 Коммитов

Автор SHA1 Сообщение Дата
MSP-Greg 18404af9ec .github/actions/setup/macos/action.yml - use brew openssl@3, not 1.1 2024-06-24 09:03:55 +09:00
git acce96647d Update bundled gems list as of 2024-06-22 2024-06-23 06:59:37 +00:00
Nobuyoshi Nakada d8c6e91748
Fix dangling `else` 2024-06-23 09:42:25 +09:00
Dmitry Davydov fba8aff7af [Bug #20592] Fix segfault when sending NULL to freeaddrinfo
On alpine freeaddrinfo does not accept NULL pointer
2024-06-22 22:05:31 +09:00
Nobuyoshi Nakada d122a68863
Exported symbols in DLL on Windows are managed by win32/mkexports.rb 2024-06-22 18:48:14 +09:00
Yuta Saito 73b7eebf07 build: fix crossruby build by handling empty `ac_abs_builddir`
`ac_abs_builddir` can be empty when the build is top-level (not
subdirs, and Ruby is usually the case). In such case, the MINIRUBY is
expanded to `$RUBY -I -r'$(arch)-fake'`, which interprets `-r$(arch)-fake`
as an argument to `-I` option. This led to:
- Not loading the fake config file
- Then not setting `CROSS_COMPILING` constant during extmk.rb execution
- Then misusing cross-compiled `./miniruby` instead of baseruby to generate
  files used in exts.

This commit fixes the issue by handling the empty `ac_abs_builddir` case
properly.
2024-06-22 15:12:00 +09:00
Nobuyoshi Nakada cab0d03037
Get rid of nesting backquotes
Also executing variable containing an option may not be portable.
Follow up of dd378c5a24.
2024-06-22 10:58:32 +09:00
Nobuyoshi Nakada dd378c5a24
Expand --with-opt-dir arguments 2024-06-22 02:16:16 +09:00
Peter Zhu 90763e04ba Load external GC using command line argument
This commit changes the external GC to be loaded with the `--gc-library`
command line argument instead of the RUBY_GC_LIBRARY_PATH environment
variable because @nobu pointed out that loading binaries using environment
variables can pose a security risk.
2024-06-21 11:49:01 -04:00
Koichi Sasada bd583ca645 retry on cancelling of `getaddrinfo`
When the registerred unblock function is called, it should retry
the cancelled blocking function if possible after checkints.

For example, `SIGCHLD` can cancel this method, but it should not
raise any exception if there is no trap handlers.

The following is repro-code:

```ruby
require 'socket'
PN = 10_000

1000000.times{
  p _1
  PN.times{
    fork{
      sleep rand(0.3)
    }
  }
  i = 0
  while i<PN
    cpid = Process.wait -1, Process::WNOHANG
    if cpid
      # p [i, cpid]
      i += 1
    end

    begin
      TCPServer.new(nil, 0).close
    rescue
      p $!
      exit!
    end
  end
}
```
2024-06-21 22:36:42 +09:00
Yusuke Endoh 9a22d4b9a0 [ruby/prism] Update `#line` that was missed to update
Follow up https://github.com/ruby/prism/commit/1a2626be275d

https://github.com/ruby/prism/commit/8174aac929
2024-06-21 12:32:04 +00:00
Hiroshi SHIBATA bf061ce6fe Use the official way for binary cache with vcpkg
https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache
2024-06-21 18:25:03 +09:00
Yusuke Endoh ac9e84df3d Support LCOV 2.0
LCOV 2.0, a GCOV frontend, seems to have stricter error checking
2024-06-21 14:48:44 +09:00
Yusuke Endoh 47364c147d Apply EnvUtil.apply_timeout_scale for TestFile#test_stat
... to respect RUBY_TEST_TIMEOUT_SCALE. This test somehow fails
frequently on macos-arm-oss with --repeat-count=2

https://app.launchableinc.com/organizations/ruby/workspaces/ruby/data/test-paths/file%3Dtest%2Fruby%2Ftest_file.rb%23%23%23class%3DTestFile%23%23%23testcase%3Dtest_stat?organizationId=ruby&workspaceId=ruby&testPathId=file%3Dtest%2Fruby%2Ftest_file.rb%23%23%23class%3DTestFile%23%23%23testcase%3Dtest_stat&testSessionStatus=flake
2024-06-21 13:57:07 +09:00
ccmywish 185a6c991e [rubygems/rubygems] Update contents of gem.bat on Windows
(https://github.com/rubygems/rubygems/pull/6483)

https://github.com/rubygems/rubygems/commit/41d8cffd2e

Co-Authored-By: MSP-Greg <Greg.mpls@gmail.com>
2024-06-21 02:27:47 +00:00
Nobuyoshi Nakada 249a1fb0eb
Show more in `RBIMPL_ASSERT_TYPE` 2024-06-21 09:25:00 +09:00
Nobuyoshi Nakada b834c62efd
Delegate from `RBIMPL_ASSERT_OR_ASSUME` to `RUBY_ASSERT_ALWAYS`
Get rid of expansion of the argument which often contains complicated
macros, and simplify the failure message.
2024-06-21 09:24:59 +09:00
Koichi Sasada b182f2a045 fix sendfwd with `send` and `method_missing`
combination with `send` method (optimized) or `method_missing`
and forwarding send (`...`) needs to respect given
`rb_forwarding_call_data`. Otherwize it causes critical error
such as SEGV.
2024-06-21 00:43:48 +09:00
Peter Zhu f5fd87b695 Make ruby_external_gc_init static
This function is not used outside of gc.c.
2024-06-20 11:34:52 -04:00
Jeremy Evans a47a176768 Skip 3 specs when $HOME is not a valid directory
If $HOME isn't a valid directory, these specs fail, but I think it
is better to skip in this case, as it does not indicate a bug.

This fixes specs when run in the OpenBSD port, which sets $HOME
to an invalid directory to ensure that software's build system
is not accidentally relying on it.
2024-06-20 07:54:02 -07:00
Kevin Newton 9bd5995b40 [PRISM] Remove duplicated tests
These tests are flaky and are duplicative of other tests that are
run in CI when parser=prism.
2024-06-20 09:24:19 -04:00
Yusuke Endoh c3b5b98e15 [ruby/prism] Set `#line" directives to respect the path in ruby/ruby repo
ruby/ruby measures test coverage of C code, but the `#line` directive
generated by prism points to a file that does not exist, so coverage is
not taken properly.

This changeset specifies the location of the source files as a relative
path in terms of ruby/ruby repo.

https://github.com/ruby/prism/commit/1a2626be27
2024-06-20 12:36:18 +00:00
David Rodríguez 0a9f1ecc37 [rubygems/rubygems] Add a regression test for previous `bundler update --bundler` fix
https://github.com/rubygems/rubygems/commit/c392593dc3
2024-06-20 09:26:33 +00:00
nick evans b558fc0e36 [ruby/securerandom] Update UUID documentation with RFC9562 links
RFC9562 was released almost two weeks ago, so we can replace the "draft"
UUIDv7 URL with the final RFC URL too.  RFC9562 obsoletes RFC4122, so I
replaced its link as well.

https://github.com/ruby/securerandom/commit/1e41c3d2cb
2024-06-20 08:34:31 +00:00
Nobuyoshi Nakada 92ab2dac22 [rubygems/rubygems] Check if failed with the expected error
https://github.com/rubygems/rubygems/commit/3f22e9df8d
2024-06-20 07:16:56 +00:00
Nobuyoshi Nakada e345970707 [rubygems/rubygems] Revert "Workaround for TruffleRuby that set `nil` to LIBRUBY_RELATIVE"
This reverts commit https://github.com/rubygems/rubygems/commit/06fd39997348, for a
bug that is fixed by https://github.com/rubygems/rubygems/commit/0148cce153a5.

https://github.com/rubygems/rubygems/commit/907e51e521
2024-06-20 07:16:55 +00:00
David Rodríguez f7acfeb4ce [rubygems/rubygems] Fix credentials being readded when re-resolving without a full unlock
https://github.com/rubygems/rubygems/commit/a8670e43f8
2024-06-20 07:15:06 +00:00
David Rodríguez bf6b8dd6a8 [rubygems/rubygems] Fix `bundle update <gem_name>` edge case
When locked only to RUBY, and some locked spec does not meet locked
dependencies, Bundler would remove the only locked platform and end up
creating a lockfile with empty sections.

We can't rely on our criteria to remove invalid platforms if locked
specs are not valid in the first place.

https://github.com/rubygems/rubygems/commit/1dba05cf53
2024-06-20 07:14:47 +00:00
David Rodríguez f445d54f91 [rubygems/rubygems] Move constant to the proper place
https://github.com/rubygems/rubygems/commit/9f08241d01
2024-06-20 15:22:52 +09:00
David Rodríguez ae7d609456 [rubygems/rubygems] Don't expire git specs unnecessarily when remote! or cached! are used
https://github.com/rubygems/rubygems/commit/04b26731cb
2024-06-20 15:22:20 +09:00
David Rodríguez 0610302a8f [rubygems/rubygems] Don't validate local gemspec twice
Calling `remote!` or `cached!` on the source was expiring local specs
for now reason. It's unnecessary to override these methods for path
sources since they only deal with local specifications.

https://github.com/rubygems/rubygems/commit/aa93b196a2
2024-06-20 15:22:13 +09:00
David Rodríguez 758e01d39d [rubygems/rubygems] Make sure to not re-resolve when a not fully specific local platform is locked
https://github.com/rubygems/rubygems/commit/36a02c6128
2024-06-20 15:21:08 +09:00
David Rodríguez c6a28b02c9 [rubygems/rubygems] Always resolve against the local platform
If RUBY is the only platform in the lockfile, we were skipping adding
the local platform to the list of resolution platforms. This generally
works anyways, because we had some code to still add it if the RUBY
platform is not valid for the set of locked gems.

However, sometimes it can happen that "RUBY" is valid for the current
set of locked gems, but when adding a new dependency, it becomes
invalid. For example, when adding sorbet to a Gemfile, that will
introduce `sorbet-static` as an indirect dependency which does not have
a generic "RUBY" variant. This will cause resolution to take a long time
continuously backtracking trying to find solutions that don't introduce
`sorbet-static` as a dependency and will eventually fail.

Instead, we can always add the local platform to the set of resolution
platforms before resolving, and remove it as necessary after resolution
so that we lock the correct set of platforms.

https://github.com/rubygems/rubygems/commit/6ed1fe6050
2024-06-20 15:20:57 +09:00
David Rodríguez 9e713f0e8c [rubygems/rubygems] Remove no longer needed condition
The `force-ruby-platform` settings is properly respected when
materializing since https://github.com/rubygems/rubygems/commit/e17d7e9efb91.

https://github.com/rubygems/rubygems/commit/c4ba54eb96
2024-06-20 15:20:47 +09:00
Martin Emde af304ad952 [rubygems/rubygems] Revert to splitting parser due to performance regression
* The string search parser was more memory efficient but
  in some cases, much slower. Reverting until a better
  solution is found.
* Handle the situation where the line might be blank (Artifactory bug)

https://github.com/rubygems/rubygems/commit/222d38737d
2024-06-20 15:18:56 +09:00
Aaron Patterson 0e1182f93c [ruby/fiddle] Remove Vim commands
(https://github.com/ruby/fiddle/pull/140)

Some of these commands just don't work (for example `sws` is not a Vim
setting). I think we should just remove these.

https://github.com/ruby/fiddle/commit/c3dbf7ba9a
2024-06-20 15:16:57 +09:00
Nobuyoshi Nakada c2fd3dfb98
[ruby/date] Update zonetab.h at 2024-06-19
https://github.com/ruby/date/commit/8e5efd4f59
2024-06-20 15:16:48 +09:00
Yusuke Endoh fbe56b1c17 Set RUBY_TEST_TIMEOUT_SCALE=3 for --repeat-count=2 test
With --repeat-count=2, timing-related test seems to fail frequently.
I'm not sure of the cause, but I want to reduce the errors by setting
RUBY_TEST_TIMEOUT_SCALE.
2024-06-20 12:52:09 +09:00
dependabot[bot] e01e6ce9c8 Bump gacts/run-and-post-run in /.github/actions/setup/directories
Bumps [gacts/run-and-post-run](https://github.com/gacts/run-and-post-run) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/gacts/run-and-post-run/releases)
- [Commits](7aec950f3b...4683764dd7)

---
updated-dependencies:
- dependency-name: gacts/run-and-post-run
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-19 20:35:49 -07:00
dependabot[bot] 97c91860bb Bump gacts/run-and-post-run from 1.4.0 to 1.4.1
Bumps [gacts/run-and-post-run](https://github.com/gacts/run-and-post-run) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/gacts/run-and-post-run/releases)
- [Commits](7aec950f3b...4683764dd7)

---
updated-dependencies:
- dependency-name: gacts/run-and-post-run
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-19 19:48:48 -07:00
Yuri Kanivetsky 84c9f2a240 [rubygems/rubygems] Make "bundler? update --bundler" behave identically
https://github.com/rubygems/rubygems/commit/30dce3f87d
2024-06-20 00:12:31 +00:00
Jean Boussier 83f57ca3d2 String.new(capacity:) don't substract termlen
[Bug #20585]

This was changed in 36a06efdd9f0604093dccbaf96d4e2cb17874dc8 because
`String.new(1024)` would end up allocating `1025` bytes, but the problem
with this change is that the caller may be trying to right size a String.

So instead, we should just better document the behavior of `capacity:`.
2024-06-19 15:11:07 +02:00
Nobuyoshi Nakada 321ed86e93 [rubygems/rubygems] Do not set previously unset value
https://github.com/rubygems/rubygems/commit/0148cce153
2024-06-19 11:42:35 +00:00
Nobuyoshi Nakada 57e15074fe [rubygems/rubygems] Workaround for TruffleRuby that set `nil` to LIBRUBY_RELATIVE
https://github.com/rubygems/rubygems/commit/06fd399973
2024-06-19 11:42:35 +00:00
Nobuyoshi Nakada 378e65af9a [rubygems/rubygems] Dump `RbConfig` elements to escape special characters
Naively embed strings do not work if special characters (newline,
backslahes and so on) are contained.

https://github.com/rubygems/rubygems/commit/ac2c4c4af1
2024-06-19 11:42:34 +00:00
Hiroshi SHIBATA 2ccd5f8cef [rubygems/rubygems] Use get_byte_ranges instead of byte_ranges
https://github.com/rubygems/rubygems/commit/5c2ad44c18
2024-06-19 10:56:58 +00:00
git 662fbaaacd Update bundled gems list as of 2024-06-19 2024-06-19 06:59:21 +00:00
Tanaka Akira ed2f8ea62e [DOC] IO#close on closed IO is not an error. 2024-06-19 13:42:40 +09:00
Kevin Newton dfb67a4433 [ruby/prism] (parser) Print when token tests are now passing
https://github.com/ruby/prism/commit/9e4fb665ee
2024-06-18 21:18:39 -04:00
Kevin Newton 24f48382bc [ruby/prism] (parser) Fix up tokens for empty symbol
https://github.com/ruby/prism/commit/5985ab7687
2024-06-18 21:18:39 -04:00