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

86672 Коммитов

Автор SHA1 Сообщение Дата
Yusuke Endoh ac5ac48a36 Revert 28a1c4f33e
28a1c4f33e seems to call an improper
ensure clause. [Bug #20655]
Than fixing it properly, I bet it would be much better to simply revert
that commit. It reduces the unneeded complexity. Jumping into a block
called by a C function like Hash#each with callcc is user's fault.
It does not need serious support.
2024-07-30 15:31:24 +09:00
Satoshi Tagomori c884db0b5b [BUG #20655] Add tests to use rb_ensure and call cont.call 2024-07-30 15:31:24 +09:00
Misaki Shioi b3baa11ee9
Improve Socket.tcp (#11187)
[Feature #20646]Improve Socket.tcp

This is a proposed improvement to `Socket.tcp`, which has implemented Happy Eyeballs version 2 (RFC8305) in PR9374.

1. Background
I implemented Happy Eyeballs version 2 (HEv2) for Socket.tcp in PR9374, but several issues have been identified:

- `IO.select` waits for name resolution or connection establishment in v46w, but it does not consider the case where both events occur simultaneously when it returns a value.
  - In this case, Socket.tcp can only capture one event and needs to execute an unnecessary loop to capture the other one, calling `IO.select` one extra time.
- `IO.select` waits for both IPv6/IPv4 name resolution (in start), but when it returns a value, it doesn't consider the case where name resolution for both address families is complete.
  - In this case, `Socket.tcp` can only obtain the addresses of one address family and needs to execute an unnecessary loop obtain the other addresses, calling `IO.select` one extra time.
- The consideration for `connect_timeout` was insufficient. After initiating one or more connections, it raises a 'user specified timeout' after the `connect_timeout` period even if there were addresses that have been resolved and have not yet tried to connect.
- It does not retry with another address in case of a connection failure.
- It executes unnecessary state transitions even when an IP address is passed as the `host` argument.
- The regex for IP addresses did not correctly specify the start and end.

2. Proposal & Outcome
To overcome the aforementioned issues, this PR introduces the following changes:

- Previously, each loop iteration represented a single state transition. This has been changed to execute all processes that meet the execution conditions within a single loop iteration.
  - This prevents unnecessary repeated loops and calling `IO.select`
- Introduced logic to determine the timeout value set for `IO.select`. During the Resolution Delay and Connection Attempt Delay, the user-specified timeout is ignored. Otherwise, the timeout value is set to the larger of `resolv_timeout` and `connect_timeout`.
  - This ensures that the `connect_timeout` is only detected after attempting to connect to all resolved addresses.
- Retry with another address in case of a connection failure.
  - This prevents unnecessary repeated loops upon connection failure.
- Call `tcp_without_fast_fallback` when an IP address is passed as the host argument.
  - This prevents unnecessary state transitions when an IP address is passed.
- Fixed regex for IP addresses.

Additionally, the code has been reduced by over 100 lines, and redundancy has been minimized, which is expected to improve readability.

3. Performance
No significant performance changes were observed in the happy case before and after the improvement.
However, improvements in state transition deficiencies are expected to enhance performance in edge cases.

```ruby
require 'socket'
require 'benchmark'

Benchmark.bmbm do |x|
  x.report('fast_fallback: true') do
    30.times { Socket.tcp("www.ruby-lang.org", 80) }
  end

  x.report('fast_fallback: false') do # Ruby3.3時点と同じ
    30.times { Socket.tcp("www.ruby-lang.org", 80, fast_fallback: false) }
  end
end
```

Before:

```
~/s/build ❯❯❯ ../install/bin/ruby ../ruby/test.rb

                           user     system      total        real
fast_fallback: true    0.021315   0.040723   0.062038 (  0.504866)
fast_fallback: false   0.007553   0.026248   0.033801 (  0.533211)
```

After:

```
~/s/build ❯❯❯ ../install/bin/ruby ../ruby/test.rb

                           user     system      total        real
fast_fallback: true    0.023081   0.040525   0.063606 (  0.406219)
fast_fallback: false   0.007302   0.025515   0.032817 (  0.418680)
```
2024-07-30 12:58:31 +09:00
yui-knk 7ea678b24b Add array test cases for `TestParse#test_define_singleton_error` 2024-07-30 12:48:24 +09:00
dependabot[bot] cdda284cbe Bump ossf/scorecard-action from 2.3.3 to 2.4.0
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.3 to 2.4.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](dc50aa9510...62b2cac7ed)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-30 08:37:16 +09:00
Nobuyoshi Nakada 30f57637ee Wait for server threads to finish 2024-07-30 07:33:43 +08:00
dependabot[bot] 0afbc73b2a [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.98 to 0.9.99.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.98...v0.9.99)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

https://github.com/rubygems/rubygems/commit/da7b71d188
2024-07-29 23:24:49 +00:00
Aaron Patterson 2c1655314a Revert moving things to Ruby
This is slowing down benchmarks on x86, so lets revert it for now.
2024-07-29 14:18:11 -07:00
Randy Stauner acbb8d4fb5 Expand opt_newarray_send to support Array#pack with buffer keyword arg
Use an enum for the method arg instead of needing to add an id
that doesn't map to an actual method name.

$ ruby --dump=insns -e 'b = "x"; [v].pack("E*", buffer: b)'

before:

```
== disasm: #<ISeq:<main>@-e:1 (1,0)-(1,34)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 1] b@0
0000 putchilledstring                       "x"                       (   1)[Li]
0002 setlocal_WC_0                          b@0
0004 putself
0005 opt_send_without_block                 <calldata!mid:v, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0007 newarray                               1
0009 putchilledstring                       "E*"
0011 getlocal_WC_0                          b@0
0013 opt_send_without_block                 <calldata!mid:pack, argc:2, kw:[#<Symbol:0x000000000023110c>], KWARG>
0015 leave
```

after:

```
== disasm: #<ISeq:<main>@-e:1 (1,0)-(1,34)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 1] b@0
0000 putchilledstring                       "x"                       (   1)[Li]
0002 setlocal_WC_0                          b@0
0004 putself
0005 opt_send_without_block                 <calldata!mid:v, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0007 putchilledstring                       "E*"
0009 getlocal                               b@0, 0
0012 opt_newarray_send                      3, 5
0015 leave
```
2024-07-29 16:26:58 -04:00
Peter Zhu 86a762ce56 [ruby/reline] Fix memory leak in setupterm
(https://github.com/ruby/reline/pull/733)

The allocated Fiddle::Pointer never gets freed because it doesn't have a
free function defined for when it gets garbage collected. This commit
changes it to use the default free function.

https://github.com/ruby/reline/commit/0796dcd497
2024-07-29 15:07:53 +00:00
Burdette Lamar 63bdf2d725 [ruby/rdoc] [DOC] Mods about markup formats
(https://github.com/ruby/rdoc/pull/1143)

https://github.com/ruby/rdoc/commit/011de3f2fd
2024-07-29 13:16:18 +00:00
BurdetteLamar df1cc04301 Add remark about call-seq 2024-07-29 09:15:19 -04:00
Burdette Lamar 477f672592
[DOC] rb_ary_s_create (#11256) 2024-07-29 09:11:35 -04:00
dependabot[bot] d2184e8d46 Bump github/codeql-action from 3.25.14 to 3.25.15
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.14 to 3.25.15.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](5cf07d8b70...afb54ba388)

---
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-07-29 12:31:45 +09:00
dependabot[bot] 14eb38608a Bump ruby/setup-ruby from 1.188.0 to 1.190.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.188.0 to 1.190.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](50ba3386b0...a6e6f86333)

---
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-07-29 12:31:19 +09:00
yui-knk 3f40cebabc Specify `LAST_NODE` for `NODE_DEFINED`
For example:

```
defined?(1)
```

Before:

```
# @ NODE_SCOPE (id: 2, line: 1, location: (1,0)-(1,11))
# +- nd_tbl: (empty)
# +- nd_args:
# |   (null node)
# +- nd_body:
#     @ NODE_DEFINED (id: 1, line: 1, location: (1,0)-(1,11))*
#     +- nd_head:
#     |   @ NODE_INTEGER (id: 0, line: 1, location: (1,9)-(1,10))
#     |   +- val: 1
```

After:

```
# @ NODE_SCOPE (id: 2, line: 1, location: (1,0)-(1,11))
# +- nd_tbl: (empty)
# +- nd_args:
# |   (null node)
# +- nd_body:
#     @ NODE_DEFINED (id: 1, line: 1, location: (1,0)-(1,11))*
#     +- nd_head:
#         @ NODE_INTEGER (id: 0, line: 1, location: (1,9)-(1,10))
#         +- val: 1
```
2024-07-29 08:01:52 +09:00
Peter Zhu e798f45cc2 Error when --with-shared-gc doesn't specify a directory 2024-07-26 13:20:04 -04:00
Yuta Saito a65c205a1b [ruby/prism] Add explicit check for PRISM_HAS_NO_FILESYSTEM
https://github.com/ruby/prism/commit/89c22f0e6c
2024-07-26 17:07:50 +00:00
Yuta Saito 1992bd31a5 [ruby/prism] Fallback to pm_string_file_init on platforms without memory-mapped files
> ..., and on other POSIX systems we'll use `read`.

As `pm_string_mapped_init`'s doc comment says, it should fall back to
`read(2)`-based implementation on platforms without memory-mapped files
like WASI, but it didn't. This commit fixes it by calling `pm_string_file_init`
in the fallback case.
Also `defined(_POSIX_MAPPED_FILES)` check for `read(2)`-based path is
unnecessary, and it prevents the fallback from being executed, so this
change removes it.

https://github.com/ruby/prism/commit/b3d9064b71
2024-07-26 17:07:50 +00:00
git cb5c460594 * expand tabs. [ci skip]
Please consider using misc/expand_tabs.rb as a pre-commit hook.
2024-07-26 15:44:44 +00:00
Alan Wu 158177e399 Improve allocation throughput by outlining cache miss code path
Previously, GCC 11 on x86-64 inlined the heavy weight logic for
potentially triggering GC into newobj_alloc(). This slowed down
the hotter code path where the ractor cache hits, causing a degradation
to allocation throughput.

Outline the logic into a separate function and have it never inlined.

This restores allocation throughput to the same level as
98eeadc ("Development of 3.4.0 started.").

To evaluate, instrument miniruby so it allocates a bunch of objects and
then exits:

    diff --git a/eval.c b/eval.c
    --- a/eval.c
    +++ b/eval.c
    @@ -92,6 +92,15 @@ ruby_setup(void)
         }
         EC_POP_TAG();

    +rb_gc_disable();
    +rb_execution_context_t *ec = GET_EC();
    +long const n = 20000000;
    +for (long i = 0; i < n; ++i) {
    +    rb_wb_protected_newobj_of(ec, 0, T_OBJECT, 40);
    +}
    +printf("alloc %ld\n", n);
    +exit(0);
    +
         return state;
     }

With `3.3-equiv` being 98eeadc, and `pre` being f2728c3393
and `post` being this commit, I have:

    $ hyperfine -L buildtag post,pre,3.3-equiv '/ruby/build-{buildtag}/miniruby'
    Benchmark 1: /ruby/build-post/miniruby
      Time (mean ± σ):     873.4 ms ±   2.8 ms    [User: 377.6 ms, System: 490.2 ms]
      Range (min … max):   868.3 ms … 877.8 ms    10 runs

    Benchmark 2: /ruby/build-pre/miniruby
      Time (mean ± σ):     960.1 ms ±   2.8 ms    [User: 430.8 ms, System: 523.9 ms]
      Range (min … max):   955.5 ms … 964.2 ms    10 runs

    Benchmark 3: /ruby/build-3.3-equiv/miniruby
      Time (mean ± σ):     886.9 ms ±   2.8 ms    [User: 379.5 ms, System: 501.0 ms]
      Range (min … max):   883.0 ms … 890.8 ms    10 runs

    Summary
      '/ruby/build-post/miniruby' ran
        1.02 ± 0.00 times faster than '/ruby/build-3.3-equiv/miniruby'
        1.10 ± 0.00 times faster than '/ruby/build-pre/miniruby'

These results are from a Skylake server with GCC 11.
2024-07-26 11:44:34 -04:00
Alan Wu a06cfa7e89 Fix a -Wmaybe-uninitialized
With the body of functions available, GCC noticed that lev is
uninitialized in rb_gc_vm_lock_no_barrier() in single ractor
mode.
2024-07-26 11:44:34 -04:00
Alan Wu 0ada02abe2 Put the default GC implementation back into gc.o
We discovered that having gc.o and gc_impl.o in separate translation
units diminishes codegen quality with GCC 11 on x86-64. This commit
solves that problem by including default/gc.c into gc.c, letting the
optimizer have visibility into the body of functions again in builds
not using link-time optimization, which are common.

This effectively restores things to the way they were before
[Feature #20470] from the optimizer's perspective while maintaining the
ability to build gc/default.c as a DSO.

There were a few functions duplicated across gc.c and gc/default.c.
Extract them and put them into gc/gc.h.
2024-07-26 11:44:34 -04:00
Alan Wu cef959df90 Delete unused rb_gc_impl_get_finalizers() not in gc_impl.h 2024-07-26 11:44:34 -04:00
BurdetteLamar aaa542d894 Doc for some #ceil and #floor 2024-07-26 11:22:18 -04:00
BurdetteLamar 78f1b835a0 Doc for some #ceil and #floor 2024-07-26 11:22:18 -04:00
Peter Zhu 7464514ca5 Fix memory leak in String#start_with? when regexp times out
[Bug #20653]

This commit refactors how Onigmo handles timeout. Instead of raising a
timeout error, onig_search will return a ONIGERR_TIMEOUT which the
caller can free memory, and then raise a timeout error.

This fixes a memory leak in String#start_with when the regexp times out.
For example:

    regex = Regexp.new("^#{"(a*)" * 10_000}x$", timeout: 0.000001)
    str = "a" * 1000000 + "x"

    10.times do
      100.times do
        str.start_with?(regex)
      rescue
      end

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

Before:

    33216
    51936
    71152
    81728
    97152
    103248
    120384
    133392
    133520
    133616

After:

    14912
    15376
    15824
    15824
    16128
    16128
    16144
    16144
    16160
    16160
2024-07-26 08:42:38 -04:00
David Rodríguez 67e1ea0028 [rubygems/rubygems] Remove inconsistent whitespace from CLI flags
RuboCop sometimes accepts extra spaces for alignment, but in this case I
don't see any consistent alignment.

https://github.com/rubygems/rubygems/commit/a8c767e14b
2024-07-26 12:16:56 +00:00
David Rodríguez bfaccd6433 [rubygems/rubygems] Make all tests still pass when switching from truffleruby to cruby
https://github.com/rubygems/rubygems/commit/4f3d9fa3bf
2024-07-26 08:05:53 +00:00
David Rodríguez 7feccb123a [rubygems/rubygems] Make test env resilient to ruby version changes
We use pre-existence of `rake_path` to decide whether we need to
regenerate dummy test gems in `tmp`. When changing rubies, the previous
implementation will believe that the correct `rake_path` exists
and avoids regenerating dummy gems, given an error like the following
when specs are run:

```
(...)
Could not find rubygems-generate_index lib directory in /path/to/rubygems/bundler/tmp/1/gems/base/ruby/3.2.0
  # ./spec/support/builders.rb:253:in `block in update_repo'
  # ./spec/support/helpers.rb:337:in `block in with_gem_path_as'
  # ./spec/support/helpers.rb:351:in `without_env_side_effects'
  # ./spec/support/helpers.rb:332:in `with_gem_path_as'
  # ./spec/support/builders.rb:251:in `update_repo'
  # ./spec/support/builders.rb:228:in `build_repo'
  # ./spec/support/builders.rb:197:in `build_repo4'
  # ./spec/commands/lock_spec.rb:103:in `block (2 levels) in <top (required)>'
(...)
```

To fix this, fix the part of the path that depends on the implementation
and the Ruby version so that we don't give false positives.

https://github.com/rubygems/rubygems/commit/fafacfa210
2024-07-26 08:05:53 +00:00
Jerome Dalbert 71dec15a70 [rubygems/rubygems] Fix bundle check exit code when git gem is missing
Make `bundle check` exit with code 1 when gem git source is not yet
checked out.

https://github.com/rubygems/rubygems/commit/93162bf5af
2024-07-26 07:56:15 +00:00
dependabot[bot] 3542ad52e2 Bump github/codeql-action from 3.25.13 to 3.25.14
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.13 to 3.25.14.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2d790406f5...5cf07d8b70)

---
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-07-26 11:57:54 +09:00
Nobuyoshi Nakada 5f1eb0dc79
Fix wrong conversion in disasm dump
`LINK_ELEMENT::type` is an `enum` not a `VALUE`, `FIX2LONG` doesn't
make sense.
2024-07-26 11:24:53 +09:00
Hiroshi SHIBATA 83a99bdbe6 [ruby/net-http] Removed needless NullWriter class
https://github.com/ruby/net-http/commit/ddb2a81aed
2024-07-26 01:45:02 +00:00
yui-knk 2c76bb7ec0 Remove `struct RNode_VALUES`
This was removed by a5cc6341c0.
2024-07-26 10:29:26 +09:00
yui-knk f2728c3393 Change RESBODY Node structure
Extracrt exception variable into `nd_exc_var` field
to keep the original grammar structure.

For example:

```
begin
rescue Error => e1
end
```

Before:

```
@ NODE_RESBODY (id: 8, line: 2, location: (2,0)-(2,18))
+- nd_args:
|   @ NODE_LIST (id: 2, line: 2, location: (2,7)-(2,12))
|   +- as.nd_alen: 1
|   +- nd_head:
|   |   @ NODE_CONST (id: 1, line: 2, location: (2,7)-(2,12))
|   |   +- nd_vid: :Error
|   +- nd_next:
|       (null node)
+- nd_body:
|   @ NODE_BLOCK (id: 6, line: 2, location: (2,13)-(2,18))
|   +- nd_head (1):
|   |   @ NODE_LASGN (id: 3, line: 2, location: (2,13)-(2,18))
|   |   +- nd_vid: :e1
|   |   +- nd_value:
|   |       @ NODE_ERRINFO (id: 5, line: 2, location: (2,13)-(2,18))
|   +- nd_head (2):
|       @ NODE_BEGIN (id: 4, line: 2, location: (2,18)-(2,18))
|       +- nd_body:
|           (null node)
+- nd_next:
    (null node)
```

After:

```
@ NODE_RESBODY (id: 6, line: 2, location: (2,0)-(2,18))
+- nd_args:
|   @ NODE_LIST (id: 2, line: 2, location: (2,7)-(2,12))
|   +- as.nd_alen: 1
|   +- nd_head:
|   |   @ NODE_CONST (id: 1, line: 2, location: (2,7)-(2,12))
|   |   +- nd_vid: :Error
|   +- nd_next:
|       (null node)
+- nd_exc_var:
|   @ NODE_LASGN (id: 3, line: 2, location: (2,13)-(2,18))
|   +- nd_vid: :e1
|   +- nd_value:
|       @ NODE_ERRINFO (id: 5, line: 2, location: (2,13)-(2,18))
+- nd_body:
|   @ NODE_BEGIN (id: 4, line: 2, location: (2,18)-(2,18))
|   +- nd_body:
|       (null node)
+- nd_next:
    (null node)
```
2024-07-26 07:29:32 +09:00
Jason Karns a4563be05c [rubygems/rubygems] bundle-gem learns to find Gemfile template correctly
Removes the symlink for gems.rb.tt and instead uses the singular
template file. Only the destination filename for the gemfile reads from
the `init_gems_rb` setting.

https://github.com/rubygems/rubygems/commit/43ce0e1666
2024-07-25 19:50:59 +00:00
Peter Zhu 54ff3d6996 Fix test_kwarg_eval_memory_leak
Hash.new no longer takes keyword arguments except for capacity, so we
should just use a method that takes keyword arguments instead.
2024-07-25 15:25:37 -04:00
Kevin Newton 24770c30f8 [ruby/prism] Sync from ruby/ruby
https://github.com/ruby/prism/commit/280517c325
2024-07-25 18:59:10 +00:00
Alan Wu 83b0cedffe Add branch prediction annotations for object allocation
I get a slight boost from these with GCC 11 on Intel Skylake.

Part of a larger story to fix an allocation throughput regression
compared to 98eeadc ("Development of 3.4.0 started.") as the baseline.
2024-07-25 12:46:33 -04:00
Peter Zhu 10574857ce Fix memory leak in Regexp capture group when timeout
[Bug #20650]

The capture group allocates memory that is leaked when it times out.

For example:

    re = Regexp.new("^#{"(a*)" * 10_000}x$", timeout: 0.000001)
    str = "a" * 1000000 + "x"

    10.times do
      100.times do
        re =~ str
      rescue Regexp::TimeoutError
      end

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

Before:

    34688
    56416
    78288
    100368
    120784
    140704
    161904
    183568
    204320
    224800

After:

    16288
    16288
    16880
    16896
    16912
    16928
    16944
    17184
    17184
    17200
2024-07-25 09:23:49 -04:00
Benoit Daloze 53f0d3b1f7 [ruby/prism] Do not serialize common flags when PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS is set
* Note that we could shift the flags by 2 on serialize & deserialize
  but it does not seems worth it as it does not save serialized size
  in any significant amount, i.e. average was 0.799 before #2924.
* $ bundle exec rake serialized_size:topgems
Before:
Total sizes for top 100 gems:
total source size:      90207647
total serialized size:  69477115
total serialized/total source: 0.770

Stats of ratio serialized/source per file:
average: 0.844
median:  0.825
1st quartile: 0.597
3rd quartile: 1.064
min - max: 0.078 - 3.792

After:
Total sizes for top 100 gems:
total source size:      90207647
total serialized size:  66150209
total serialized/total source: 0.733

Stats of ratio serialized/source per file:
average: 0.800
median:  0.779
1st quartile: 0.568
3rd quartile: 1.007
min - max: 0.076 - 3.675

https://github.com/ruby/prism/commit/e012072f70
2024-07-25 11:39:05 +00:00
Benoit Daloze 9cc2747ebb [ruby/prism] Do not serialize node_id when PRISM_SERIALIZE_ONLY_SEMANTICS_FIELDS is set
* $ bundle exec rake serialized_size:topgems
Before:
Total sizes for top 100 gems:
total source size:      90207647
total serialized size:  86284647
total serialized/total source: 0.957

Stats of ratio serialized/source per file:
average: 0.952
median:  0.937
1st quartile: 0.669
3rd quartile: 1.206
min - max: 0.080 - 4.065

After:
Total sizes for top 100 gems:
total source size:      90207647
total serialized size:  69477115
total serialized/total source: 0.770

Stats of ratio serialized/source per file:
average: 0.844
median:  0.825
1st quartile: 0.597
3rd quartile: 1.064
min - max: 0.078 - 3.792

https://github.com/ruby/prism/commit/cf90fe5759
2024-07-25 11:39:04 +00:00
Yusuke Endoh 22ad6b249b Extend RUBY_TEST_TIMEOUT_SCALE on macos-14 and --repeat-count=2 2024-07-25 14:43:03 +09:00
Yusuke Endoh 5f6a1c2e22 Omit TestFile#test_stat when the machine is stupidly slow
GitHub Actions macos-14 machine is stupid.

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-07-25 13:47:51 +09:00
yui-knk 357ae357e8 Dump forwarding field of `struct rb_args_info` and `struct RNode_BLOCK_PASS` 2024-07-25 13:23:14 +09:00
David Rodríguez 30eba40f9c [rubygems/rubygems] Remove `to_yaml_properties`
This is an old syck thing, no longer used anywhere.

https://github.com/rubygems/rubygems/commit/6f72d02bac
2024-07-24 19:55:04 +00:00
Samuel Giddins 0d3ce31234 [ruby/openssl] Set time directly on the x509 store
(https://github.com/ruby/openssl/pull/770)

Instead of an ivar, so other ossl functions that take a store will use the correct time when verifying

https://github.com/ruby/openssl/commit/21aadc66ae
2024-07-24 16:51:00 +00:00
Kazuki Yamaguchi 1388945f0d [ruby/openssl] asn1: make ossl_asn1_get_asn1type() private
The function is not used anywhere outside of ossl_asn1.c.

https://github.com/ruby/openssl/commit/5392b79941
2024-07-24 16:50:01 +00:00
Kazuki Yamaguchi a1cf39bd36 [ruby/openssl] x509attr: avoid using OpenSSL::ASN1 internals in #value=
OpenSSL::ASN1 is being rewritten in Ruby. To make it easier, let's
remove dependency to the instance variables and the internal-use
function ossl_asn1_get_asn1type() outside OpenSSL::ASN1.

This also fixes the insufficient validation of the passed value with
its tagging.

https://github.com/ruby/openssl/commit/35a157462e
2024-07-24 16:50:01 +00:00