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

16763 Коммитов

Автор SHA1 Сообщение Дата
dependabot[bot] 65e276096f [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.70 to 0.9.71.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.70...v0.9.71)

---
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-04-11 00:54:20 +00:00
Nobuyoshi Nakada c30cab8ce4
[Bug #19570] Propagate message encoding to decorated message 2023-04-10 15:13:26 +09:00
Kasumi Hanazuki 957595f218 [ruby/resolv] Do not compress domain name in SRV RDATA
[RFC2782] prohibits use of name compression for the target host name
in the RDATA of a SRV record.

[RFC2782]: https://datatracker.ietf.org/doc/rfc2782/

Closes: https://github.com/ruby/resolv/issues/29

https://github.com/ruby/resolv/commit/ac85724e17
2023-04-08 14:16:59 +00:00
Nobuyoshi Nakada ac8a16237c
[Bug #19563] Yield words separators per lines
So that newlines across a here-doc terminator will be separated
tokens.

Cf. https://github.com/ruby/irb/pull/558
2023-04-07 23:13:56 +09:00
tomoya ishida f8115ec727 [ruby/irb] Fix RubyLex's heredoc_with_hembexpr test to avoid ripper
tokenizing issue
(https://github.com/ruby/irb/pull/558)

https://github.com/ruby/irb/commit/f68e891ed1
2023-04-07 11:03:28 +00:00
Hiroshi SHIBATA 250e97c0fb [rubygems/rubygems] util/rubocop -A --only Style/FormatString
https://github.com/rubygems/rubygems/commit/132a56569d
2023-04-07 05:13:05 +00:00
Hiroshi SHIBATA fb822076d7 [rubygems/rubygems] util/rubocop -A --only Style/LineEndConcatenation
https://github.com/rubygems/rubygems/commit/67ece7b8b6
2023-04-06 23:33:20 +00:00
Peter Zhu bffadcd6d4 Add guard to compaction test in WeakMap
Some platforms don't support compaction, so we should skip this test.
2023-04-06 13:35:25 -04:00
Marc-Andre Lafortune 061f5f4374 Add missing test for Data.initialize 2023-04-06 09:24:38 +03:00
Vít Ondruch b5f2432917
[rubygems/rubygems] Use TestCase#util_spec instead of custom code.
https://github.com/rubygems/rubygems/commit/74d485ff1e
2023-04-06 13:07:16 +09:00
Stan Lo 2f8e5c80e6 [ruby/irb] Drop Ruby 2.6 support
(https://github.com/ruby/irb/pull/555)

* Remove all Ruby 2.6 support

* Drop Ruby 2.6 specific testing conditions

* Only run Ruby 2.7+ on CI

* Bump Ruby requirement to 2.7+

https://github.com/ruby/irb/commit/3f714b616c
2023-04-05 21:40:40 +00:00
Hiroshi SHIBATA e003784fc8 [rubygems/rubygems] util/rubocop -A --only Style/RegexpLiteral
https://github.com/rubygems/rubygems/commit/9264d83421
2023-04-05 09:50:29 +00:00
Hiroshi SHIBATA 9a5d4cc80b [rubygems/rubygems] Removed unused Gem::Deprecate from Gem::TestCase
https://github.com/rubygems/rubygems/commit/d8a75a5f84
2023-04-05 05:49:26 +00:00
Hiroshi SHIBATA 8e37eb1d15 [rubygems/rubygems] Extract class method used by self.method
https://github.com/rubygems/rubygems/commit/d900453ca2
2023-04-05 05:49:26 +00:00
Hiroshi SHIBATA 7f9a5a7562 [rubygems/rubygems] We don't use process_based_port and self.process_based_port
https://github.com/rubygems/rubygems/commit/f1a20c4c69
2023-04-05 05:49:26 +00:00
Hiroshi SHIBATA 6d0caac425 [rubygems/rubygems] We don't use self.make_command
https://github.com/rubygems/rubygems/commit/241f376c32
2023-04-05 05:49:25 +00:00
Hiroshi SHIBATA a464951fc7 [rubygems/rubygems] Unify win_platform? to Gem.win_platform?
https://github.com/rubygems/rubygems/commit/b18a4ef076
2023-04-05 05:49:25 +00:00
Hiroshi SHIBATA cbeea5f3e6 [rubygems/rubygems] Unify java_platform? to Gem.java_platform?
https://github.com/rubygems/rubygems/commit/7f27ab32b8
2023-04-05 05:49:24 +00:00
Hiroshi SHIBATA bf8afe434f [rubygems/rubygems] Removed self.mingw_windows?, It's not used rubygems
https://github.com/rubygems/rubygems/commit/ba3c985701
2023-04-05 05:49:24 +00:00
lukeg 28d6c6d69b [rubygems/rubygems] add some test suites under the Gem namespace, so as not to collide
To avoid collisions especially in ruby/ruby

https://github.com/rubygems/rubygems/commit/e6b2359975
2023-04-05 14:38:20 +09:00
Étienne Barrié 52ff2ce9da
Use `em_delete` in `key_delete` (#504)
* Test existing behavior

Typing Ctrl-D ends editing but typing <Del> does not.

Also renamed a test that is not testing ed_delete_next_char but
key_delete.

* Check if line empty first in em_delete

By distributivity of AND over OR, we can factor out this condition. This
will make the next commit simpler.

* Use em_delete in key_delete

When the editing mode is emacs, use `em_delete` in `key_delete`. We need
to add a condition though to `em_delete`, because it implements both
`delete-char` and `end-of-file`. We only want the `end-of-file` behavior
is the key is really Ctrl-D.

This matches the behavior of the <Del> key with readline, i.e. deleting
the next character if there is one, but not moving the cursor, while not
finishing the editing if there are no characters.
2023-04-05 08:59:12 +09:00
Peter Zhu 1da2e7fca3
[Feature #19579] Remove !USE_RVARGC code (#7655)
Remove !USE_RVARGC code

[Feature #19579]

The Variable Width Allocation feature was turned on by default in Ruby
3.2. Since then, we haven't received bug reports or backports to the
non-Variable Width Allocation code paths, so we assume that nobody is
using it. We also don't plan on maintaining the non-Variable Width
Allocation code, so we are going to remove it.
2023-04-04 17:30:06 -04:00
Aaron Patterson 8525603c72
Revert "Fix transient heap mode"
This reverts commit 87253d047c.

Revert "Implement `Process.warmup`"

This reverts commit ba6ccd8714.
2023-04-04 12:59:14 -07:00
Jean Boussier ba6ccd8714 Implement `Process.warmup`
[Feature #18885]

For now, the optimizations performed are:

  - Run a major GC
  - Compact the heap
  - Promote all surviving objects to oldgen

Other optimizations may follow.
2023-04-04 19:49:08 +02:00
Peter Zhu a84c99468f Fix crash in Time on 32-bit systems
[Bug #19575]

struct vtm is packed causing it to have a size that is not aligned on
32-bit systems. When allocating it on the stack, it will have unaligned
addresses which means that the fields won't be marked by the GC when
scanning the stack (since the GC only marks aligned addresses). This can
cause crashes when the fields are heap allocated objects like Bignums.

This commit moves the flags in struct time_object into struct vtm for
space efficiency and removes the need for packing.

This is an example of a crash:

    ruby(rb_print_backtrace+0xd) [0x56848945] ../src/vm_dump.c:785
    ruby(rb_vm_bugreport) ../src/vm_dump.c:1101
    ruby(rb_assert_failure+0x7a) [0x56671857] ../src/error.c:878
    ruby(vm_search_cc+0x0) [0x56666e47] ../src/vm_method.c:1366
    ruby(rb_vm_search_method_slowpath) ../src/vm_insnhelper.c:2090
    ruby(callable_method_entry+0x5) [0x568232d3] ../src/vm_method.c:1406
    ruby(rb_callable_method_entry) ../src/vm_method.c:1413
    ruby(gccct_method_search_slowpath) ../src/vm_eval.c:427
    ruby(gccct_method_search+0x20f) [0x568237ef] ../src/vm_eval.c:476
    ruby(opt_equality_by_mid_slowpath+0x2c) [0x5682388c] ../src/vm_insnhelper.c:2338
    ruby(rb_equal+0x37) [0x566fe577] ../src/object.c:133
    ruby(rb_big_eq+0x34) [0x56876ee4] ../src/bignum.c:5554
    ruby(rb_int_equal+0x14) [0x566f3ed4] ../src/numeric.c:4640
    ruby(rb_int_equal) ../src/numeric.c:4634
    ruby(vm_call0_cfunc_with_frame+0x6d) [0x568303c2] ../src/vm_eval.c:148
    ruby(vm_call0_cfunc) ../src/vm_eval.c:162
    ruby(vm_call0_body) ../src/vm_eval.c:208
    ruby(rb_funcallv_scope+0xd1) [0x56833971] ../src/vm_eval.c:85
    ruby(RB_TEST+0x0) [0x567e8488] ../src/time.c:78
    ruby(eq) ../src/time.c:78
    ruby(small_vtm_sub) ../src/time.c:1523
    ruby(timelocalw+0x23b) [0x567f3e9b] ../src/time.c:1593
    ruby(time_s_alloc+0x0) [0x567f536b] ../src/time.c:3698
    ruby(time_new_timew) ../src/time.c:2694
    ruby(time_s_mktime) ../src/time.c:3698
2023-04-04 11:12:07 -04:00
Hiroshi SHIBATA 06da0d1456 [rubygems/rubygems] util/rubocop -A
https://github.com/rubygems/rubygems/commit/8c9ea5d180
2023-04-04 12:20:43 +00:00
Hiroshi SHIBATA a881b33818 [rubygems/rubygems] util/rubocop -A --only Performance/RegexpMatch
https://github.com/rubygems/rubygems/commit/52ae4452c2
2023-04-04 12:20:43 +00:00
Hiroshi SHIBATA a78e0ca968 [rubygems/rubygems] Don't copy and paste methods in helper methods
https://github.com/rubygems/rubygems/commit/b87ac64343
2023-04-04 12:13:13 +00:00
Hiroshi SHIBATA 822f01b36c [rubygems/rubygems] Disabled to test rustc with msys2 platform.
https://github.com/rubygems/rubygems/actions/runs/4598776839/jobs/8123290246

https://github.com/rubygems/rubygems/commit/5c3b0a112e
2023-04-04 06:08:04 +00:00
Takashi Kokubun ba4ff2552e Avoid failing test_enable on warnings
This fails on RubyCI due to RJIT warnings too often. It should be enough
to test RJIT feature in test_rjit_version. We only want warnings instead
of test failures when there are warnings, at least for this case.
2023-04-03 08:59:05 -07:00
Stan Lo cd94bcdc46 [ruby/irb] Don't check RUBY_ENGINE when deciding whether to accept kargs
Ruby implementations like JRuby and TruffleRuby already indicate their
compatibility target with RUBY_VERSION. We don't need to exclude
them from accepting keyword arguments as long as they target 2.7+.

https://github.com/ruby/irb/commit/bf20faa4e6

Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
2023-04-02 15:34:28 +00:00
Kazuki Tsujimoto 4ac8d11724
`*` in an array pattern should not be parsed as nil in ripper
After 6c0925ba70, it was impossible
to distinguish between the presence or absence of `*`.

    # Before the commit
    Ripper.sexp('0 in []')[1][0][2][1]  #=> [:aryptn, nil, nil, nil, nil]
    Ripper.sexp('0 in [*]')[1][0][2][1] #=> [:aryptn, nil, nil, [:var_field, nil], nil]

    # After the commit
    Ripper.sexp('0 in []')[1][0][2][1]  #=> [:aryptn, nil, nil, nil, nil]
    Ripper.sexp('0 in [*]')[1][0][2][1] #=> [:aryptn, nil, nil, nil, nil]

This commit reverts it.
2023-04-01 16:35:24 +09:00
Stan Lo 23892d95f5 [ruby/irb] Drop unnecessary pends for truffleruby
https://github.com/ruby/irb/commit/2517039812
2023-03-31 22:02:58 +00:00
Nobuyoshi Nakada 5116e8bdf8 [ruby/rdoc] Read generated files in binary mode
So that fixes crash with "invalid byte sequence in US-ASCII" on
ci.rvm.jp and some RubyCIs.

https://github.com/ruby/rdoc/commit/4b416644f0
2023-03-31 01:14:34 +00:00
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 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
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
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
Nobuyoshi Nakada 040fab3782 Ripper: Add keyword options to `assert_parse_files` 2023-03-28 17:14:34 +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
Nobuyoshi Nakada 9c687c65ee [ruby/uri] Test for quadratic backtracking on invalid URI
https://hackerone.com/reports/1444501

https://github.com/ruby/uri/commit/54abaa739b
2023-03-28 02:12:21 +00:00
tomoya ishida 8f569d41cb [ruby/reline] Fix cursor position overrun
(https://github.com/ruby/reline/pull/515)

* Fix cursor position overrun

* Remove unnecessary local variable

Co-authored-by: Stan Lo <stan001212@gmail.com>

---------

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

Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-03-27 13:57:16 +00:00
Hiroshi SHIBATA cc8a48a496
Revert an accidentally sync.
Revert "[ruby/open3] Removed to load jit_support.rb"

  This reverts commit 67feb782f9.
2023-03-27 12:28:11 +09:00
Hiroshi SHIBATA 67feb782f9 [ruby/open3] Removed to load jit_support.rb
It's removed at https://github.com/ruby/open3/commit/4445b9e2a2dd

https://github.com/ruby/open3/commit/41b180deab
2023-03-27 03:24:48 +00:00