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

86338 Коммитов

Автор SHA1 Сообщение Дата
David Rodríguez 7fc04276ac [rubygems/rubygems] Refactor previous fix a bit
https://github.com/rubygems/rubygems/commit/1c80c6072f
2024-07-02 19:53:53 +00:00
Jerome Dalbert d5500e621c [rubygems/rubygems] Feature add_dependency more prominently
https://github.com/rubygems/rubygems/commit/0236cb6191
2024-07-02 19:53:29 +00:00
eileencodes b2b8306b46 Fix forwarding for optimized send
Always treat forwarding as a complex call.
2024-07-02 11:48:43 -07:00
eileencodes cc8c4a60b7 Calling into a C func shouldn't fast path when forwarding
When we forward calls to C functions if the callsite is a forwarding
site it might not always be a splat, so we can't use the fast path.

Fixes:

[ruby-core:118418]
2024-07-02 11:48:43 -07:00
Gabriel Lacroix 4d94d28a4a
YJIT: Inline simple ISEQs with unused keyword parameters
This commit expands inlining for simple ISeqs to accept
callees that have unused keyword parameters and callers
that specify unused keywords. The following shows 2 new
callsites that will be inlined:

```ruby
def let(a, checked: true) = a

let(1)
let(1, checked: false)
```

Co-authored-by: Kaan Ozkan <kaan.ozkan@shopify.com>
2024-07-02 18:34:48 +00:00
eileencodes d25b74b32c Resize arrays in `rb_ary_freeze` and use it for freezing arrays
While working on a separate issue we found that in some cases
`ary_heap_realloc` was being called on frozen arrays. To fix this, this
change does the following:

1) Updates `rb_ary_freeze` to assert the type is an array, return if
already frozen, and shrink the capacity if it is not embedded, shared
or a shared root.
2) Replaces `rb_obj_freeze` with `rb_ary_freeze` when the object is
always an array.
3) In `ary_heap_realloc`, ensure the new capa is set with
`ARY_SET_CAPA`. Previously the change in capa was not set.
4) Adds an assertion to `ary_heap_realloc` that the array is not frozen.

Some of this work was originally done in
https://github.com/ruby/ruby/pull/2640, referencing this issue
https://bugs.ruby-lang.org/issues/16291. There didn't appear to be any
objections to this PR, it appears to have simply lost traction.

The original PR made changes to arrays and strings at the same time,
this PR only does arrays. Also it was old enough that rather than revive
that branch I've made a new one. I added Lourens as co-author in addtion
to Aaron who helped me with this patch.

The original PR made this change for performance reasons, and while
that's still true for this PR, the goal of this PR is to avoid
calling `ary_heap_realloc` on frozen arrays. The capacity should be
shrunk _before_ the array is frozen, not after.

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Co-Authored-By: methodmissing <lourens@methodmissing.com>
2024-07-02 10:34:23 -07:00
Andrew Konchin cee62c6738 Update to ruby/spec@f8987ac 2024-07-02 13:33:48 +02:00
Stan Lo d7af8afe1b [ruby/rdoc] Group code object files into the same directory
(https://github.com/ruby/rdoc/pull/1114)

It's hard to distinguish code object classes by their file names alone.
And given that we have 18 such classes, it'd make the codebase a lot
easier to understand if we grouped them into a single directory.

Given that these classes are all autoloaded in `lib/rdoc.rb` instead
of required individually, this change should have minimum impact on
projects using RDoc as they generally just require `rdoc`, not individual
files. An example is Rails' `sdoc`:
https://github.com/rails/sdoc/blob/main/lib/sdoc/rdoc_monkey_patches.rb

https://github.com/ruby/rdoc/commit/4211292ffe
2024-07-02 10:15:00 +00:00
Hiroshi SHIBATA 1ab31eb429 [ruby/fiddle] Pick ruby/ruby changes for
`test/fiddle/test_function.rb`
(https://github.com/ruby/fiddle/pull/141)

https://github.com/ruby/ruby/pull/11048#issuecomment-2185630854

---------

https://github.com/ruby/fiddle/commit/a245f19763

Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
2024-07-02 18:33:39 +09:00
Nobuyoshi Nakada 4688b92a86
[win32] Fallback release date when revision.h is not present 2024-07-02 12:39:11 +09:00
Kevin Newton 0ac9c6dc10 [ruby/prism] Fix up find and array patterns with multiple rests
https://github.com/ruby/prism/commit/035890a839
2024-07-01 15:22:40 +00:00
Kevin Newton 8fb2227205 [ruby/prism] Properly support parsing regexp in extended mode
https://github.com/ruby/prism/commit/bedc4585ed
2024-07-01 14:42:10 +00:00
Koichi Sasada 30a8dbc861 maximum showing line number on btest failure
Some tests in btest uses long src for btest and it is harmful to
check the results. This patch introducing the limitation how many
lines of code is shown on failure.
2024-07-01 12:11:28 +09:00
dependabot[bot] 89466f4e91 Bump ruby/setup-ruby from 1.180.1 to 1.183.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.180.1 to 1.183.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](3783f195e2...1d0e911f61)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-30 19:53:37 -07:00
dependabot[bot] 1289782de6 Bump github/codeql-action from 3.25.10 to 3.25.11
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.10 to 3.25.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](23acc5c183...b611370bb5)

