-*- coding: utf-8 -*-

commit 0fb782ee38ea37fd5fe8b1f775f8ad866a82a3f0
  Author:     Nobuyoshi Nakada <nobu@ruby-lang.org>
  AuthorDate: 2021-04-05 21:20:51 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-04-05 21:33:42 +0900

    Get rid of multibyte prefix to tmpdir

commit 6cdc36a60d7fbf4b218785087b1c3a91682bc147
  Author:     Hiroshi SHIBATA <hsbt@ruby-lang.org>
  AuthorDate: 2021-04-05 21:06:23 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-04-05 21:33:12 +0900

    [ruby/tmpdir] Bump version to 0.1.2

    https://github.com/ruby/tmpdir/commit/c79bc7adf6

commit b609bf0a17e166a7092fa6d2ff291ed9a26e2510
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-04-05 20:56:45 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-04-05 20:56:45 +0900

    teenyup

commit f81a8ced59251593ea5c1bd1e0692bdc67f6efeb
  Author:     git <svn-admin@ruby-lang.org>
  AuthorDate: 2021-04-05 20:49:27 +0900
  Commit:     git <svn-admin@ruby-lang.org>
  CommitDate: 2021-04-05 20:49:27 +0900

    * 2021-04-05 [ci skip]

commit 69e6e07a314aa4b2b3c334163dbfb494f369ec54
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-04-05 20:08:23 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-04-05 20:08:23 +0900

    Update REXML to 3.2.5

commit 3b97a6496f35efbc6aef9aef2bd1fe87e6b5d158
  Author:     Nobuyoshi Nakada <nobu@ruby-lang.org>
  AuthorDate: 2021-04-01 01:17:45 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-04-05 20:06:22 +0900

    Make usable chars more strict

    Remove other than alphanumeric and some punctuations considered
    filesystem-safe, instead of removing some unsafe chars only.

    https://hackerone.com/reports/1131465

commit 0d8c9a7fe77d8e49b9ca0c5d59754eca36a97958
  Author:     git <svn-admin@ruby-lang.org>
  AuthorDate: 2021-04-03 18:27:05 +0900
  Commit:     git <svn-admin@ruby-lang.org>
  CommitDate: 2021-04-03 18:27:05 +0900

    * 2021-04-03 [ci skip]

