77264 Commits

Author SHA1 Message Date
Samuel Williams
648870b5c5
Support IO#pread / IO#pwrite using fiber scheduler. (#7594)
* Skip test if non-blocking file IO is not supported.
2023-03-31 00:48:55 +13:00
Nobuyoshi Nakada
6f122965cf [Bug #19547] Add token for unescaped backslash
This token is exposed only when `RubyVM::AbstractSyntaxTree` with
`keep_tokens` option.
2023-03-30 19:47:36 +09:00
Nobuyoshi Nakada
cbfd029985 [ruby/time] Make RFC2822 regexp linear
https://hackerone.com/reports/1485501

https://github.com/ruby/time/commit/51034bda4c
2023-03-30 10:44:39 +00:00
Nobuyoshi Nakada
aa3885501f [ruby/time] Fix quadratic backtracking on invalid time
https://hackerone.com/reports/1485501

https://github.com/ruby/time/commit/2444456fc1
2023-03-30 10:44:38 +00:00
Nobuyoshi Nakada
623027bf0b [ruby/time] Test for quadratic backtracking on invalid time
https://hackerone.com/reports/1485501

https://github.com/ruby/time/commit/b30b7bc6e6
2023-03-30 10:44:37 +00:00
Koichi Sasada
f5b824c745 show debug log for ractor_terminal_interrupt_all 2023-03-30 14:56:37 +09:00
Koichi Sasada
30b43f4f1a rb_ractor_thread_list() only for current ractor
so that no need to lock the ractor.
2023-03-30 14:56:37 +09:00
Koichi Sasada
94e4182267 rb_current_ractor_raw(b)
`rb_current_ractor()` expects it has valid `ec` and `r`.
`rb_current_ractor_raw()` with a parameter `false` allows to return
NULL if `ec` is not available.
2023-03-30 14:56:23 +09:00
Koichi Sasada
ba72849a3f cosmetic change 2023-03-30 14:56:10 +09:00
Koichi Sasada
f89c348234 enable GH actions on USE_RUBY_DEBUG_LOG=1 2023-03-30 14:55:25 +09:00
Alan Wu
1b06422767
YJIT: Leave cfp->pc uninitialized for VM_FRAME_MAGIC_CFUNC
C function frames don't need to use the VM-specific pc field to run
properly. When pushing a control frame from output code, save one
instruction by leaving the field uninitialized.

Fix-up rb_vm_svar_lep(), which is used while setting local variables via
Regexp#=~. Use cfp->iseq as a secondary signal so it can stop assuming
that all CFUNC frames always have zero pc's.
2023-03-29 17:57:52 -04:00
Alan Wu
a1a4d77472 YJIT: code_gc(): Assert self is inline to avoid other_cb()
The derived `&mut` from `other_cb()` overlapped with the parameter
`ocb`.

Use `cfg!()` instead of `#[cfg...]` to avoid unused warnings.
2023-03-29 14:53:49 -04:00
Alan Wu
cdededf24d YJIT: Take VM lock in RubyVM::YJIT.code_gc
Code GC needs synchronization.
2023-03-29 14:53:49 -04:00
Alan Wu
93b6997103 YJIT: Fix overlapping &mut in Assembler::code_gc()
Making overlapping `&mut`s triggers Undefined Bahavior. This function
previously had them through `cb` and `ocb` aliasing with `self` or live
references in the caller.

To fix the overlap, take `ocb` as a parameter and don't use `get_inline_cb()`
in the body of the function.
2023-03-29 14:53:49 -04:00
Jimmy Miller
a8c6ba23a6
YJIT: Rest and keyword (non-supplying) (#7608)
* YJIT: Rest and keyword (non-supplying)

* Update yjit/src/codegen.rs

---------

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2023-03-29 12:31:41 -04:00
Stan Lo
b168141c78 [ruby/reline] Drop Dialog#scrollbar_pos as we can store it in a
local variable
(https://github.com/ruby/reline/pull/529)

https://github.com/ruby/reline/commit/d0139975fd

Co-authored-by: tomoya ishida <tomoyapenguin@gmail.com>
2023-03-29 13:51:27 +00:00
Stan Lo
02ecdf85c5 [ruby/reline] Drop Unicode.take_range's optional arg as it's never
used
(https://github.com/ruby/reline/pull/528)

https://github.com/ruby/reline/commit/428fed4a6a
2023-03-29 10:20:29 +00:00
Hiroshi SHIBATA
3155b76eb4 Added ~\scoop\shims to PATH 2023-03-29 18:36:17 +09:00
Hiroshi SHIBATA
54ddf58a29 Don't need to specify YACC name for scoop bison 2023-03-29 18:36:17 +09:00
Hiroshi SHIBATA
a807fa6f9b Use scoop instead of Chocolatey
chocolatey often returns 503 status.
2023-03-29 18:36:17 +09:00
Takashi Kokubun
9a1f6975c5 RJIT: Propagate a set of args as a CallingInfo 2023-03-29 00:44:31 -07:00
git
f8f15e247d Update bundled gems list at 2023-03-29 2023-03-29 07:00:50 +00:00
tomoya ishida
e26908dc4b [ruby/reline] Improve OSC sequence regexp. OSC sequence can end with
ST(ESC\) and it should not to include \a and \e inside.
(https://github.com/ruby/reline/pull/527)

https://github.com/ruby/reline/commit/a88052adec
2023-03-29 06:54:08 +00:00
Hiroshi SHIBATA
8c8d068016 [ruby/win32ole] Skip test failure with mswin platform
https://github.com/ruby/win32ole/actions/runs/4507614838/jobs/7935550685?pr=18

https://github.com/ruby/win32ole/commit/39ae6c2bc7
2023-03-29 04:00:22 +00:00
Nobuyoshi Nakada
f241a8de56
[ruby/uri] Increase rehearsals 2023-03-29 09:52:33 +09:00
Maxime Chevalier-Boisvert
39a34694a0
YJIT: Add --yjit-pause and RubyVM::YJIT.resume (#7609)
* YJIT: Add --yjit-pause and RubyVM::YJIT.resume

This allows booting YJIT in a suspended state. We chose to add a new
command line option as opposed to simply allowing YJIT.resume to work
without any command line option because it allows for combining with
YJIT tuning command line options. It also simpifies implementation.

Paired with Kokubun and Maxime.

* Update yjit.rb

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>

---------

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2023-03-28 15:21:19 -04:00
Takashi Kokubun
2f8a598dc5
YJIT: Stop using the starting_context pattern (#7610) 2023-03-28 11:40:48 -07:00
NARUSE, Yui
2488b4dd0d gem related automation must run only on master 2023-03-29 00:47:37 +09:00
Stan Lo
1e9a218ade [ruby/reline] Expand the scanned array to later case statement more
straightforward
(https://github.com/ruby/reline/pull/526)

* Improve test coverage on Unicode.take_range

* Add test for Unicode.calculate_width

* Expand the scanned array to later case statement more straightforward
2023-03-28 12:49:49 +00:00
Peter Zhu
417b1a3644 Fix memory leak for iclass
[Bug #19550]

If !RCLASS_EXT_EMBEDDED (e.g. 32 bit systems) then the rb_classext_t is
allocated throug malloc so it must be freed.

The issue can be seen in the following script:

```
20.times do
  100_000.times do
    mod = Module.new
    Class.new do
      include mod
    end
  end

  # Output the Resident Set Size (memory usage, in KB) of the current Ruby process
  puts `ps -o rss= -p #{$$}`
end
```

Before this fix, the max RSS is 280MB, while after this change, it's
30MB.
2023-03-28 08:20:06 -04:00
NARUSE, Yui
6ce6b4d1e7 Use merge_group 2023-03-28 21:01:59 +09:00
Nobuyoshi Nakada
c86ccccbd7
Revert "RBS: Pathname#taint and Pathname#untaint are removed"
This reverts commit 46132e78b7438389bf49a860a0cd8957f685dcb3, in favor
of 298cb57c115e789c021962c758eb734c2d8ee1f6.
2023-03-28 18:02:50 +09:00
Nobuyoshi Nakada
6b05f125bb Skip commits only for tools
Get rid of accidents like 67feb782f947046f65951303893713052a19a546.
2023-03-28 17:17:51 +09:00
Nobuyoshi Nakada
98b409cb9c Set FILTER_BRANCH_SQUELCH_WARNING only in child environment 2023-03-28 17:17:51 +09:00
Nobuyoshi Nakada
f6adc5be94 Check if Bundler is defined 2023-03-28 17:17:51 +09:00
dependabot[bot]
a136ca0d04 Bump actions/checkout from 3.4.0 to 3.5.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](24cb908017...8f4b7f8486)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-28 17:15:17 +09:00
Nobuyoshi Nakada
040fab3782 Ripper: Add keyword options to assert_parse_files 2023-03-28 17:14:34 +09:00
NARUSE, Yui
9891797a27 Use 3 way merge for merger.rb
Since --3way insists --index, git diff needs to compare with HEAD.
2023-03-28 16:57:55 +09:00
Hiroshi SHIBATA
d766d5346b [rubygems/rubygems] Partly reverted
https://github.com/rubygems/rubygems/pull/6541

https://github.com/rubygems/rubygems/commit/21e07a04a1
2023-03-28 07:26:46 +00:00
Hiroshi SHIBATA
80be2e6c9a
Use URI-0.12.1 2023-03-28 15:27:58 +09:00
Josef Šimánek
1cbb501127
Onboard Rubocop Naming/MemoizedInstanceVariableName rule to RubyGems. 2023-03-28 15:27:35 +09:00
dependabot[bot]
2322b189b6 [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.68 to 0.9.70.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.68...v0.9.70)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-28 15:25:46 +09:00
Hiroshi SHIBATA
cd4b4ac737 [rubygems/rubygems] Use double-quotes instead of single-quotes in warnings
https://github.com/rubygems/rubygems/commit/c7f1cb9941
2023-03-28 15:25:45 +09:00
Josef Šimánek
9cfd8330ca [rubygems/rubygems] Onboard Rubocop Naming/MemoizedInstanceVariableName rule to Bundler.
https://github.com/rubygems/rubygems/commit/d768be0c65
2023-03-28 15:25:44 +09:00
David Rodríguez
4d4743f7e3 [rubygems/rubygems] Fix installing plugins in frozen mode
Plugins don't use a lockfile, so ignore frozen related settings.

https://github.com/rubygems/rubygems/commit/f17a3bb81f
2023-03-28 15:25:42 +09:00
David Rodríguez
674c960513 [rubygems/rubygems] Fix incorrect removal of "ruby" platform from lockfile
When dependencies have changed, we'll be re-resolving, and we can't
really know whether the resolution will be valid or invalid for the Ruby
platform, so skip the removal in that case.

The fix worked, but made some other specs fail, and surfaced that the
`@dependencies_changed` attribute was actually being incorrect set when
explicitly unlocking. Fixed that with an early return.

https://github.com/rubygems/rubygems/commit/20d8f5e5d9
2023-03-28 15:25:42 +09:00
David Rodríguez
ed868f9a71 [rubygems/rubygems] Fix unnecessary downgrade of top level dependency when unlocking
Bundler is very conservative by default, trying to preserve versions
from the lockfile as possible, and never downgrading them. However, when
it runs into a resolution error, it still tries to find a valid
resolution.

This fallback behavior was too "brute-force" though, completely
unrestricting any gem found in the resolution conflict, and that could
lead to direct dependencies being downgraded in some edge cases.

Instead, unlock things a bit more carefully:

* First try unlocking fully pinned indirect dependencies, but leave a
  lower bound requirement in place to prevent downgrades.
* Then try unlocking any fully pinned dependency, also leaving a lower
  bound requirement in place.
* Finally completely unrestrict dependencies if nothing else worked.

https://github.com/rubygems/rubygems/commit/7f55ed8302
2023-03-28 15:25:41 +09:00
David Rodríguez
eaddd386ec [rubygems/rubygems] Also set min locked requirements when not unlocking
https://github.com/rubygems/rubygems/commit/3561ac23d6
2023-03-28 15:25:40 +09:00
Masataka Pocke Kuwabara
298cb57c11
Update rbs's commit hash to avoid test failure on pathname (#7596) 2023-03-28 14:01:07 +09:00
Takashi Kokubun
7600e6bc19 RJIT: Optimize definedivar using shapes 2023-03-27 21:56:39 -07:00