88718 Commits

Author SHA1 Message Date
sodacris
0989400a92 [rubygems/rubygems] fix bundle which commands on windows
https://github.com/rubygems/rubygems/commit/9e0018d9fe
2024-11-22 13:36:21 +00:00
Nobuyoshi Nakada
80cfa57234
[Feature #20563] Update required Windows version
Update the default `NTVER`, so that the declarations of APIs
introduced since Windows 8 will be enabled.
https://learn.microsoft.com/cpp/porting/modifying-winver-and-win32-winnt
2024-11-22 19:01:55 +09:00
Peter Zhu
770ca58cd3 [ruby/mmtk] Use extconf.rb for external GC compilation
This commit adds extconf.rb for both the default GC and and MMTk to build
the external GC. This allows common.mk to not need to contain any
implementation-specific build configuration.

https://github.com/ruby/mmtk/commit/db6a29b4a9
2024-11-22 09:55:25 +00:00
Peter Zhu
19840dfd71 [ruby/mmtk] [Feature #20860] Implement Mark-Sweep with MMTK
This commit implements the mark-sweep algorithm using MMTk and allows
customizing the plan using MMTK_PLAN.

https://github.com/ruby/mmtk/commit/6fea5e5ffc

Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
2024-11-22 09:55:24 +00:00
Peter Zhu
211aef1bc0 [ruby/mmtk] [Feature #20860] Implement NoGC with MMTk
This commit only supports initializing MMTk with NoGC and object
allocation.

https://github.com/ruby/mmtk/commit/39aa10e537

Co-Authored-By: Kunshan Wang <wks1986@gmail.com>
2024-11-22 09:55:23 +00:00
Kazuhiro NISHIYAMA
f90c356317
[DOC] Fix a link in NEWS.md 2024-11-22 17:46:29 +09:00
git
37a72b0150 Update bundled gems list as of 2024-11-21 2024-11-22 07:00:50 +00:00
Yusuke Endoh
5bd144c1bb Add a temporal debugging code
... to check the return value of ioctl

http://ci.rvm.jp/results/trunk_asan@ruby-sp1/5423172
```
/tmp/ruby/src/trunk_asan/lib/reline/io/ansi.rb:192: [BUG] rb_sys_fail_str(<STDIN>) - errno == 0
```
2024-11-22 15:00:20 +09:00
Nobuyoshi Nakada
4e01878bad
[Bug #20903] rb_econv_str_append arguments expected to be String 2024-11-22 10:36:05 +09:00
Matt Valentine-House
801e66352e Sync ruby/mmtk into the gc/mmtk directory 2024-11-21 21:09:55 +00:00
Adam Daniels
3b5b34e3ae [rubygems/rubygems] Set $0 to exe when running gem exec to fix name in CLI output
The $0 value is used in many CLI libraries to determine the name of the
application, when displaying help and error messages.

Without setting this value, it defaults to `gem` which can be confusing.

Before:

```
$ gem exec kamal help
Commands:
  gem accessory           # Manage accessories (db/redis/search)
  gem app                 # Manage application
  gem audit               # Show audit log from servers
  gem build               # Build application image
  gem config              # Show combined config (including secrets!)
  gem deploy              # Deploy app to servers
  gem details             # Show details about all containers
  gem docs [SECTION]      # Show Kamal configuration documentation
  gem help [COMMAND]      # Describe available commands or one specific command
  gem init                # Create config stub in config/deploy.yml and secrets stub in .kamal
  gem lock                # Manage the deploy lock
  gem proxy               # Manage kamal-proxy
  gem prune               # Prune old application images and containers
  gem redeploy            # Deploy app to servers without bootstrapping servers, starting kamal-proxy, pruning, and registry login
  gem registry            # Login and -out of the image registry
  gem remove              # Remove kamal-proxy, app, accessories, and registry session from servers
  gem rollback [VERSION]  # Rollback app to VERSION
  gem secrets             # Helpers for extracting secrets
  gem server              # Bootstrap servers with curl and Docker
  gem setup               # Setup all accessories, push the env, and deploy app to servers
  gem upgrade             # Upgrade from Kamal 1.x to 2.0
  gem version             # Show Kamal version
```

After:

```
$ gem exec kamal help
Commands:
  kamal accessory           # Manage accessories (db/redis/search)
  kamal app                 # Manage application
  kamal audit               # Show audit log from servers
  kamal build               # Build application image
  kamal config              # Show combined config (including secrets!)
  kamal deploy              # Deploy app to servers
  kamal details             # Show details about all containers
  kamal docs [SECTION]      # Show Kamal configuration documentation
  kamal help [COMMAND]      # Describe available commands or one specific command
  kamal init                # Create config stub in config/deploy.yml and secrets stub in .kamal
  kamal lock                # Manage the deploy lock
  kamal proxy               # Manage kamal-proxy
  kamal prune               # Prune old application images and containers
  kamal redeploy            # Deploy app to servers without bootstrapping servers, starting kamal-proxy, pruning, and registry login
  kamal registry            # Login and -out of the image registry
  kamal remove              # Remove kamal-proxy, app, accessories, and registry session from servers
  kamal rollback [VERSION]  # Rollback app to VERSION
  kamal secrets             # Helpers for extracting secrets
  kamal server              # Bootstrap servers with curl and Docker
  kamal setup               # Setup all accessories, push the env, and deploy app to servers
  kamal upgrade             # Upgrade from Kamal 1.x to 2.0
  kamal version             # Show Kamal version
```

https://github.com/rubygems/rubygems/commit/4fd060b96d
2024-11-21 20:41:30 +00:00
Jerome Dalbert
8ea349515a Ensure that all Bundler commands have a man page
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2024-11-21 20:34:01 +00:00
Kunshan Wang
8ae7c22972 Annotate anonymous mmap
Use PR_SET_VMA_ANON_NAME to set human-readable names for anonymous
virtual memory areas mapped by `mmap()` when compiled and run on Linux
5.17 or higher.  This makes it convenient for developers to debug mmap.
2024-11-21 13:48:05 -05:00
Matt Valentine-House
640bacceb1 Fix typo in parse.y GH Actions workflow
with-praser -> with-parser
2024-11-21 14:49:00 +00:00
Matt Valentine-House
680e060026 [prism/compiler] end_cursor should never be NULL
This fixes a failed assertion reported to SimpleCov

https://github.com/simplecov-ruby/simplecov/issues/1113

This can be repro'd as follows:

1. Create a file `test.rb` containing the following code

```
@foo&.(@bar)
```

2. require it with branch coverage enabled

```
ruby -rcoverage -e "Coverage.start(branches: true); require_relative 'test.rb'"
```

The assertion is failing because the Prism compiler is incorrectly
detecting the start and end cursor position of the call site for the
implicit call .()

This patch replicates the parse.y behaviour of setting the default
end_cursor to be the final closing location of the call node.

This behaviour can be verified against `parse.y` by modifying the test
command as follows:

```
ruby --parser=parse.y -rcoverage -e "Coverage.start(branches: true); require_relative 'test.rb'"
```

[Bug #20866]
2024-11-21 13:51:59 +00:00
Jerome Dalbert
890c83e607 [rubygems/rubygems] Fix bundle remove sometimes not removing gems
https://github.com/rubygems/rubygems/commit/e7f5f067e8
2024-11-21 12:25:31 +00:00
David Rodríguez
ac5661db7b [rubygems/rubygems] Fix locking of incorrect version of git gem in an edge case
In particular, when a gem registry transitive dependency is changed to a
git source direct dependency.

https://github.com/rubygems/rubygems/commit/bcdc7660d9
2024-11-21 10:37:51 +00:00
David Rodríguez
486485a535 [rubygems/rubygems] Refactor
https://github.com/rubygems/rubygems/commit/9964c16bb9
2024-11-21 10:37:51 +00:00
David Rodríguez
0a7099a0ae [rubygems/rubygems] Extract a source local
https://github.com/rubygems/rubygems/commit/c5a9449069
2024-11-21 10:37:50 +00:00
David Rodríguez
8cf1222e56 [rubygems/rubygems] Reuse name local
https://github.com/rubygems/rubygems/commit/508fb45b76
2024-11-21 10:37:50 +00:00
David Rodríguez
335ef5ed81 [rubygems/rubygems] Remove no longer necessary code
https://github.com/rubygems/rubygems/commit/2a36af0f38
2024-11-21 10:37:49 +00:00
Lars Kanis
796757a01c [rubygems/rubygems] Remove override of worker jobs for bundle install --local
There seems to be no reason why the install should be serial for --local.
The packages are still installed in the right dependency order in this case, so that parallel install can be used.
This patch disables parallel install only in case of no_install_needed.

Also remove the `option` argument, which is effectifely not used.

https://github.com/rubygems/rubygems/commit/5da934ddb6
2024-11-21 10:35:58 +00:00
sodacris
42b0d46416 [rubygems/rubygems] move system_gems let commands
https://github.com/rubygems/rubygems/commit/1fc1e74f4d
2024-11-21 10:29:32 +00:00
Yusuke Endoh
cabfaa9fb4 Extend the timeout of fork-exit bootstraptest
It often fails randomly.

http://ci.rvm.jp/results/trunk-yjit@ruby-sp2-noble-docker/5421564
```
 Fstderr output is not empty
   bootstraptest.test_fork.rb_78_287.rb:16:in 'block in <main>': failed (RuntimeError)
           from <internal:numeric>:257:in 'Integer#times'
           from bootstraptest.test_fork.rb_78_287.rb:10:in '<main>'
```

I'm not sure why the frequency of failure has suddenly increased,
though.
2024-11-21 04:23:15 -06:00
Hiroshi SHIBATA
b85425493a Omit flaky example with Windows platform
https://github.com/ruby/ruby/actions/runs/11948300522/job/33305664284?pr=12139

```
  IO#wait [events, timeout] passed changes thread status to 'sleep' when waits for WRITABLE event FAILED
  Expected false == "sleep"
  to be truthy but was false
  D:/a/ruby/ruby/src/spec/ruby/library/io-wait/wait_spec.rb:99:in 'block (3 levels) in <top (required)>'
  D:/a/ruby/ruby/src/spec/ruby/library/io-wait/wait_spec.rb:8:in '<top (required)>'
```
2024-11-21 19:16:27 +09:00
Hiroshi SHIBATA
6fc8607b7a Skip make install with gmp build 2024-11-21 18:46:27 +09:00
Naoto Ono
c23bf42d79 Fix error "fatal: detected dubious ownership in repository at '/github/workspace/src'" 2024-11-21 16:59:14 +09:00
Hiroshi SHIBATA
0780e76803 Removed needless require for build_metadata 2024-11-21 15:32:12 +09:00
Yusuke Endoh
d43f796292 Fix the usage of realloc
http://ci.rvm.jp/results/trunk-repeat50@ruby-sp2-noble-docker/5420911
```
/tmp/ruby/src/trunk-repeat50/ext/socket/ipsocket.c: In function ‘reallocate_connection_attempt_fds’:
/tmp/ruby/src/trunk-repeat50/ext/socket/ipsocket.c:292:62: warning: pointer ‘fds’ may be used after ‘realloc’ [-Wuse-after-free]
  292 |     for (int i = current_capacity; i < new_capacity; i++) fds[i] = -1;
      |                                                              ^
/tmp/ruby/src/trunk-repeat50/ext/socket/ipsocket.c:288:9: note: call to ‘realloc’ here
  288 |     if (realloc(fds, new_capacity * sizeof(int)) == NULL) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
2024-11-21 00:20:11 -06:00
Hiroshi SHIBATA
f20b6e5dbc [rubygems/rubygems] Explicitly load build_metadata.rb because Spec::BuildMetadata is only called from BundlerBuilder.
The current code is broken to call Spec::Builders#build_* method directly.

https://github.com/rubygems/rubygems/commit/4922ae40dd
2024-11-21 04:39:31 +00:00
dependabot[bot]
7f838e3763 Bump github/codeql-action from 3.27.4 to 3.27.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.4 to 3.27.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](ea9e4e3799...f09c1c0a94)

---
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-11-21 13:23:10 +09:00
Hiroshi SHIBATA
af54f0f76d [rubygems/rubygems] Silent verbose stdout for dependency of test gems
https://github.com/rubygems/rubygems/commit/51854e1982
2024-11-21 02:13:07 +00:00
Samuel Williams
89deb38736
bignum nogvl is offload safe. (#12132) 2024-11-21 13:46:27 +13:00
Samuel Williams
03ff7db5fe
Update scheduler.c to use RUBY_ASSERT. (#12129) 2024-11-20 23:00:55 +00:00
Alan Wu
bf718cef59
YJIT: Make compilation_failure a default stat (#12128)
It's good to monitor compilation failures.
2024-11-20 17:13:31 -05:00
Samuel Williams
f6e6e66870 [ruby/zlib] Add support for safe offload of nogvl code.
(https://github.com/ruby/zlib/pull/89)

https://github.com/ruby/zlib/commit/a535271862
2024-11-20 21:40:55 +00:00
Samuel Williams
b143fd5bd8 [ruby/zlib] Don't call rb_str_set_len while released the GVL.
(https://github.com/ruby/zlib/pull/88)

* Only release the GVL where necessary.

- Several string manipulation methods were invoked while the GVL was
  released. This is unsafe.
- The mutex protecting multi-threaded access was not covering buffer state
  manipulation, leading to data corruption and out-of-bounds writes.
- Using `rb_str_locktmp` prevents changes to buffer while it's in use.

[Bug #20863]

https://github.com/ruby/zlib/commit/e445cf3c80
2024-11-20 21:02:16 +00:00
Samuel Giddins
b70c1bb150 [rubygems/rubygems] Add --attestation option to gem push
Signed-off-by: Samuel Giddins <segiddins@segiddins.me>

https://github.com/rubygems/rubygems/commit/a5412d9a0e
2024-11-20 19:32:49 +00:00
Andrew Nesbitt
b4969348bf [rubygems/rubygems] Add man page for 'bundle issue' command
https://github.com/rubygems/rubygems/commit/3f39571181
2024-11-20 19:13:27 +00:00
Stan Lo
51bf0d4d68 [ruby/irb] Store method objects in constants
(https://github.com/ruby/irb/pull/1033)

It probably won't speed up things significantly, but these are hot paths
and we can save a few method calls per completion/input call.

https://github.com/ruby/irb/commit/f1e25ec7ae
2024-11-20 18:59:26 +00:00
Thierry Deo
2bf5d26eb9 [ruby/psych] Eagerly require date.
https://github.com/ruby/psych/commit/b2aa0032c0
2024-11-20 16:59:55 +00:00
Nobuyoshi Nakada
577e6a3e19 [ruby/etc] Prefer rb_intern_const over rb_intern for literal strings
https://github.com/ruby/etc/commit/53362d891c
2024-11-20 16:38:33 +00:00
Peter Zhu
41a9460227 [DOC] Fix typo in comment for STR_PRECOMPUTED_HASH 2024-11-20 11:16:10 -05:00
Jeremy Evans
3b7892b6e4 Fix a bug in rb_include_module that stops nested inclusion into module subclasses
This bug was present since the code was originally added by me
in 3556a834a2847e52162d1d3302d4c64390df1694.

Fixes [Bug #20871]
2024-11-20 07:59:31 -08:00
BurdetteLamar
9db056f2ea [DOC] Tweaks for Array 2024-11-20 10:40:49 -05:00
Nobuyoshi Nakada
f962394481 [ruby/digest] Remove obsolete test runner [ci skip]
This file is platform dependent, outdated and already not working.
Use `rake` instead.

https://github.com/ruby/digest/commit/a2a917dc71
2024-11-20 15:14:26 +00:00
Alan Wu
350b544468 YJIT: Refactor to forward jump_to_next_insn() return value
It's more concise this way and since `return Some(EndBlock)` is the only
correct answer, no point repeating it everywhere.
2024-11-20 10:06:14 -05:00
Alan Wu
199877d258 YJIT: Abandon block when gen_outlined_exit() fails
When CodeBlock::set_page fails (part of next_page(), see their docs for
exact conditions), it can cause gen_outlined_exit() to fail while there
is still plenty of memory available. Previously, this can have YJIT
running incomplete code due to taking the early return in
end_block_with_jump() that manifested as crashes with SIGILL.

Add and use a wrapper with error handling.
2024-11-20 10:06:14 -05:00
Stan Lo
2df2e868bc [ruby/irb] Move main object's safe call logic to Context
(https://github.com/ruby/irb/pull/1034)

https://github.com/ruby/irb/commit/9750fa23cc
2024-11-20 15:02:17 +00:00
Nobuyoshi Nakada
743a31d639 [ruby/date] [DOC] Make document coverage 100%
https://github.com/ruby/date/commit/269392b775
2024-11-20 14:03:40 +00:00