commit cafa7904e7233d1a4b8ae7e738f6bd35ed67d642
  Author:     aycabta <aycabta@gmail.com>
  AuthorDate: 2021-04-03 18:26:46 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2021-04-03 18:26:46 +0900

    Backport lib/reline, and lib/irb for 3.0.1 4th (#4349)

    * [ruby/irb] Update help message for next context-mode of 4

    While here, fixing tab/space issues in help message, and sync
    rdoc for IRB class to match the help message.

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

    * [ruby/irb] Do not continue line if last expression is an endless range

    Fixes [Bug #14824]

    https://github.com/ruby/irb/commit/63414f8465

    * [ruby/irb] Add a test for not continuing when endless range at eol

    https://github.com/ruby/irb/commit/1020ac9c65

    * [ruby/irb] Make save-history extension safe for concurrent use

    This makes the save-history extension check for modifications to
    the history file before saving it.  If the history file was modified
    after the history was loaded and before it was saved, append only
    the new history lines to the history file.

    This can result in more lines in the history file than SAVE_HISTORY
    allows.  However, that will be fixed the next time irb is run and
    the history is saved.

    Fixes [Bug #13654]

    https://github.com/ruby/irb/commit/041ef53845

    * Fix errors when XDG_CONFIG_HOME points to non-writable directory

    `$HOME/.config` is not writable on CI
    because I think tests should not corrupt user's data.

    And GitHub Actions CI sets `XDG_CONFIG_HOME`
    since `Version: 20210309.1`.

    https://github.com/ruby/actions/runs/2130811016?check_suite_focus=true#step:16:301
    ```
    Errno::EACCES: Permission denied @ dir_s_mkdir - /home/runner/.config/irb
    ```

    * Try to fix errors in TestIRB::TestHistory too

    https://github.com/ruby/actions/runs/2137935523?check_suite_focus=true#step:9:562
    ```
      1) Error:
    TestIRB::TestHistory#test_history_concurrent_use:
    Errno::EACCES: Permission denied @ dir_s_mkdir - /home/runner/.config/irb
        /home/runner/work/actions/actions/ruby/lib/fileutils.rb:253:in `mkdir'
        /home/runner/work/actions/actions/ruby/lib/fileutils.rb:253:in `fu_mkdir'
        /home/runner/work/actions/actions/ruby/lib/fileutils.rb:231:in `block (2 levels) in mkdir_p'
        /home/runner/work/actions/actions/ruby/lib/fileutils.rb:229:in `reverse_each'
        /home/runner/work/actions/actions/ruby/lib/fileutils.rb:229:in `block in mkdir_p'
        /home/runner/work/actions/actions/ruby/lib/fileutils.rb:211:in `each'
        /home/runner/work/actions/actions/ruby/lib/fileutils.rb:211:in `mkdir_p'
        /home/runner/work/actions/actions/ruby/lib/irb/init.rb:355:in `rc_file_generators'
        /home/runner/work/actions/actions/ruby/lib/irb/init.rb:330:in `rc_file'
        /home/runner/work/actions/actions/ruby/test/irb/test_history.rb:170:in `block in assert_history'
        /home/runner/work/actions/actions/ruby/lib/tmpdir.rb:96:in `mktmpdir'
        /home/runner/work/actions/actions/ruby/test/irb/test_history.rb:168:in `assert_history'
        /home/runner/work/actions/actions/ruby/test/irb/test_history.rb:133:in `test_history_concurrent_use'
    ```

    * [ruby/irb] Define "measure" command without forced override

    https://github.com/ruby/irb/commit/9587ba13b5

    * [ruby/irb] Add all lib files automatically

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

    * [ruby/irb] Don't call Ruby 2.4+'s String#pretty_print

    https://github.com/ruby/irb/commit/89bcf107be

    * [ruby/irb] Implement ls command

    https://github.com/ruby/irb/commit/19b6c20604

    * [ruby/irb] Add whereami command

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

    * [ruby/irb] Fix column overflow on ls output

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

    * [ruby/irb] Fix step's argument

    cols.size was calling Integer#size, which returns 8.

    Fixing a bug of https://github.com/ruby/irb/pull/209

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

    * [ruby/irb] Deal with different screen sizes

    e.g. http://rubyci.s3.amazonaws.com/centos8/ruby-master/log/20210321T063003Z.fail.html.gz

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

    * [ruby/irb] Have some right padding

    instead of filling out an entire line

    https://github.com/ruby/irb/commit/6ac8f45f5f

    * Suppress verbose messages

    Get rid of warnings in the parallel test.

    ```
    unknown command: "Switch to inspect mode."
    ```

    * [ruby/irb] Change ripper_lex_without_warning to a class method

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

    * [ruby/irb] Complete require and require_relative

    https://github.com/ruby/irb/commit/1c61178b4c

    * [ruby/reline] Add Reline.ungetc to control buffer

    https://github.com/ruby/reline/commit/43ac03c624

    * [ruby/reline] Reline.delete_text removes the current line in multiline

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

    * [ruby/reline] Support preposing and postposing for Reline.completion_proc

    https://github.com/ruby/reline/commit/1f469de90c

    * [ruby/reline] Suppress crashing when completer_{quote,word_break}_characters is empty

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

    * [ruby/irb] fix completion test when out-of-place build

    * [ruby/irb] Cache completion files to require

    https://github.com/ruby/irb/commit/612ebcb311

    * [ruby/irb] Always add input method when calling Irb.new in tests

    When passes input method as nil to Context.new through Irb.new,
    ReidlineInputMethod.new is executed and the global internal state of Reline is
    rewritten, therefore other tests are failed in the Ruby repository. This
    commit changes to use TestInputMethod.

    https://github.com/ruby/irb/commit/010dce9210

    * [ruby/irb] Prevent the completion from crashing if rdoc is missing

    There are cases where ruby is installed without rdoc and e.g.
    lib/irb/cmd/help.rb also handles the LoadError

    Here is how to replicate the issue:

    ```
    $ docker run -it alpine:3.13.3 sh

    / # apk add ruby ruby-irb ruby-io-console

    / # irb

    irb(main):001:0> Class[TAB][TAB]
    ```

    And you end up with something like:

    ```
    irb(main):001:0> ClassTraceback (most recent call last):
            34: from /usr/bin/irb:23:in `<main>'
            33: from /usr/bin/irb:23:in `load'
            32: from /usr/lib/ruby/gems/2.7.0/gems/irb-1.2.6/exe/irb:11:in `<top (required)>'
            31: from /usr/lib/ruby/2.7.0/irb.rb:400:in `start'
            30: from /usr/lib/ruby/2.7.0/irb.rb:471:in `run'
            29: from /usr/lib/ruby/2.7.0/irb.rb:471:in `catch'
            28: from /usr/lib/ruby/2.7.0/irb.rb:472:in `block in run'
            27: from /usr/lib/ruby/2.7.0/irb.rb:537:in `eval_input'
            26: from /usr/lib/ruby/2.7.0/irb/ruby-lex.rb:150:in `each_top_level_statement'
            25: from /usr/lib/ruby/2.7.0/irb/ruby-lex.rb:150:in `catch'
            24: from /usr/lib/ruby/2.7.0/irb/ruby-lex.rb:151:in `block in each_top_level_statement'
            23: from /usr/lib/ruby/2.7.0/irb/ruby-lex.rb:151:in `loop'
            22: from /usr/lib/ruby/2.7.0/irb/ruby-lex.rb:154:in `block (2 levels) in each_top_level_statement'
            21: from /usr/lib/ruby/2.7.0/irb/ruby-lex.rb:182:in `lex'
            20: from /usr/lib/ruby/2.7.0/irb.rb:518:in `block in eval_input'
            19: from /usr/lib/ruby/2.7.0/irb.rb:704:in `signal_status'
            18: from /usr/lib/ruby/2.7.0/irb.rb:519:in `block (2 levels) in eval_input'
            17: from /usr/lib/ruby/2.7.0/irb/input-method.rb:294:in `gets'
            16: from /usr/lib/ruby/2.7.0/forwardable.rb:235:in `readmultiline'
            15: from /usr/lib/ruby/2.7.0/forwardable.rb:235:in `readmultiline'
            14: from /usr/lib/ruby/2.7.0/reline.rb:175:in `readmultiline'
            13: from /usr/lib/ruby/2.7.0/reline.rb:238:in `inner_readline'
            12: from /usr/lib/ruby/2.7.0/reline.rb:238:in `loop'
            11: from /usr/lib/ruby/2.7.0/reline.rb:239:in `block in inner_readline'
            10: from /usr/lib/ruby/2.7.0/reline.rb:270:in `read_io'
             9: from /usr/lib/ruby/2.7.0/reline.rb:270:in `loop'
             8: from /usr/lib/ruby/2.7.0/reline.rb:311:in `block in read_io'
             7: from /usr/lib/ruby/2.7.0/reline.rb:240:in `block (2 levels) in inner_readline'
             6: from /usr/lib/ruby/2.7.0/reline.rb:240:in `each'
             5: from /usr/lib/ruby/2.7.0/reline.rb:241:in `block (3 levels) in inner_readline'
             4: from /usr/lib/ruby/2.7.0/reline/line_editor.rb:820:in `input_key'
             3: from /usr/lib/ruby/2.7.0/reline/line_editor.rb:608:in `complete'
             2: from /usr/lib/ruby/2.7.0/irb/completion.rb:269:in `block in <module:InputCompletor>'
             1: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- rdoc (LoadError)
    ```

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

    * [ruby/irb] Suppress verbose messages in the parallel test

    `:VERBOSE` flag needs to be set prior to `IRB::Irb.new`.

    https://github.com/ruby/irb/commit/78604682d9

    * [ruby/irb] SIGINT should raise Interrupt after IRB session

    https://github.com/ruby/irb/commit/5832cfe75b

    * [ruby/irb] Colorize `__END__` as keyword

    https://github.com/ruby/irb/commit/9b84018311

    * [ruby/irb] Add show_source command

    https://github.com/ruby/irb/commit/108cb04352

    * [ruby/reline] Reset @rest_height when clear screen

    https://github.com/ruby/reline/commit/3a7019b0d5

    * [ruby/irb] process multi-line pastes as a single entity

    this allows pasting leading-dot chained methods correctly:

    ```ruby
    class A
      def a; self; end
      def b; true; end
    end

    a = A.new

    a
     .a
     .b
    ```

    will properly return `true` instead of erroring on the `.a` line:

    ```
    irb(main):001:1*     class A
    irb(main):002:1*       def a; self; end
    irb(main):003:0>     end
    irb(main):004:0*
    irb(main):005:0>     a = A.new
    irb(main):006:0*
    irb(main):007:0>     a
    irb(main):008:0>      .a
    irb(main):009:0>      .a
    => #<A:0x00007f984211fbe8>
    ```

    https://github.com/ruby/irb/commit/45aeb52575

    * [ruby/irb] Add yamatanooroti test example

    https://github.com/ruby/irb/commit/279155fcee

    * [ruby/irb] Add test for multiline paste

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

    * [ruby/irb] Evaluate each toplevel statement

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

    * [ruby/irb] Version 1.3.5

    https://github.com/ruby/irb/commit/22e2ddf715

    * [ruby/reline] Version 0.2.5

    https://github.com/ruby/reline/commit/22ce5651e5

    Co-authored-by: Jeremy Evans <code@jeremyevans.net>
    Co-authored-by: Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
    Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
    Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
    Co-authored-by: Aleksandar Ivanov <aivanov92@gmail.com>
    Co-authored-by: Koichi Sasada <ko1@atdot.net>
    Co-authored-by: Cody Cutrer <cody@instructure.com>

commit 6abb8ee711a941b7ad31d21fdb429750f7ea4463
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-04-02 16:09:09 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-04-02 16:09:09 +0900

    merge revision(s) 0a544c0c35f7445d69402d7c53d825384c728017: [Backport #17754]

            Fix segmentation fault when `Module#name` returns non string value
             [Bug #17754]

            * Add test for NoMethodError#to_s does not segfault

            * Ensure no segfault even if Module#name is overridden
            ---
             error.c                          |  4 +++-
             test/ruby/test_nomethod_error.rb | 16 ++++++++++++++++
             2 files changed, 19 insertions(+), 1 deletion(-)

commit 0315e1e5ca0722f9dffeae70b860c19de303e339
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-04-02 16:08:30 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-04-02 16:08:30 +0900

    merge revision(s) f9f13a4f6d8be706b17efc089c28f7bc617ef549: [Backport #17746]

            Ensure that caller respects the start argument

            Previously, if there were ignored frames (iseq without pc), we could
            go beyond the requested start frame.  This has two changes:

            1) Ensure that we don't look beyond the start frame by using
            last_cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(last_cfp) until the
            desired start frame is reached.

            2) To fix the failures caused by change 1), which occur when a
            limited number of frames is requested, scan the VM stack before
            allocating backtrace frames, looking for ignored frames. This
            is complicated if there are ignored frames before and after
            the start, in which case we need to scan until the start frame,
            and then scan backwards, decrementing the start value until we
            get to the point where start will result in the number of
            requested frames.

            This fixes a Rails test failure.  Jean Boussier was able to
            to produce a failing test case outside of Rails.

            Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
            ---
             test/ruby/test_backtrace.rb | 16 ++++++++++++++
             vm_backtrace.c              | 52 +++++++++++++++++++++++++++++++++++++++++++--
             2 files changed, 66 insertions(+), 2 deletions(-)

commit 4e2738f477b5343a0d48a400c975220fed123c9b
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-04-02 16:06:31 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-04-02 16:06:31 +0900

    merge revision(s) 7e8a9af9db42a21f6a1125a29e98c45ff9d5833b: [Backport #17732]

            rb_enc_interned_str: handle autoloaded encodings

            If called with an autoloaded encoding that was not yet
            initialized, `rb_enc_interned_str` would crash with
            a NULL pointer exception.

            See: https://github.com/ruby/ruby/pull/4119#issuecomment-800189841
            ---
             encoding.c                        | 28 ++++++++++++----------------
             ext/-test-/string/depend          |  3 +++
             ext/-test-/string/fstring.c       | 15 +++++++++++++++
             internal/encoding.h               |  3 +++
             string.c                          |  4 ++++
             test/-ext-/string/test_fstring.rb | 16 ++++++++++++++++
             6 files changed, 53 insertions(+), 16 deletions(-)

commit 855401da495117fcf5d258fe43b71010abc43d9a
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-04-02 12:31:08 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-04-02 12:31:08 +0900

    merge revision(s) a85ed626f18d1014d09fb37eb0a703976c3d2b53: [Backport #17731]

            Fix Enumerable#inject with high negative fixnums [Bug #17731]

            ---
             enum.c                 | 2 +-
             test/ruby/test_enum.rb | 2 ++
             2 files changed, 3 insertions(+), 1 deletion(-)

commit 1a47de64f44da6d4339ba8b2c5220eeaba82954c
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-04-02 12:27:26 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-04-02 12:27:26 +0900

    merge revision(s) f748b911c9157a0bb86f38280ddfba72a55049b6: [Backport #17729]

            Fix infinite loop at illegal sequence [Bug #17729]

            As mblen returns -1 on failure, skip the first byte and try the
            succeeding bytes in that case.

            Close https://github.com/ruby/ruby/pull/4281
            ---
             eval_intern.h                 | 11 ++++++++++-
             test/ruby/test_rubyoptions.rb |  5 +++++
             2 files changed, 15 insertions(+), 1 deletion(-)

commit d1cec0bca588266b9af1d55e592016c45ee68fbb
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-04-02 12:26:56 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-04-02 12:26:56 +0900

    merge revision(s) 58660e943488778563b9e41005a601e9660ce21f: [Backport #17519]

            Skip refined method when exporting methods with changed visibility

            Previously, attempting to change the visibility of a method in a
            singleton class for a class/module that is prepended to and refined
            would raise a NoMethodError.

            Fixes [Bug #17519]
            ---
             test/ruby/test_module.rb | 23 +++++++++++++++++++++++
             vm_method.c              | 14 +++++++++++---
             2 files changed, 34 insertions(+), 3 deletions(-)

commit d3779ab3b8c1cc2b47d8072ec0cf83b52ff9c97c
  Author:     git <svn-admin@ruby-lang.org>
  AuthorDate: 2021-03-24 04:52:36 +0900
  Commit:     git <svn-admin@ruby-lang.org>
  CommitDate: 2021-03-24 04:52:36 +0900

    * 2021-03-24 [ci skip]

commit 2efda212b0d9ad5ec265271db25ad51d796fde44
  Author:     Hiroshi SHIBATA <hsbt@ruby-lang.org>
  AuthorDate: 2021-03-24 04:52:19 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2021-03-24 04:52:19 +0900

    Merge RubyGems-3.2.15 and Bundler-2.2.15 (#4311)

commit ff2ea4daeb795ebb3d0afa8c57d86a4af9757e50
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-03-14 21:30:23 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-03-14 21:30:23 +0900

    merge revision(s) 2a6bfd22468343003463e0cbf91953a01b0dbba5,3ac28de5414c81a0da8c8ec969ea74db5a0f1b0f: [Backport #17645]

            Properly convert time_t [Bug #17645]

            ---
             thread_sync.c | 2 +-
             1 file changed, 1 insertion(+), 1 deletion(-)

            Explicitly cast __s64 to time_t [Bug #17645]

            A workaround of shorten-64-to-32 error where 32-bit linux.
            ---
             file.c | 2 +-
             1 file changed, 1 insertion(+), 1 deletion(-)

commit e050dd53230cb354e816415f8a937901f79ec395
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-03-13 17:56:17 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-03-13 17:56:17 +0900

    merge revision(s) f6d5de8f33fe715d939e3e77b8ef73d88bcd6c9f: [Backport #17659]

            [ruby/io-wait] Declare as Ractor-safe

            Fixes https://bugs.ruby-lang.org/issues/17659

            https://github.com/ruby/io-wait/commit/ba338b4764
            ---
             ext/io/wait/wait.c          |  4 ++++
             test/io/wait/test_ractor.rb | 22 ++++++++++++++++++++++
             2 files changed, 26 insertions(+)
             create mode 100644 test/io/wait/test_ractor.rb

commit b20e2c3f2a3ce227b9cf32d2bf02db0ac67eccb5
  Author:     Jeremy Evans <code@jeremyevans.net>
  AuthorDate: 2021-03-13 17:55:49 +0900
  Commit:     GitHub <noreply@github.com>
  CommitDate: 2021-03-13 17:55:49 +0900

    Backport io-console 0.5.7 to Ruby 3.0 (#4252)

    * [ruby/io-console] [DOC] Note that IO#getpass returns a chomped string

    IO#getpass uses String#chomp! on the read input line.

    https://github.com/ruby/io-console/commit/1e98c93bc8

    * [ruby/io-console] Ignore chomp! result and return the modified string

    https://github.com/ruby/io-console/commit/09e5ccc729

    * [ruby/io-console] Pre-define chomp! ID

    https://github.com/ruby/io-console/commit/028e1c9497

    * [ruby/io-console] Shrink struct query_args

    https://github.com/ruby/io-console/commit/720be0a3e5

    * [ruby/io-console] bump up to 0.5.7

    https://github.com/ruby/io-console/commit/f55d7ebff6

    Co-authored-by: Marcus Stollsteimer <sto.mar@web.de>
    Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>

commit 6f9e007729d53fdbc22e37e52129ea5aa2556d0e
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-03-13 05:12:54 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-03-13 05:12:54 +0900

    merge revision(s) b3c53a8a885be8f5cc2b712798b0d2741c488ce4: [Backport #17672]

            Make Ractor stdio belonging to the Ractor [Bug #17672]

            Defer making ractor stdio until ractor started.
            Before ractor started, created objects belong to the caller ractor
            instead of the created ractor.
            ---
             bootstraptest/test_ractor.rb | 12 ++++++++++++
             ractor.c                     |  9 ---------
             thread.c                     |  9 +++++++++
             3 files changed, 21 insertions(+), 9 deletions(-)

commit 6bf32cbed8f3fd0b73b99737d671f833c594d800
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-03-13 05:11:30 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-03-13 05:11:30 +0900

    merge revision(s) 63abb5c227e5c20d18d0debf699251da93ca64b5,34d02631e71209b12abb69d0114601027e485bc9,2adbf01ae14c0a4cf190b7c969b91726966a0e0f,3acc81d9e41b18380b9e0168fe2b5e5e0c727256: [Backport #17612]

            dtoa.c: make compilable independently

            Except for `-Dxmalloc=malloc -Dxfree=free`.
            ---
             missing/dtoa.c | 24 ++++++++++++++++++------
             1 file changed, 18 insertions(+), 6 deletions(-)

            dtoa.c: constified

            clang seems to locate never modified local data in the const
            segment implicitly.
            ---
             missing/dtoa.c | 2 +-
             1 file changed, 1 insertion(+), 1 deletion(-)

            dtoa.c: make thread-safe by using atomic CAS

            ---
             common.mk      |  2 ++
             missing/dtoa.c | 75 ++++++++++++++++++++++++++++++++++++++++++----------------
             util.c         |  1 +
             3 files changed, 57 insertions(+), 21 deletions(-)

            Fixed race in dtoa [Bug #17612]

            Fixed the race condition when replacing `freelist` entry with its
            chained next element.  At acquiring an entry, hold the entry once
            with the special value, then release by replacing it with the next
            element again after acquired.  If another thread is holding the
            same entry at that time, spinning until the entry gets released.

            Co-Authored-By: Koichi Sasada <ko1@atdot.net>
            ---
             bootstraptest/test_ractor.rb | 11 +++++++++++
             missing/dtoa.c               | 13 ++++++++++---
             2 files changed, 21 insertions(+), 3 deletions(-)

commit 7b122b8af86c155eb23e8cad463cdf2c0bfc1d77
  Author:     git <svn-admin@ruby-lang.org>
  AuthorDate: 2021-03-13 05:01:53 +0900
  Commit:     git <svn-admin@ruby-lang.org>
  CommitDate: 2021-03-13 05:01:53 +0900

    * 2021-03-13 [ci skip]

commit 72c6497453f74f3398130d99fc610922f3995ae5
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-03-12 00:32:56 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-03-12 00:32:56 +0900

    merge revision(s) 7b9476fbfab738d1eb01b4b4c4af9a1680513019: [Backport #17642]

            Ractor.allocate should not be allowed

            Ractor.allocate and Ractor#dup should not be allowed like Thread.
            [Bug #17642]
            ---
             bootstraptest/test_ractor.rb | 18 ++++++++++++++++++
             ractor.c                     |  2 ++
             2 files changed, 20 insertions(+)

commit 6305d1c6edeec2c3aa25b9220142274f1ef2e868
  Author:     Koichi Sasada <ko1@atdot.net>
  AuthorDate: 2021-01-06 13:06:25 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-03-11 20:36:52 +0900

    remove invalidated cc

    if cc is invalidated, cc should be released from iseq.

commit d3863cb2e80f27d26b521b2c957b21feacb900de
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-03-11 20:34:40 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-03-11 20:34:40 +0900

    merge revision(s) 07ab172ebef28bb82c2650694548d123802d6c22: [Backport #17636]

            sync check_rvalue_consistency_force()

            check_rvalue_consistency_force() uses is_pointer_to_heap() and
            it should be synchronized with other ractors.
            [Bug #17636]
            ---
             gc.c | 149 ++++++++++++++++++++++++++++++++++---------------------------------
             1 file changed, 76 insertions(+), 73 deletions(-)

commit de6072a22edbaab3793cf7f976cc9e0118d0df40
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-03-11 20:24:48 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-03-11 20:24:48 +0900

    merge revision(s) abdc634f64a440afcdc7f23c9757d27aab4db8a9,083c5f08ec4e95c9b75810d46f933928327a5ab3,1ecda213668644d656eb0d60654737482447dd92,813fe4c256f89babebb8ab53821ae5eb6bb138c6: [Backport #17497]

            remove unused decl

            ---
             internal/vm.h | 6 ------
             vm_args.c     | 2 --
             2 files changed, 8 deletions(-)

            Check stack overflow in recursive glob_helper [Bug #17162]

            ---
             dir.c         |  2 ++
             internal/vm.h |  1 +
             vm_eval.c     | 10 ++++++++++
             3 files changed, 13 insertions(+)

            global call-cache cache table for rb_funcall*

            rb_funcall* (rb_funcall(), rb_funcallv(), ...) functions invokes
            Ruby's method with given receiver. Ruby 2.7 introduced inline method
            cache with static memory area. However, Ruby 3.0 reimplemented the
            method cache data structures and the inline cache was removed.

            Without inline cache, rb_funcall* searched methods everytime.
            Most of cases per-Class Method Cache (pCMC) will be helped but
            pCMC requires VM-wide locking and it hurts performance on
            multi-Ractor execution, especially all Ractors calls methods
            with rb_funcall*.

            This patch introduced Global Call-Cache Cache Table (gccct) for
            rb_funcall*. Call-Cache was introduced from Ruby 3.0 to manage
            method cache entry atomically and gccct enables method-caching
            without VM-wide locking. This table solves the performance issue
            on multi-ractor execution.
            [Bug #17497]

            Ruby-level method invocation does not use gccct because it has
            inline-method-cache and the table size is limited. Basically
            rb_funcall* is not used frequently, so 1023 entries can be enough.
            We will revisit the table size if it is not enough.
            ---
             debug_counter.h |   3 +
             vm.c            |  12 +++
             vm_callinfo.h   |  12 ---
             vm_core.h       |   5 +
             vm_eval.c       | 288 ++++++++++++++++++++++++++++++++++++++++++--------------
             vm_insnhelper.c |  11 ++-
             vm_method.c     |  14 ++-
             7 files changed, 255 insertions(+), 90 deletions(-)

            opt_equality_by_mid for rb_equal_opt

            This patch improves the performance of sequential and parallel
            execution of rb_equal() (and rb_eql()).
            [Bug #17497]

            rb_equal_opt (and rb_eql_opt) does not have own cd and it waste
            a time to initialize cd. This patch introduces opt_equality_by_mid()
            to check equality without cd.

            Furthermore, current master uses "static" cd on rb_equal_opt
            (and rb_eql_opt) and it hurts CPU caches on multi-thread execution.
            Now they are gone so there are no bottleneck on parallel execution.
            ---
             vm_insnhelper.c | 99 ++++++++++++++++++++++++++++++++++++---------------------
             1 file changed, 63 insertions(+), 36 deletions(-)

commit 0074ea2d83230e10ab0cd769fff203c13d3c592f
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-03-11 20:06:14 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-03-11 20:06:14 +0900

    merge revision(s) 2a83650b0fd25719fb6c03bfec7bd895734d3ceb: [Backport #15852]

            Destroy VM-wise locks before freeing [Bug #15852]

            ---
             thread.c | 7 -------
             vm.c     | 2 ++
             2 files changed, 2 insertions(+), 7 deletions(-)

commit 05fa06a4ed419949e79e79ff088c19fb2ecb07b7
  Author:     git <svn-admin@ruby-lang.org>
  AuthorDate: 2021-03-11 17:25:10 +0900
  Commit:     git <svn-admin@ruby-lang.org>
  CommitDate: 2021-03-11 17:25:10 +0900

    * 2021-03-11 [ci skip]

commit 04ef602c28aa175d7e03e802aa7db750632251cf
  Author:     Aditya Prakash <aditya.prakash132@gmail.com>
  AuthorDate: 2021-03-06 12:11:50 +0900
  Commit:     NARUSE, Yui <nurse@users.noreply.github.com>
  CommitDate: 2021-03-11 17:24:52 +0900

    [rubygems/rubygems] Remote test to check require

    This test was triggering require of `rubygems/core_ext/tcpsocket_init`
    which overrides TCPSocket.initialize globally. Requires don't get
    reset between test runs and it was making other test unreliable.

    Fixes timeout of test on ruby master

    https://github.com/rubygems/rubygems/commit/fdfe5c9691

commit 0476ce0370c1ee56de690d43c15d5e8d7893dedd
  Author:     Hiroshi SHIBATA <hsbt@ruby-lang.org>
  AuthorDate: 2021-03-10 12:08:20 +0900
  Commit:     NARUSE, Yui <nurse@users.noreply.github.com>
  CommitDate: 2021-03-11 17:24:52 +0900

    Merge RubyGems-3.2.14 and Bundler-2.2.14

commit 7efc7afcae6720e1af7ab49986d789b6f9d6fe0a
  Author:     Hiroshi SHIBATA <hsbt@ruby-lang.org>
  AuthorDate: 2021-03-08 12:17:52 +0900
  Commit:     NARUSE, Yui <nurse@users.noreply.github.com>
  CommitDate: 2021-03-11 17:24:52 +0900

    Merge RubyGems-3.2.13 and Bundler-2.2.13

commit 06cd5711e0afc6302052e847863a7fdcc42fe692
  Author:     Hiroshi SHIBATA <hsbt@ruby-lang.org>
  AuthorDate: 2021-03-02 20:38:16 +0900
  Commit:     NARUSE, Yui <nurse@users.noreply.github.com>
  CommitDate: 2021-03-11 17:24:52 +0900

    Merge RubyGems-3.2.12 and Bundler-2.2.12

commit f375bc77d2f347dd2a44705b8abd29398feae427
  Author:     Hiroshi SHIBATA <hsbt@ruby-lang.org>
  AuthorDate: 2021-03-02 20:37:31 +0900
  Commit:     NARUSE, Yui <nurse@users.noreply.github.com>
  CommitDate: 2021-03-11 17:24:52 +0900

    Merge RubyGems-3.2.11 and Bundler-2.2.11

commit 38f8b8d070aaac02f1d048b5d9947b2e58401e2b
  Author:     Hiroshi SHIBATA <hsbt@ruby-lang.org>
  AuthorDate: 2021-03-02 20:36:40 +0900
  Commit:     NARUSE, Yui <nurse@users.noreply.github.com>
  CommitDate: 2021-03-11 17:24:52 +0900

    Merge RubyGems-3.2.10 and Bundler-2.2.10

commit 70e9489f9ea85ddaa68fb43398c14a3921cacb27
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-03-03 17:35:47 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-03-03 19:40:48 +0900

    merge revision(s) 0d89aedb734372bc35d8a569a992d13e86e7923e,a6f5f3cccda381ae332aaa6467f2644611371fb5,97cf290063ab940d08819cd96cbcca0ef6d50e4c: [Backport #17338]

            Assign TAG_NONE to ruby_tag_type instead of 0

            ---
             eval.c | 4 ++--
             1 file changed, 2 insertions(+), 2 deletions(-)

            Also `eclass` loop can raise in `rb_obj_is_kind_of`

            ---
             eval.c | 2 +-
             1 file changed, 1 insertion(+), 1 deletion(-)

            Copy va_list of exception classes

            The list is reused when an exception raised again after retrying
            in the rescue procedure.
            ---
             eval.c | 6 +++++-
             1 file changed, 5 insertions(+), 1 deletion(-)

commit db21768950323dbaa0bbd86186da6fd69ae65ce3
  Author:     git <svn-admin@ruby-lang.org>
  AuthorDate: 2021-03-03 17:32:16 +0900
  Commit:     git <svn-admin@ruby-lang.org>
  CommitDate: 2021-03-03 17:32:16 +0900

    * 2021-03-03 [ci skip]

commit b49264ab7aa92f64a806857d7e81b3f1cbba5585
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-03-02 22:00:45 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-03-02 22:00:45 +0900

    merge revision(s) 969b824a0c7605e0e570631d967ad0de0c37d0bf,100e464bee46ae71ef048ed85a9bdd012935a3f7: [Backport #17599]

            sync GC rest if needed

            marking requires a barrier (stop all Ractors) and gc_enter() does it.
            However, it doesn't check rest event which can start marking.
            [Bug #17599]
            ---
             gc.c | 3 +++
             1 file changed, 3 insertions(+)

            clear RVALUE on NEWOBJ event.

            NEWOBJ event is called without clearing RVALUE values (v1, v2, v3).
            This patch clear them before NEWOBJ tracepoint internal hook.
            [Bug #17599]
            ---
             gc.c | 27 +++++++++++++++------------
             1 file changed, 15 insertions(+), 12 deletions(-)

commit 4328f93f1bf08296115172a279e2d85a0ed80122
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-03-02 21:50:15 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-03-02 21:50:15 +0900

    merge revision(s) 87437326214e4587a41946c8937e11418d983acd: [Backport #17581]

            Fix backtrace to not skip frames with iseq without pc

            Previously, frames with iseq but no pc were skipped (even before
            the refactoring in 3b24b7914c16930bfadc89d6aff6326a51c54295).
            Because the entire backtrace was procesed before the refactoring,
            this was handled by using later frames instead.  However, after
            the refactoring, we need to handle those frames or they get
            lost.

            Keep two iteration counters when iterating, one for the desired
            backtrace size (so we generate the desired number of frames), and
            one for the actual backtrace size (so we don't process off the end
            of the stack).  When skipping over an iseq frame with no pc,
            decrement the counter for the desired backtrace, so it will
            continue to process the expected number of backtrace frames.

            Fixes [Bug #17581]
            ---
             test/ruby/test_backtrace.rb | 12 ++++++++++++
             vm_backtrace.c              | 16 +++++++++-------
             2 files changed, 21 insertions(+), 7 deletions(-)

commit 3e67bfe202d6b410375af990ac806f15cb2df762
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-03-02 18:29:05 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-03-02 18:29:05 +0900

    merge revision(s) b94b7965c420661ed621c146a4efaf43bc3cf50b: [Backport #17639]

            Fixed fallback ENABLE_VIRTUAL_TERMINAL_PROCESSING value [Bug #17639]

            ---
             ruby.c        | 2 +-
             win32/win32.c | 4 ++--
             2 files changed, 3 insertions(+), 3 deletions(-)

commit a6dec2e144d65011d49f272e494bf62daf3d7531
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-03-02 18:28:30 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-03-02 18:28:30 +0900

    merge revision(s) 5de38c41ae7bf17ae599fdfa9f8face87f16d8bb: [Backport #17644]

            ripper: fix a bug of Ripper::Lexer with syntax error and heredoc [Bug
             #17644]

            ---
             ext/ripper/lib/ripper/lexer.rb |  2 +-
             test/ripper/test_lexer.rb      | 12 ++++++++++++
             2 files changed, 13 insertions(+), 1 deletion(-)

commit 713d6d5eb05de06a0de25feef801ff8c72c65754
  Author:     NARUSE, Yui <naruse@airemix.jp>
  AuthorDate: 2021-03-02 18:27:43 +0900
  Commit:     NARUSE, Yui <naruse@airemix.jp>
  CommitDate: 2021-03-02 18:27:43 +0900

    merge revision(s) 265c0022390e3dcd4ff692fc77d29b94e652c877: [Backport #17653]

            Do not allocate ractor-local storage in dfree function during GC

            ---
             random.c | 3 ++-
