85278 Commits

Author SHA1 Message Date
Peter Zhu
e0949c3f7c [ruby/openssl] Remove trailing space in test_ssl.rb
https://github.com/ruby/openssl/commit/911a31335f
2024-04-30 15:23:15 +00:00
Bart de Water
9d75d9f07c [ruby/openssl] Update Cipher#name to match Digest#name explanation
https://github.com/ruby/openssl/commit/79e6dead6e
2024-04-30 15:05:50 +00:00
Bart de Water
cc6657e563 [ruby/openssl] Add OpenSSL::Digest.digests to get a list of available digests
https://github.com/ruby/openssl/commit/08dd3c73b7
2024-04-30 15:05:50 +00:00
Peter Zhu
1ca4c52b64 Free unused_block_warning_table when RUBY_FREE_AT_EXIT 2024-04-30 10:57:32 -04:00
Samuel Williams
368ce0758e [ruby/openssl] Further clarification of documentation.
https://github.com/ruby/openssl/commit/0697f2f8b4
2024-04-30 14:51:59 +00:00
Samuel Williams
f1afae2459 [ruby/openssl] More documentation.
https://github.com/ruby/openssl/commit/c8377eaf8d
2024-04-30 14:51:59 +00:00
Samuel Williams
1699772ac4 [ruby/openssl] Introduce basic support for close_read and close_write.
https://github.com/ruby/openssl/commit/c99d24cee9
2024-04-30 14:51:58 +00:00
tomoya ishida
8fb430c1da [ruby/irb] Restore MAIN_CONTEXT correctly
(https://github.com/ruby/irb/pull/937)

https://github.com/ruby/irb/commit/c41f460a70
2024-04-30 10:29:38 +00:00
dependabot[bot]
431711a8bb Bump ruby/setup-ruby from 1.175.0 to 1.175.1
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.175.0 to 1.175.1.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Commits](70da3bbf44...1198b07430)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 11:52:36 +09:00
Richard Ricciardelli
7a8882bc30 [DOC] Fix typo: Replace documentatation with documentation 2024-04-30 10:34:40 +09:00
yui-knk
528c4501f4 Use rb_parser_string_t * as ruby_sourcefile_string
This reduces dependency on VALUE.
2024-04-30 09:00:05 +09:00
Alan Wu
0aefd2f784
YJIT: Pass options to ruby/spec with -T (#10599)
We recently found out that `make test-spec` wasn't testing with
`--yjit-call-threshold=1` like the other test suites, and that we need
to use `-T` to pass options to it.
2024-04-29 16:54:39 -04:00
Alan Wu
470eceff8f YJIT: Remove CString allocation when using src_loc!()
Since we often take the VM lock as the first thing we do when entering
YJIT, and that needs a `src_loc!()`, this removes a allocation from
that. The main trick here is `concat!(file!(), '\0')` to get a C string
statically baked into the binary.
2024-04-29 16:36:27 -04:00
Alan Wu
de0ad3be8e
YJIT: Take VM lock when invalidating
We need the lock to patch code safely.
This might fix some Ractor related crashes seen on CI.
2024-04-29 16:08:06 -04:00
Randy Stauner
adae813c5f
YJIT: Expand codegen for TrueClass#=== to FalseClass and NilClass (#10679) 2024-04-29 19:25:22 +00:00
Randy Stauner
845f2db136
YJIT: Add specialized codegen function for TrueClass#=== (#10640)
* YJIT: Add specialized codegen function for `TrueClass#===`

TrueClass#=== is currently number 10 in the most frequent C calls list of the lobsters benchmark.

```
require "benchmark/ips"

def wrap
  true === true
  true === false
  true === :x
end

Benchmark.ips do |x|
  x.report(:wrap) do
    wrap
  end
end
```

```
before
Warming up --------------------------------------
                wrap     1.791M i/100ms
Calculating -------------------------------------
                wrap     17.806M (± 1.0%) i/s -     89.544M in   5.029363s

after
Warming up --------------------------------------
                wrap     4.024M i/100ms
Calculating -------------------------------------
                wrap     40.149M (± 1.1%) i/s -    201.223M in   5.012527s
```

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-authored-by: Takashi Kokubun (k0kubun) <takashikkbn@gmail.com>
Co-authored-by: Kevin Menard <kevin.menard@shopify.com>
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>

* Fix the new test for RJIT

---------

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-authored-by: Takashi Kokubun (k0kubun) <takashikkbn@gmail.com>
Co-authored-by: Kevin Menard <kevin.menard@shopify.com>
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2024-04-29 14:32:07 -04:00
Peter Zhu
e3bfd25bd2 Fix memory leak of rb_ast_t in parser
ast_alloc uses TypedData_Make_Struct, which allocates a rb_ast_t. But it
is overwritten when we set the DATA_PTR so the original memory is leaked.

For example:

    10.times do
      100_000.times do
        eval("")
      end

      puts `ps -o rss= -p #{$$}`
    end

Before:

    17328
    20752
    23664
    28400
    30656
    34224
    37424
    40784
    43328
    46656

After:

    14320
    14320
    14320
    14320
    14320
    14320
    14320
    14336
    14336
    14336
2024-04-29 14:04:42 -04:00
Peter Zhu
95d036aaf0 Fix memory leak in ruby_parser
For example:

    10.times do
      100_000.times do
        eval("")
      end

      puts `ps -o rss= -p #{$$}`
    end

Before:

    19872
    26480
    32848
    39504
    45904
    52672
    59200
    65760
    72128
    78496

After:

    17328
    20752
    23664
    28400
    30656
    34224
    37424
    40784
    43328
    46656
2024-04-29 14:04:42 -04:00
Kevin Newton
d75bbba255 [PRISM] Remove false positive compile warnings for branch coverage 2024-04-29 13:28:15 -04:00
git
90db9c87a3 Update default gems list at dbb1ba88ebb5a08ea5a856c8086aa2 [ci skip] 2024-04-29 13:36:59 +00:00
Mari Imaizumi
dbb1ba88eb [ruby/reline] Bump version to 0.5.4
(https://github.com/ruby/reline/pull/691)

https://github.com/ruby/reline/commit/3f27286a5e
2024-04-29 13:35:59 +00:00
tomoya ishida
814d4b5e2c [ruby/reline] Input with eof and no newline bugfix
(https://github.com/ruby/reline/pull/671)

https://github.com/ruby/reline/commit/0d66c335a1
2024-04-29 13:23:03 +00:00
yui-knk
4c41203bbb Remove needless header file include 2024-04-29 21:26:44 +09:00
tomoya ishida
ae701031f5 [ruby/reline] Completely support full-width characters in
differential rendering
(https://github.com/ruby/reline/pull/654)

* Add a cut variation of Reline::Unicode.take_range method take_mbchar_range

* Consider fullwidth take_range in differential rendering

https://github.com/ruby/reline/commit/29714df09f
2024-04-29 12:08:59 +00:00
Mari Imaizumi
018c5717e5 [ruby/reline] Handle mode condition in inputrc
(https://github.com/ruby/reline/pull/687)

https://github.com/ruby/reline/commit/bed5fb3d77
2024-04-29 12:05:36 +00:00
David Rodriguez
435f449b4e [rubygems/rubygems] Make sure to force latest resolvable version explicitly
To make sure we can always update to the latest resolvable version for
each gem explicitly requested for update, we first run a full update,
and then add explicit exact requirements to the resolved versions. This
may lead into conflicts, but our resolver already automatically parses
those and unlocks additional gems to fix them.

https://github.com/rubygems/rubygems/commit/01c0bf34f0
2024-04-29 10:29:29 +00:00
David Rodríguez
491195af02 [rubygems/rubygems] Keep track of gems requested for update explicitly
https://github.com/rubygems/rubygems/commit/ea43e4c6d7
2024-04-29 10:29:28 +00:00
David Rodriguez
83933f921b [rubygems/rubygems] No need to reset version promoter here
Since resolution options don't change.

https://github.com/rubygems/rubygems/commit/5c5aa38c06
2024-04-29 10:29:28 +00:00
David Rodríguez
53571de8e9 [rubygems/rubygems] Fix circular require warning
https://github.com/rubygems/rubygems/commit/241d0aafcd
2024-04-29 09:04:33 +00:00
David Rodríguez
d6cb62a88f [rubygems/rubygems] Show better error when installed gemspecs are unreadable
https://github.com/rubygems/rubygems/commit/924f87c8a9
2024-04-29 08:57:35 +00:00
David Rodríguez
68a1867f53 [rubygems/rubygems] Fix issue with bundle update with an out of sync lockfile
An old platform related bug fix made some existing lockfiles no longer
work because they included invalid platforms. So to make it backwards
compatible, code was added to remove invalid platforms from the lockfile
before resolution. This is skipped though when Gemfile has changed
dependencies because in that case we will be re-resolving anyways.
However, in the `bundle update` case, the detection of "dependencies
have changed" was not actually working making Bundler remove all
platforms and not be able to resolve.

https://github.com/rubygems/rubygems/commit/6452adfd62
2024-04-29 08:56:55 +00:00
Andy Waite
6203307f16 [rubygems/rubygems] Address PR feedback
https://github.com/rubygems/rubygems/commit/62be097a32
2024-04-29 08:42:07 +00:00
Andy Waite
2a683f3f7d [rubygems/rubygems] Clarify bundle check behaviour in docs
https://github.com/rubygems/rubygems/commit/c438c6db2e
2024-04-29 08:42:07 +00:00
yui-knk
5ed2064419 Lrama v0.6.8 2024-04-29 15:09:26 +09:00
卜部昌平
b7bd55cdc7 suppress -Wold-style-cast warnings 2024-04-29 03:09:15 +02:00
卜部昌平
17a0e2ac04 workaround C++ compile error
We observe compiler error on FreeBSD.  Their stdckdint.h does not
understand C++.  This shall be addressed on their side.  Unti then we
resport to our own version.

https://rubyci.s3.amazonaws.com/freebsd14/ruby-master/log/20240427T143002Z.log.html.gz
2024-04-29 03:03:50 +02:00
Nobuyoshi Nakada
a6308ca958 ripper: Move DSL line pattern 2024-04-29 08:38:23 +09:00
ydah
f9cf923af2 Use user defined parameterizing rules 2024-04-29 08:38:23 +09:00
yui-knk
29aaf4abe6 Remove ast_new field from struct rb_parser_config_struct
`ast_new` can be embedded into `rb_ast_new`.
2024-04-28 17:58:57 +09:00
yui-knk
5c3d5c7cdd Lrama v0.6.7 2024-04-28 13:38:36 +09:00
HASUMI Hitoshi
ddd8da4b6b [Universal parser] Improve AST structure
This patch moves `ast->node_buffer->config` to `ast->config` aiming to improve readability and maintainability of the source.

## Background

We could not add the `config` field to the `rb_ast_t *` due to the five-word restriction of the IMEMO object.
But it is now doable by merging https://github.com/ruby/ruby/pull/10618

## About assigning `&rb_global_parser_config` to `ast->config` in `ast_alloc()`

The approach of not setting `ast->config` in `ast_alloc()` means that the client, CRuby in this scenario, that directly calls `ast_alloc()` will be responsible for releasing it if a resource that is passed to AST needs to be released.

However, we have put on hold whether we can guarantee the above so far, thus, this patch looks like that.

```
// ruby_parser.c
static VALUE
ast_alloc(void)
{
    rb_ast_t *ast;
    VALUE vast = TypedData_Make_Struct(0, rb_ast_t, &ast_data_type, ast);
#ifdef UNIVERSAL_PARSER
    ast = (rb_ast_t *)DATA_PTR(vast);
    ast->config = &rb_global_parser_config;
#endif
    return vast;
}
```
2024-04-28 12:08:21 +09:00
ydah
8ad0b2cd31 Use ' '+ instead of words_sep 2024-04-28 09:01:49 +09:00
Nobuyoshi Nakada
937cb1176d
Fix regexps for abbreviated options 2024-04-28 00:06:24 +09:00
Nobuyoshi Nakada
a0b4f0bcc9
Timeout scale in bootstraptest 2024-04-28 00:03:09 +09:00
Nobuyoshi Nakada
602193ded7
Timeout in bootstraptest 2024-04-28 00:02:33 +09:00
卜部昌平
c844968b72 ruby tool/update-deps --fix 2024-04-27 21:55:28 +09:00
卜部昌平
bb5a538207 use of stdckdint.h
C23 is going to have this header.  The industry is already moving
towards accepting it; OSes and compilers started to implement theirs.

Why not detect its presence and if any, prefer over other ways.

See also:

- https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2683.pdf
- https://reviews.freebsd.org/D41734
- https://reviews.llvm.org/D157331
- https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=8441841a1b985d68245954af1ff023db121b0635
2024-04-27 21:55:28 +09:00
HASUMI Hitoshi
9ea77cb351 Remove unnecessary assignment to ast->body.line_count
This patch removes a code that assigns `-1` to `ast->body.line_count` because, at least as of now, it looks not necessary.
I made this commit atomically revertable if I was wrong.

## Relevant commits

- The preparation for this PR: https://github.com/ruby/ruby/pull/10655/files#diff-2af2e7f2e1c28da5e9d99ad117cba1c4dabd8b0bc3081da88e414c55c6aa9549R1484-R1493
- The original commit that introduced the code: d65f7458bc
2024-04-27 17:56:20 +09:00
jinroq
ef3e3e9a2f
Fixed a value specified for OPT_THREADED_CODE (#10657)
Values defined for OPT_THREADED_CODE are 0,1,2. However, 1,2,3 are set in workflow. It seems that case 3 does not exist, so 0 is specified instead.

Co-authored-by: jinroq <jinroq@users.noreply.github.com>
2024-04-26 20:47:45 -07:00
Takashi Kokubun
8089faee45 Revert "YJIT: Try splitting getlocal/setlocal blocks (#10648)"
This reverts commit ab228bd0844758a1c444e39030c153874adf9120.
2024-04-26 20:43:22 -07:00