---
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-06-30 19:52:32 -07:00
Anatoly Busygin c46af61bf1 [ruby/irb] fix typos in the `Index of Command-Line Options`
https://github.com/ruby/irb/commit/3512020f1c
2024-07-01 11:39:43 +09:00
Yudai Takada 15ceb95d78 [ruby/rdoc] Fix some typos (https://github.com/ruby/rdoc/pull/1129)
* constist ==> consist

* Tidyness ==> Tidiness

* Currentry ==> Currently

* valus ==> values

https://github.com/ruby/rdoc/commit/8412705721
2024-07-01 11:08:37 +09:00
Hiroshi SHIBATA 01eb5c0f18
Skip to copy .so/.bundle files generated by rake-compiler 2024-07-01 11:07:49 +09:00
tomoya ishida de2d9c8e22 [ruby/irb] Allow assigning and using local variable name conflicting
with command
(https://github.com/ruby/irb/pull/961)

https://github.com/ruby/irb/commit/00603d470f
2024-06-30 17:13:27 +00:00
git c4baf3b3c0 Update bundled gems list as of 2024-06-29 2024-06-30 06:59:03 +00:00
yui-knk 9d76a0ab4a Add RB_GC_GUARD for ast_value
I think this change fixes the following assertion failure:

```
[BUG] unexpected rb_parser_ary_data_type (2114076960) for script lines
```

It seems that `ast_value` is collected then `rb_parser_build_script_lines_from`
touches invalid memory address.
This change prevents `ast_value` from being collected by RB_GC_GUARD.
2024-06-30 09:20:38 +09:00
Aaron Patterson a2c27bae96 [YJIT] Don't expand kwargs on forwarding
Similarly to splat arrays, we shouldn't expand splat kwargs.

[ruby-core:118401]
2024-06-29 11:25:59 -06:00
BurdetteLamar 9930647134 Doc for Integer#ceil 2024-06-29 10:33:54 -04:00
Alan Wu 3e14fe7c21 YJIT: Fix `cargo doc --document-private-items` warnings [ci skip]
Mostly putting angle brackets around links to follow markdown syntax.
2024-06-28 13:44:35 -04:00
Alan Wu bc91e8ff1d YJIT: Move `ocb` parameters into `JITState`
Many functions take an outlined code block but do nothing more than
passing it along; only a couple of functions actually make use of it.
So, in most cases the `ocb` parameter is just boilerplate.

Most functions that take `ocb` already also take a `JITState` and this
commit moves `ocb` into `JITState` to remove the visual noise of the
`ocb` parameter.
2024-06-28 11:01:05 -04:00
Takashi Kokubun 01f0dcd336 Fix missing macOS version in Slack notifications
matrix.os is not set for some jobs.
2024-06-28 10:38:26 -04:00
David Rodríguez 98c923ff4b
Synchronize Bundler & RubyGems (#11071) 2024-06-28 10:12:29 -04:00
Gabriel Lacroix 1652c194c8
Fix comment for VM_CALL_ARGS_SIMPLE (#11067)
* Set VM_CALL_KWARG flag first and reuse it to avoid checking kw_arg twice

* Fix comment for VM_CALL_ARGS_SIMPLE

* Make VM_CALL_ARGS_SIMPLE set-site match its comment
2024-06-28 10:11:35 -04:00
David Rodríguez 5c826ebea5 [rubygems/rubygems] Protect binstub access during creation with a flock
https://github.com/rubygems/rubygems/commit/88e3f1d23c
2024-06-28 10:49:07 +00:00
David Rodríguez 091a6ea8c1 [rubygems/rubygems] Move flock logic to its own method
https://github.com/rubygems/rubygems/commit/91274128a8
2024-06-28 10:49:06 +00:00
David Rodríguez f41a2c96c3 [rubygems/rubygems] More compact `open_file` fallback on Windows
https://github.com/rubygems/rubygems/commit/8f34396af6
2024-06-28 10:49:06 +00:00
David Rodriguez 5f8375381b [rubygems/rubygems] Avoid concurrent builds of Bundler when running specs
Instead, build it during setup when in CI.

This should avoid some Windows specific test failures when Bundler
copies the same files from multiple processes and runs into EACESS
errors.

https://github.com/rubygems/rubygems/commit/c194a1d753
2024-06-28 07:33:43 +00:00
Peter Zhu 176c4bb3c7 Fix corruption of internal encoding string
[Bug #20598]

Just like [Bug #20595], Encoding#name_list and Encoding#aliases can have
their strings corrupted when Encoding.default_internal is set to nil.

Co-authored-by: Matthew Valentine-House <matt@eightbitraptor.com>
2024-06-27 14:06:40 -04:00
HoneyryderChuck 9c5e9d29f0 [ruby/openssl] rewriting most of the asn1 init code in ruby
to have as much of the lib in ruby as possible

https://github.com/ruby/openssl/commit/8305051728
2024-06-27 16:00:55 +00:00
Peter Zhu c6a0d03649 Fix corruption of encoding name string
[Bug #20595]

enc_set_default_encoding will free the C string if the encoding is nil,
but the C string can be used by the encoding name string. This will cause
the encoding name string to be corrupted.

Consider the following code:

    Encoding.default_internal = Encoding::ASCII_8BIT
    names = Encoding.default_internal.names
    p names
    Encoding.default_internal = nil
    p names

It outputs:

    ["ASCII-8BIT", "BINARY", "internal"]
    ["ASCII-8BIT", "BINARY", "\x00\x00\x00\x00\x00\x00\x00\x00"]

Co-authored-by: Matthew Valentine-House <matt@eightbitraptor.com>
2024-06-27 09:47:22 -04:00
David Rodríguez 815b345b41 [rubygems/rubygems] Print a proper error when bin dir does not have writable permission bit
https://github.com/rubygems/rubygems/commit/979cd898f9
2024-06-27 12:53:05 +00:00
David Rodríguez f88bb0e67d [rubygems/rubygems] Reword some specs to disambiguate `chmod -x` from `chmod -w`
https://github.com/rubygems/rubygems/commit/2954ab79a9
2024-06-27 12:53:04 +00:00
David Rodríguez d29a76b90b [rubygems/rubygems] Only override `pre_install_checks` when necessary
RubyGems >= 3.5 no longer raises `Gem::FilePermissionError` explicitly.

https://github.com/rubygems/rubygems/commit/df54b9fd90
2024-06-27 12:53:04 +00:00
Kazuhiro NISHIYAMA 0c7776a226
[DOC] Fix a link in NEWS.md 2024-06-27 11:44:57 +09:00
Kevin Newton ce7299d09a [ruby/prism] Handle block exits under modifiers
https://github.com/ruby/prism/commit/6b78f5309b
2024-06-26 20:46:27 +00:00
Aaron Patterson 4cbc41d5e5 [YJIT] Fix block and splat handling when forwarding
This commit fixes splat and block handling when calling in to a
forwarding iseq.  In the case of a splat we need to avoid expanding the
array to the stack.  We need to also ensure the CI write is flushed to
the SP, otherwise it's possible for a block handler to clobber the CI

[ruby-core:118360]
2024-06-26 16:01:26 -04:00
Burdette Lamar 43d7db3828
[DOC] Doc for exceptions (#11008) 2024-06-26 13:31:40 -04:00
David Rodríguez 403413e1f1 [rubygems/rubygems] Don't print warning about nil versions being discouraged during tests
https://github.com/rubygems/rubygems/commit/39a47c264e
2024-06-26 16:11:44 +00:00
Soutaro Matsumoto aa2a88ce90
Use `File.open` instead of `IO.sysopen` (backport to 3.5) (#11061)
Use backport to 3.5
2024-06-26 22:39:18 +09:00
Jerome Dalbert c6c817df28 [rubygems/rubygems] Add --no-test, --no-ci, and --no-linter options
https://github.com/rubygems/rubygems/commit/f58660ffcc
2024-06-26 11:24:47 +00:00
Nobuyoshi Nakada 04c86a63cd [ruby/date] Update zonetab.h at 2024-06-26
https://github.com/ruby/date/commit/ef5a0dac5b
2024-06-26 10:01:21 +00:00
Hiroshi SHIBATA b4503d7964
Mentioned new mswin tasks related with vcpkg 2024-06-26 14:45:24 +09:00
Hiroshi SHIBATA 514aa80563
Added git for requirements of Windows build 2024-06-26 14:45:24 +09:00
git f63b54caa0 Update bundled gems list as of 2024-06-26 2024-06-26 04:55:26 +00:00
Soutaro Matsumoto da01974e7e
Test rbs-gem with unreleased version (#11060)
Use rbs#1912
2024-06-26 04:42:26 +00:00