diff --git a/.cirrus.yml b/.cirrus.yml
index 01897e986ed25c..c8fb326c89eb8c 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -10,6 +10,7 @@ env:
task:
name: Arm64 Graviton2 / $CC
+ skip: "changesIncludeOnly('doc/**', '**.{md,rdoc}')"
arm_container:
# We use the arm64 images at http://ghcr.io/ruby/ruby-ci-image .
image: ghcr.io/ruby/ruby-ci-image:$CC
diff --git a/.github/workflows/baseruby.yml b/.github/workflows/baseruby.yml
index 8a071c63779fb9..24b867c7fc0bb6 100644
--- a/.github/workflows/baseruby.yml
+++ b/.github/workflows/baseruby.yml
@@ -13,8 +13,8 @@ on:
- '**.rdoc'
concurrency:
- group: ${{ github.workflow }} / ${{ github.ref_name }}
- cancel-in-progress: true
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
jobs:
baseruby:
@@ -33,6 +33,10 @@ jobs:
steps:
- uses: actions/checkout@v2
+ - uses: actions/cache@v2
+ with:
+ path: .downloaded-cache
+ key: downloaded-cache
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
diff --git a/.github/workflows/bundled_gems.yml b/.github/workflows/bundled_gems.yml
index aacc08f3957746..81ba5cd5b48884 100644
--- a/.github/workflows/bundled_gems.yml
+++ b/.github/workflows/bundled_gems.yml
@@ -38,6 +38,11 @@ jobs:
sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev bison autoconf ruby
if: ${{ steps.diff.outcome == 'failure' }}
+ - uses: actions/cache@v2
+ with:
+ path: .downloaded-cache
+ key: downloaded-cache
+
- name: Build
run: |
./autogen.sh
diff --git a/.github/workflows/check_dependencies.yml b/.github/workflows/check_dependencies.yml
index fb2baec1e11cee..c68e49a464141d 100644
--- a/.github/workflows/check_dependencies.yml
+++ b/.github/workflows/check_dependencies.yml
@@ -12,8 +12,8 @@ on:
- '**.rdoc'
concurrency:
- group: ${{ github.workflow }} / ${{ github.ref_name }}
- cancel-in-progress: true
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
jobs:
update-deps:
@@ -39,6 +39,10 @@ jobs:
git config --global advice.detachedHead 0
git config --global init.defaultBranch garbage
- uses: actions/checkout@v2
+ - uses: actions/cache@v2
+ with:
+ path: .downloaded-cache
+ key: downloaded-cache
- run: ./autogen.sh
- name: Run configure
run: ./configure -C --disable-install-doc --disable-rubygems --with-gcc 'optflags=-O0' 'debugflags=-save-temps=obj -g'
diff --git a/.github/workflows/check_misc.yml b/.github/workflows/check_misc.yml
index 1c70ce4ac3b442..2a59e74066a569 100644
--- a/.github/workflows/check_misc.yml
+++ b/.github/workflows/check_misc.yml
@@ -2,8 +2,8 @@ name: Miscellaneous checks
on: [push, pull_request]
concurrency:
- group: ${{ github.workflow }} / ${{ github.ref_name }}
- cancel-in-progress: true
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
jobs:
checks:
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index b0ffa3790c075b..d22da8e481ad7e 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -15,8 +15,8 @@ on:
- cron: '0 12 * * 4'
concurrency:
- group: ${{ github.workflow }} / ${{ github.ref_name }}
- cancel-in-progress: true
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
jobs:
CodeQL-Build:
@@ -37,6 +37,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
+ - uses: actions/cache@v2
+ with:
+ path: .downloaded-cache
+ key: downloaded-cache
+
- name: Remove an obsolete rubygems vendored file
run: sudo rm /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb
diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml
index 6f6072ad776800..2c2b6598f76b12 100644
--- a/.github/workflows/compilers.yml
+++ b/.github/workflows/compilers.yml
@@ -13,8 +13,8 @@ on:
- '**.rdoc'
concurrency:
- group: ${{ github.workflow }} / ${{ github.ref_name }}
- cancel-in-progress: true
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
# Github actions does not support YAML anchors. This creative use of
# environment variables (plus the "echo $GITHUB_ENV" hack) is to reroute that
@@ -200,6 +200,10 @@ jobs:
- uses: actions/checkout@v2
with:
path: src
+ - uses: actions/cache@v2
+ with:
+ path: src/.downloaded-cache
+ key: downloaded-cache
- run: ./autogen.sh
working-directory: src
- name: Run configure
diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
index 60f5b59ef7e008..c2db3df1ade62b 100644
--- a/.github/workflows/mingw.yml
+++ b/.github/workflows/mingw.yml
@@ -12,15 +12,15 @@ on:
- '**.rdoc'
concurrency:
- group: ${{ github.workflow }} / ${{ github.ref_name }}
- cancel-in-progress: true
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
# Notes:
# Actions console encoding causes issues, see test-all & test-spec steps
#
jobs:
make:
- runs-on: windows-2019
+ runs-on: windows-2022
name: ${{ github.workflow }} (${{ matrix.msystem }})
env:
MSYSTEM: ${{ matrix.msystem }}
@@ -54,13 +54,14 @@ jobs:
- uses: actions/checkout@v2
with:
path: src
+ - uses: actions/cache@v2
+ with:
+ path: src/.downloaded-cache
+ key: downloaded-cache
- name: Set up Ruby & MSYS2
- uses: MSP-Greg/setup-ruby-pkgs@ucrt
+ uses: MSP-Greg/ruby-setup-ruby@win-ucrt-1
with:
ruby-version: ${{ matrix.base_ruby }}
- setup-ruby-ref: MSP-Greg/ruby-setup-ruby/00-win-ucrt
- mingw: _upgrade_ gmp libffi libyaml openssl ragel readline gcc
- msys2: automake1.16 bison
- name: set env
run: |
echo "GNUMAKEFLAGS=-j$((2 * NUMBER_OF_PROCESSORS))" >> $GITHUB_ENV
@@ -112,7 +113,7 @@ jobs:
make test
- name: test-all
- timeout-minutes: 40
+ timeout-minutes: 45
run: |
# Actions uses UTF8, causes test failures, similar to normal OS setup
chcp.com 437
diff --git a/.github/workflows/mjit.yml b/.github/workflows/mjit.yml
index 63c27b389e9ee7..8b0011ec3784ab 100644
--- a/.github/workflows/mjit.yml
+++ b/.github/workflows/mjit.yml
@@ -12,8 +12,8 @@ on:
- '**.rdoc'
concurrency:
- group: ${{ github.workflow }} / ${{ github.ref_name }}
- cancel-in-progress: true
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
jobs:
make:
@@ -42,6 +42,10 @@ jobs:
- uses: actions/checkout@v2
with:
path: src
+ - uses: actions/cache@v2
+ with:
+ path: src/.downloaded-cache
+ key: downloaded-cache
- name: Fixed world writable dirs
run: |
chmod -v go-w $HOME $HOME/.config
diff --git a/.github/workflows/spec_guards.yml b/.github/workflows/spec_guards.yml
index b28b3b4f3191bc..79ef8a6cc0dd27 100644
--- a/.github/workflows/spec_guards.yml
+++ b/.github/workflows/spec_guards.yml
@@ -13,8 +13,8 @@ on:
- '**.rdoc'
concurrency:
- group: ${{ github.workflow }} / ${{ github.ref_name }}
- cancel-in-progress: true
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
jobs:
rubyspec:
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index edfb067aef1e33..e63e12ac0ed5c2 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -12,8 +12,8 @@ on:
- '**.rdoc'
concurrency:
- group: ${{ github.workflow }} / ${{ github.ref_name }}
- cancel-in-progress: true
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
jobs:
make:
@@ -28,7 +28,6 @@ jobs:
- test_task: "check"
os: ubuntu-20.04
configure: "--host=i686-$OSTYPE"
- skipped_tests: TestReadline#test_interrupt_in_other_thread
- test_task: "test-all TESTS=--repeat-count=2"
os: ubuntu-20.04
configure: ""
@@ -58,7 +57,8 @@ jobs:
${arch:+cross}build-essential${arch/:/-} \
libssl-dev${arch} libyaml-dev${arch} libreadline6-dev${arch} \
zlib1g-dev${arch} libncurses5-dev${arch} libffi-dev${arch} \
- pkg-config${arch} bison autoconf ruby
+ bison autoconf ruby
+ sudo apt-get install -q -y pkg-config${arch} || :
- name: git config
run: |
git config --global advice.detachedHead 0
@@ -66,6 +66,10 @@ jobs:
- uses: actions/checkout@v2
with:
path: src
+ - uses: actions/cache@v2
+ with:
+ path: src/.downloaded-cache
+ key: downloaded-cache
- name: Fixed world writable dirs
run: |
chmod -v go-w $HOME $HOME/.config
@@ -91,19 +95,20 @@ jobs:
if: ${{ matrix.test_task == 'check' }}
- name: make ${{ matrix.test_task }}
run: |
- if [ ${{ matrix.test_task }} = 'check' ]; then
- TESTS=`echo "${{ matrix.skipped_tests }}" | sed 's| |$/ -n!/|g;s|^|-n!/|;s|$|$$/|'`
- fi
- $SETARCH make -s ${{ matrix.test_task }} ${TESTS:+TESTS="$TESTS"}
- if [ ${{ matrix.test_task }} = 'check' -a "${TESTS:+set}" ]; then
- TESTS=`echo "${{ matrix.skipped_tests }}" | sed 's| |$/ -n/|g;s|^|-n/|;s|$|$$/|'`
- unset GNUMAKEFLAGS
- $SETARCH make -s test-all TESTS="$TESTS"
- fi
+ $SETARCH make -s ${{ matrix.test_task }} ${TESTS:+TESTS=`echo "$TESTS" | sed 's| |$/ -n!/|g;s|^|-n!/|;s|$|$$/|'`}
timeout-minutes: 40
env:
RUBY_TESTOPTS: "-q --tty=no"
+ TESTS: ${{ matrix.test_task == 'check' && matrix.skipped_tests || '' }}
TEST_BUNDLED_GEMS_ALLOW_FAILURES: ""
+ - name: make skipped tests
+ run: |
+ $SETARCH make -s test-all TESTS=`echo "$TESTS" | sed 's| |$/ -n/|g;s|^|-n/|;s|$|$$/|'`
+ env:
+ GNUMAKEFLAGS: ""
+ RUBY_TESTOPTS: "-v --tty=no"
+ TESTS: ${{ matrix.skipped_tests }}
+ if: ${{ matrix.test_task == 'check' && matrix.skipped_tests != '' }}
- uses: k0kubun/action-slack@v2.0.0
with:
payload: |
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 906f4f0bb90962..60f9b760ecade5 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -12,8 +12,8 @@ on:
- '**.rdoc'
concurrency:
- group: ${{ github.workflow }} / ${{ github.ref_name }}
- cancel-in-progress: true
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
jobs:
make:
@@ -80,6 +80,10 @@ jobs:
- uses: actions/checkout@v2
with:
path: src
+ - uses: actions/cache@v2
+ with:
+ path: src/.downloaded-cache
+ key: downloaded-cache
- name: setup env
# %TEMP% is inconsistent with %TMP% and test-all expects they are consistent.
# https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302
diff --git a/.github/workflows/yjit-ubuntu.yml b/.github/workflows/yjit-ubuntu.yml
index 826186585d3da1..966f9fd1c70482 100644
--- a/.github/workflows/yjit-ubuntu.yml
+++ b/.github/workflows/yjit-ubuntu.yml
@@ -12,8 +12,8 @@ on:
- '**.rdoc'
concurrency:
- group: ${{ github.workflow }} / ${{ github.ref_name }}
- cancel-in-progress: true
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
jobs:
make:
@@ -58,6 +58,10 @@ jobs:
- uses: actions/checkout@v2
with:
path: src
+ - uses: actions/cache@v2
+ with:
+ path: src/.downloaded-cache
+ key: downloaded-cache
- name: Fixed world writable dirs
run: |
chmod -v go-w $HOME $HOME/.config
diff --git a/.github/workflows/yjit_asm_tests.yml b/.github/workflows/yjit_asm_tests.yml
index 270ddcf2f6b33a..58f294f13745f1 100644
--- a/.github/workflows/yjit_asm_tests.yml
+++ b/.github/workflows/yjit_asm_tests.yml
@@ -13,8 +13,8 @@ on:
- '**.rdoc'
concurrency:
- group: ${{ github.workflow }} / ${{ github.ref_name }}
- cancel-in-progress: true
+ group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
+ cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
jobs:
test:
diff --git a/.gitignore b/.gitignore
index 90a75ef402c4c6..31bfd787a70491 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@
*.dylib
*.elc
*.i
+*.ii
*.inc
*.log
*.o
diff --git a/NEWS.md b/NEWS.md
index 3e8035714bbf8b..55f8dce9d9abb3 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -7,8 +7,8 @@ Note that each entry is kept to a minimum, see links for details.
## Language changes
-* The block arguments can be now be anonymous, if the block will
- only be passed to another method. [[Feature #11256]]
+* The block arguments can be now be anonymous, if the block will
+ only be passed to another method. [[Feature #11256]]
```ruby
def foo(&)
@@ -16,15 +16,15 @@ Note that each entry is kept to a minimum, see links for details.
end
```
-* Pin operator now takes an expression. [[Feature #17411]]
+* Pin operator now takes an expression. [[Feature #17411]]
```ruby
Prime.each_cons(2).lazy.find_all{_1 in [n, ^(n + 2)]}.take(3).to_a
#=> [[3, 5], [5, 7], [11, 13]]
```
-* Pin operator now supports instance, class, and global variables.
- [[Feature #17724]]
+* Pin operator now supports instance, class, and global variables.
+ [[Feature #17724]]
```ruby
@n = 5
@@ -32,11 +32,11 @@ Note that each entry is kept to a minimum, see links for details.
#=> [3, 5]
```
-* One-line pattern matching is no longer experimental.
+* One-line pattern matching is no longer experimental.
-* Multiple assignment evaluation order has been made consistent with
- single assignment evaluation order. With single assignment, Ruby
- uses a left-to-right evaluation order. With this code:
+* Multiple assignment evaluation order has been made consistent with
+ single assignment evaluation order. With single assignment, Ruby
+ uses a left-to-right evaluation order. With this code:
```ruby
foo[0] = bar
@@ -51,9 +51,9 @@ Note that each entry is kept to a minimum, see links for details.
In Ruby before 3.1.0, multiple assignment did not follow this
evaluation order. With this code:
- ```ruby
- foo[0], bar.baz = a, b
- ```
+ ```ruby
+ foo[0], bar.baz = a, b
+ ```
Versions of Ruby before 3.1.0 would evaluate in the following
order
@@ -78,22 +78,22 @@ Note that each entry is kept to a minimum, see links for details.
[[Bug #4443]]
-* Values in Hash literals and keyword arguments can be omitted.
- [[Feature #14579]]
+* Values in Hash literals and keyword arguments can be omitted.
+ [[Feature #14579]]
- For example,
+ For example,
* `{x:, y:}` is a syntax sugar of `{x: x, y: y}`.
* `foo(x:, y:)` is a syntax sugar of `foo(x: x, y: y)`.
- Constant names, local variable names, and method names are allowed as
- key names. Note that a reserved word is considered as a local
- variable or method name even if it's a pseudo variable name such as
- `self`.
+ Constant names, local variable names, and method names are allowed as
+ key names. Note that a reserved word is considered as a local
+ variable or method name even if it's a pseudo variable name such as
+ `self`.
-* non main-Ractors can get instance variables (ivars) of classes/modules
- if ivars refer to shareable objects.
- [[Feature #17592]]
+* non main-Ractors can get instance variables (ivars) of classes/modules
+ if ivars refer to shareable objects.
+ [[Feature #17592]]
## Command line options
@@ -121,6 +121,21 @@ Outstanding ones only.
C.descendants #=> []
```
+ * Class#subclasses, which returns an array of classes
+ directly inheriting from the receiver, not
+ including singleton classes.
+ [[Feature #18273]]
+
+ ```ruby
+ class A; end
+ class B < A; end
+ class C < B; end
+ class D < A; end
+ A.subclasses #=> [D, B]
+ B.subclasses #=> [C]
+ C.subclasses #=> []
+ ```
+
* Enumerable
* Enumerable#compact is added. [[Feature #17312]]
@@ -148,6 +163,16 @@ Outstanding ones only.
* File.dirname now accepts an optional argument for the level to
strip path components. [[Feature #12194]]
+* GC
+
+ * "GC.measure_total_time = true" enables the measurement of GC.
+ Measurement can introduce overhead. It is enabled by default.
+ GC.measure_total_time returns the current setting.
+ GC.stat[:time] or GC.stat(:time) returns measured time
+ in milli-soconds.
+
+ * GC.total_time returns measured time in nano-seconds.
+
* Integer
* Integer.try_convert is added. [[Feature #15211]]
@@ -244,76 +269,76 @@ Outstanding ones only.
## Stdlib updates
-* The following default gem are updated.
- * RubyGems
- * Bundler
- * RDoc 6.3.2
- * ReLine
- * JSON 2.6.1
- * Psych 4.0.2
- * FileUtils 1.6.0
- * Fiddle 1.1.0
- * StringIO 3.0.1
- * IO::Console 0.5.9
- * IO::Wait 0.2.0
- * CSV 3.2.1
- * Etc 1.3.0
- * Date 3.2.0
- * Zlib 2.1.1
- * StringScanner 3.0.1
- * IpAddr 1.2.2
- * Logger 1.4.4
- * OStruct 0.5.0
- * Irb
- * Racc 1.6.0
- * Delegate 0.2.0
- * Benchmark 0.2.0
- * CGI 0.3.0
- * Readline(C-ext) 0.1.3
- * Timeout 0.2.0
- * YAML 0.2.0
- * URI 0.11.0
- * OpenSSL
- * DidYouMean
- * Weakref 0.1.1
- * Tempfile 0.1.2
- * TmpDir 0.1.2
- * English 0.7.1
- * Net::Protocol 0.1.2
- * Net::Http 0.2.0
- * BigDecimal
- * OptionParser 0.2.0
- * Set 1.0.1
- * Find 0.1.1
- * Rinda 0.1.1
- * Erb 2.2.3
- * NKF 0.1.1
- * Base64 0.1.1
- * OpenUri 0.2.0
- * SecureRandom 0.1.1
- * Resolv 0.2.1
- * Resolv::Replace 0.1.0
- * Time 0.2.0
- * PP 0.2.1
- * Prettyprint 0.1.1
- * Drb 2.1.0
- * Pathname 0.2.0
- * Digest 3.1.0.pre2
- * Un 0.2.0
-* The following bundled gems are updated.
- * minitest 5.14.4
- * power_assert 2.0.1
- * rake 13.0.6
- * test-unit 3.5.0
- * rbs 1.6.2
- * typeprof 0.20.2
-* The following default gems are now bundled gems.
- * net-ftp
- * net-imap
- * net-pop
- * net-smtp
- * matrix
- * prime
+* The following default gem are updated.
+ * RubyGems
+ * Bundler
+ * RDoc 6.3.2
+ * ReLine
+ * JSON 2.6.1
+ * Psych 4.0.2
+ * FileUtils 1.6.0
+ * Fiddle 1.1.0
+ * StringIO 3.0.1
+ * IO::Console 0.5.9
+ * IO::Wait 0.2.0
+ * CSV 3.2.1
+ * Etc 1.3.0
+ * Date 3.2.2
+ * Zlib 2.1.1
+ * StringScanner 3.0.1
+ * IpAddr 1.2.3
+ * Logger 1.4.4
+ * OStruct 0.5.0
+ * Irb
+ * Racc 1.6.0
+ * Delegate 0.2.0
+ * Benchmark 0.2.0
+ * CGI 0.3.1
+ * Readline(C-ext) 0.1.3
+ * Timeout 0.2.0
+ * YAML 0.2.0
+ * URI 0.11.0
+ * OpenSSL
+ * DidYouMean
+ * Weakref 0.1.1
+ * Tempfile 0.1.2
+ * TmpDir 0.1.2
+ * English 0.7.1
+ * Net::Protocol 0.1.2
+ * Net::Http 0.2.0
+ * BigDecimal
+ * OptionParser 0.2.0
+ * Set 1.0.2
+ * Find 0.1.1
+ * Rinda 0.1.1
+ * Erb 2.2.3
+ * NKF 0.1.1
+ * Base64 0.1.1
+ * OpenUri 0.2.0
+ * SecureRandom 0.1.1
+ * Resolv 0.2.1
+ * Resolv::Replace 0.1.0
+ * Time 0.2.0
+ * PP 0.2.1
+ * Prettyprint 0.1.1
+ * Drb 2.1.0
+ * Pathname 0.2.0
+ * Digest 3.1.0.pre3
+ * Un 0.2.0
+* The following bundled gems are updated.
+ * minitest 5.14.4
+ * power_assert 2.0.1
+ * rake 13.0.6
+ * test-unit 3.5.1
+ * rbs 1.8.0
+ * typeprof 0.20.4
+* The following default gems are now bundled gems.
+ * net-ftp
+ * net-imap
+ * net-pop
+ * net-smtp
+ * matrix
+ * prime
## Compatibility issues
@@ -340,6 +365,14 @@ Excluding feature bug fixes.
## Implementation improvements
+* `instance_eval` and `instance_exec` now only allocate a singleton class when
+ required, avoiding extra objects and improving performance. [[GH-5146]]
+
+* The performance of `Struct` accessors is improved. [[GH-5131]]
+
+* `mandatory_only?` builtin special form to improve performance on
+ builtin methods. [[GH-5112]]
+
### JIT
* The default `--jit-max-cache` is changed from 100 to 10000.
@@ -456,7 +489,10 @@ See [the repository](https://github.com/ruby/error_highlight) in detail.
[Feature #18029]: https://bugs.ruby-lang.org/issues/18029
[Feature #18172]: https://bugs.ruby-lang.org/issues/18172
[Feature #18229]: https://bugs.ruby-lang.org/issues/18229
+[Feature #18273]: https://bugs.ruby-lang.org/issues/18273
[Feature #18290]: https://bugs.ruby-lang.org/issues/18290
[GH-1509]: https://github.com/ruby/ruby/pull/1509
[GH-4815]: https://github.com/ruby/ruby/pull/4815
-
+[GH-5112]: https://github.com/ruby/ruby/pull/5112
+[GH-5131]: https://github.com/ruby/ruby/pull/5131
+[GH-5146]: https://github.com/ruby/ruby/pull/5146
diff --git a/README.md b/README.md
index 89b5fbb12fdb58..15e98475e86b13 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ It is simple, straightforward, and extensible.
* Dynamic Loading of Object Files (on some architectures)
* Highly Portable (works on many Unix-like/POSIX compatible platforms as
well as Windows, macOS, etc.) cf.
- https://github.com/ruby/ruby/blob/master/doc/contributing.rdoc#label-Platform+Maintainers
+ https://github.com/ruby/ruby/blob/master/doc/maintainers.rdoc#label-Platform+Maintainers
## How to get Ruby
diff --git a/array.c b/array.c
index 240fb7e0f56951..8becdbbc9193a5 100644
--- a/array.c
+++ b/array.c
@@ -7843,13 +7843,20 @@ rb_ary_deconstruct(VALUE ary)
*
* == Creating Arrays
*
- * A new array can be created by using the literal constructor
- * []
. Arrays can contain different types of objects. For
+ * You can create an \Array object explicitly with:
+ *
+ * - An {array literal}[doc/syntax/literals_rdoc.html#label-Array+Literals].
+ *
+ * You can convert certain objects to Arrays with:
+ *
+ * - \Method {Array}[Kernel.html#method-i-Array].
+ *
+ * An \Array can contain different types of objects. For
* example, the array below contains an Integer, a String and a Float:
*
* ary = [1, "two", 3.0] #=> [1, "two", 3.0]
*
- * An array can also be created by explicitly calling Array.new with zero, one
+ * An array can also be created by calling Array.new with zero, one
* (the initial size of the Array) or two arguments (the initial size and a
* default object).
*
diff --git a/ast.c b/ast.c
index 96116d43eba63b..ceb03c29d4f4c2 100644
--- a/ast.c
+++ b/ast.c
@@ -298,7 +298,7 @@ dump_block(rb_ast_t *ast, const NODE *node)
do {
rb_ary_push(ary, NEW_CHILD(ast, node->nd_head));
} while (node->nd_next &&
- nd_type(node->nd_next) == NODE_BLOCK &&
+ nd_type_p(node->nd_next, NODE_BLOCK) &&
(node = node->nd_next, 1));
if (node->nd_next) {
rb_ary_push(ary, NEW_CHILD(ast, node->nd_next));
@@ -313,7 +313,7 @@ dump_array(rb_ast_t *ast, const NODE *node)
VALUE ary = rb_ary_new();
rb_ary_push(ary, NEW_CHILD(ast, node->nd_head));
- while (node->nd_next && nd_type(node->nd_next) == NODE_LIST) {
+ while (node->nd_next && nd_type_p(node->nd_next, NODE_LIST)) {
node = node->nd_next;
rb_ary_push(ary, NEW_CHILD(ast, node->nd_head));
}
@@ -399,7 +399,7 @@ node_children(rb_ast_t *ast, const NODE *node)
while (1) {
rb_ary_push(ary, NEW_CHILD(ast, node->nd_1st));
- if (!node->nd_2nd || nd_type(node->nd_2nd) != (int)type)
+ if (!node->nd_2nd || !nd_type_p(node->nd_2nd, type))
break;
node = node->nd_2nd;
}
@@ -600,11 +600,11 @@ node_children(rb_ast_t *ast, const NODE *node)
}
case NODE_SCOPE:
{
- ID *tbl = node->nd_tbl;
- int i, size = tbl ? (int)*tbl++ : 0;
+ rb_ast_id_table_t *tbl = node->nd_tbl;
+ int i, size = tbl ? tbl->size : 0;
VALUE locals = rb_ary_new_capa(size);
for (i = 0; i < size; i++) {
- rb_ary_push(locals, var_name(tbl[i]));
+ rb_ary_push(locals, var_name(tbl->ids[i]));
}
return rb_ary_new_from_args(3, locals, NEW_CHILD(ast, node->nd_args), NEW_CHILD(ast, node->nd_body));
}
diff --git a/autogen.sh b/autogen.sh
index 44a1922cb0524a..f8cdf3c0c1eb69 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -6,4 +6,12 @@ case "$0" in
*) srcdir="";;
esac
-exec ${AUTORECONF:-autoreconf} --install --symlink "$@" ${srcdir:+"$srcdir"}
+symlink='--install --symlink'
+case " $* " in
+ *" -i "*|*" --install "*)
+ # reset to copy missing standard auxiliary files, instead of symlinks
+ symlink=
+ ;;
+esac
+
+exec ${AUTORECONF:-autoreconf} ${symlink} "$@" ${srcdir:+"$srcdir"}
diff --git a/bootstraptest/test_eval.rb b/bootstraptest/test_eval.rb
index 5d2593c3060101..efc22efff40ace 100644
--- a/bootstraptest/test_eval.rb
+++ b/bootstraptest/test_eval.rb
@@ -116,6 +116,33 @@ class Integer
Const
}
}
+assert_equal %q{1}, %q{
+ class TrueClass
+ Const = 1
+ end
+ true.instance_eval %{
+ Const
+ }
+}
+assert_equal %q{[:Const]}, %q{
+ mod = Module.new
+ mod.instance_eval %{
+ Const = 1
+ }
+ raise if defined?(Module::Const)
+ mod.singleton_class.constants
+}
+assert_equal %q{can't define singleton}, %q{
+ begin
+ 123.instance_eval %{
+ Const = 1
+ }
+ "bad"
+ rescue TypeError => e
+ raise "bad" if defined?(Integer::Const)
+ e.message
+ end
+}
assert_equal %q{top}, %q{
Const = :top
class C
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb
index f1900f9f3f8991..140365ee0cb39c 100644
--- a/bootstraptest/test_yjit.rb
+++ b/bootstraptest/test_yjit.rb
@@ -1,3 +1,88 @@
+assert_equal '0', %q{
+ # This is a regression test for incomplete invalidation from
+ # opt_setinlinecache. This test might be brittle, so
+ # feel free to remove it in the future if it's too annoying.
+ # This test assumes --yjit-call-threshold=2.
+ module M
+ Foo = 1
+ def foo
+ Foo
+ end
+
+ def pin_self_type_then_foo
+ _ = @foo
+ foo
+ end
+
+ def only_ints
+ 1 + self
+ foo
+ end
+ end
+
+ class Integer
+ include M
+ end
+
+ class Sub
+ include M
+ end
+
+ foo_method = M.instance_method(:foo)
+
+ dbg = ->(message) do
+ return # comment this out to get printouts
+
+ $stderr.puts RubyVM::YJIT.disasm(foo_method)
+ $stderr.puts message
+ end
+
+ 2.times { 42.only_ints }
+
+ dbg["There should be two versions of getinlineache"]
+
+ module M
+ remove_const(:Foo)
+ end
+
+ dbg["There should be no getinlinecaches"]
+
+ 2.times do
+ 42.only_ints
+ rescue NameError => err
+ _ = "caught name error #{err}"
+ end
+
+ dbg["There should be one version of getinlineache"]
+
+ 2.times do
+ Sub.new.pin_self_type_then_foo
+ rescue NameError
+ _ = 'second specialization'
+ end
+
+ dbg["There should be two versions of getinlineache"]
+
+ module M
+ Foo = 1
+ end
+
+ dbg["There should still be two versions of getinlineache"]
+
+ 42.only_ints
+
+ dbg["There should be no getinlinecaches"]
+
+ # Find name of the first VM instruction in M#foo.
+ insns = RubyVM::InstructionSequence.of(foo_method).to_a
+ if defined?(RubyVM::YJIT.blocks_for) && (insns.last.find { Array === _1 }&.first == :opt_getinlinecache)
+ RubyVM::YJIT.blocks_for(RubyVM::InstructionSequence.of(foo_method))
+ .filter { _1.iseq_start_index == 0 }.count
+ else
+ 0 # skip the test
+ end
+}
+
# Check that frozen objects are respected
assert_equal 'great', %q{
class Foo
@@ -2381,3 +2466,184 @@ def foo
foo
foo
}
+
+# block invalidation edge case
+assert_equal 'undef', %q{
+ class A
+ def foo(arg)
+ arg.times { A.remove_method(:bar) }
+ self
+ end
+
+ def bar
+ 4
+ end
+
+ def use(arg)
+ # two consecutive sends. When bar is removed, the return address
+ # for calling it is already on foo's control frame
+ foo(arg).bar
+ rescue NoMethodError
+ :undef
+ end
+ end
+
+ A.new.use 0
+ A.new.use 0
+ A.new.use 1
+}
+
+# block invalidation edge case
+assert_equal 'ok', %q{
+ class A
+ Good = :ng
+ def foo(arg)
+ arg.times { A.const_set(:Good, :ok) }
+ self
+ end
+
+ def id(arg)
+ arg
+ end
+
+ def use(arg)
+ # send followed by an opt_getinlinecache.
+ # The return address remains on the control frame
+ # when opt_getinlinecache is invalidated.
+ foo(arg).id(Good)
+ end
+ end
+
+ A.new.use 0
+ A.new.use 0
+ A.new.use 1
+}
+
+assert_equal 'ok', %q{
+ # test hitting a branch stub when out of memory
+ def nimai(jita)
+ if jita
+ :ng
+ else
+ :ok
+ end
+ end
+
+ nimai(true)
+ nimai(true)
+
+ RubyVM::YJIT.simulate_oom! if defined?(RubyVM::YJIT)
+
+ nimai(false)
+}
+
+assert_equal 'new', %q{
+ # test block invalidation while out of memory
+ def foo
+ :old
+ end
+
+ def test
+ foo
+ end
+
+ test
+ test
+
+ RubyVM::YJIT.simulate_oom! if defined?(RubyVM::YJIT)
+
+ def foo
+ :new
+ end
+
+ test
+}
+
+assert_equal 'ok', %q{
+ # Try to compile new method while OOM
+ def foo
+ :ok
+ end
+
+ RubyVM::YJIT.simulate_oom! if defined?(RubyVM::YJIT)
+
+ foo
+ foo
+}
+
+# struct aref embedded
+assert_equal '2', %q{
+ def foo(s)
+ s.foo
+ end
+
+ S = Struct.new(:foo)
+ foo(S.new(1))
+ foo(S.new(2))
+}
+
+# struct aref non-embedded
+assert_equal '4', %q{
+ def foo(s)
+ s.d
+ end
+
+ S = Struct.new(:a, :b, :c, :d, :e)
+ foo(S.new(1,2,3,4,5))
+ foo(S.new(1,2,3,4,5))
+}
+
+# struct aset embedded
+assert_equal '123', %q{
+ def foo(s)
+ s.foo = 123
+ end
+
+ s = Struct.new(:foo).new
+ foo(s)
+ s = Struct.new(:foo).new
+ foo(s)
+ s.foo
+}
+
+# struct aset non-embedded
+assert_equal '[1, 2, 3, 4, 5]', %q{
+ def foo(s)
+ s.a = 1
+ s.b = 2
+ s.c = 3
+ s.d = 4
+ s.e = 5
+ end
+
+ S = Struct.new(:a, :b, :c, :d, :e)
+ s = S.new
+ foo(s)
+ s = S.new
+ foo(s)
+ [s.a, s.b, s.c, s.d, s.e]
+}
+
+# struct aref too many args
+assert_equal 'ok', %q{
+ def foo(s)
+ s.foo(:bad)
+ end
+
+ s = Struct.new(:foo).new
+ foo(s) rescue :ok
+ foo(s) rescue :ok
+}
+
+# struct aset too many args
+assert_equal 'ok', %q{
+ def foo(s)
+ s.set_foo(123, :bad)
+ end
+
+ s = Struct.new(:foo) do
+ alias :set_foo :foo=
+ end
+ foo(s) rescue :ok
+ foo(s) rescue :ok
+}
diff --git a/class.c b/class.c
index 01939f50088d94..f1e8953f81f360 100644
--- a/class.c
+++ b/class.c
@@ -37,87 +37,113 @@
RUBY_EXTERN rb_serial_t ruby_vm_global_cvar_state;
-void
-rb_class_subclass_add(VALUE super, VALUE klass)
+static rb_subclass_entry_t *
+push_subclass_entry_to_list(VALUE super, VALUE klass)
{
rb_subclass_entry_t *entry, *head;
- if (super && super != Qundef) {
- entry = ALLOC(rb_subclass_entry_t);
- entry->klass = klass;
- entry->next = NULL;
-
- head = RCLASS_SUBCLASSES(super);
- if (head) {
- entry->next = head;
- RCLASS_PARENT_SUBCLASSES(head->klass) = &entry->next;
- }
+ entry = ZALLOC(rb_subclass_entry_t);
+ entry->klass = klass;
+
+ head = RCLASS_SUBCLASSES(super);
+ if (!head) {
+ head = ZALLOC(rb_subclass_entry_t);
+ RCLASS_SUBCLASSES(super) = head;
+ }
+ entry->next = head->next;
+ entry->prev = head;
- RCLASS_SUBCLASSES(super) = entry;
- RCLASS_PARENT_SUBCLASSES(klass) = &RCLASS_SUBCLASSES(super);
+ if (head->next) {
+ head->next->prev = entry;
+ }
+ head->next = entry;
+
+ return entry;
+}
+
+void
+rb_class_subclass_add(VALUE super, VALUE klass)
+{
+ if (super && super != Qundef) {
+ rb_subclass_entry_t *entry = push_subclass_entry_to_list(super, klass);
+ RCLASS_SUBCLASS_ENTRY(klass) = entry;
}
}
static void
rb_module_add_to_subclasses_list(VALUE module, VALUE iclass)
{
- rb_subclass_entry_t *entry, *head;
+ rb_subclass_entry_t *entry = push_subclass_entry_to_list(module, iclass);
+ RCLASS_MODULE_SUBCLASS_ENTRY(iclass) = entry;
+}
- entry = ALLOC(rb_subclass_entry_t);
- entry->klass = iclass;
- entry->next = NULL;
+void
+rb_class_remove_subclass_head(VALUE klass)
+{
+ rb_subclass_entry_t *head = RCLASS_SUBCLASSES(klass);
- head = RCLASS_SUBCLASSES(module);
if (head) {
- entry->next = head;
- RCLASS_MODULE_SUBCLASSES(head->klass) = &entry->next;
+ if (head->next) {
+ head->next->prev = NULL;
+ }
+ RCLASS_SUBCLASSES(klass) = NULL;
+ xfree(head);
}
-
- RCLASS_SUBCLASSES(module) = entry;
- RCLASS_MODULE_SUBCLASSES(iclass) = &RCLASS_SUBCLASSES(module);
}
void
rb_class_remove_from_super_subclasses(VALUE klass)
{
- rb_subclass_entry_t **prev = RCLASS_PARENT_SUBCLASSES(klass);
+ rb_subclass_entry_t *entry = RCLASS_SUBCLASS_ENTRY(klass);
- if (prev) {
- rb_subclass_entry_t *entry = *prev, *next = entry->next;
+ if (entry) {
+ rb_subclass_entry_t *prev = entry->prev, *next = entry->next;
+
+ if (prev) {
+ prev->next = next;
+ }
+ if (next) {
+ next->prev = prev;
+ }
- *prev = next;
- if (next) {
- RCLASS_PARENT_SUBCLASSES(next->klass) = prev;
- }
xfree(entry);
}
- RCLASS_PARENT_SUBCLASSES(klass) = NULL;
+ RCLASS_SUBCLASS_ENTRY(klass) = NULL;
}
void
rb_class_remove_from_module_subclasses(VALUE klass)
{
- rb_subclass_entry_t **prev = RCLASS_MODULE_SUBCLASSES(klass);
+ rb_subclass_entry_t *entry = RCLASS_MODULE_SUBCLASS_ENTRY(klass);
- if (prev) {
- rb_subclass_entry_t *entry = *prev, *next = entry->next;
+ if (entry) {
+ rb_subclass_entry_t *prev = entry->prev, *next = entry->next;
- *prev = next;
+ if (prev) {
+ prev->next = next;
+ }
if (next) {
- RCLASS_MODULE_SUBCLASSES(next->klass) = prev;
+ next->prev = prev;
}
xfree(entry);
}
- RCLASS_MODULE_SUBCLASSES(klass) = NULL;
+ RCLASS_MODULE_SUBCLASS_ENTRY(klass) = NULL;
}
void
rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE arg)
{
+ // RCLASS_SUBCLASSES should always point to our head element which has NULL klass
rb_subclass_entry_t *cur = RCLASS_SUBCLASSES(klass);
+ // if we have a subclasses list, then the head is a placeholder with no valid
+ // class. So ignore it and use the next element in the list (if one exists)
+ if (cur) {
+ RUBY_ASSERT(!cur->klass);
+ cur = cur->next;
+ }
/* do not be tempted to simplify this loop into a for loop, the order of
operations is important here if `f` modifies the linked list */
@@ -177,7 +203,9 @@ class_alloc(VALUE flags, VALUE klass)
RVARGC_NEWOBJ_OF(obj, struct RClass, klass, (flags & T_MASK) | FL_PROMOTED1 /* start from age == 2 */ | (RGENGC_WB_PROTECTED_CLASS ? FL_WB_PROTECTED : 0), alloc_size);
-#if !USE_RVARGC
+#if USE_RVARGC
+ memset(RCLASS_EXT(obj), 0, sizeof(rb_classext_t));
+#else
obj->ptr = ZALLOC(rb_classext_t);
#endif
@@ -963,6 +991,12 @@ rb_include_module(VALUE klass, VALUE module)
if (RB_TYPE_P(klass, T_MODULE)) {
rb_subclass_entry_t *iclass = RCLASS_SUBCLASSES(klass);
+ // skip the placeholder subclass entry at the head of the list
+ if (iclass && iclass->next) {
+ RUBY_ASSERT(!iclass->klass);
+ iclass = iclass->next;
+ }
+
int do_include = 1;
while (iclass) {
VALUE check_class = iclass->klass;
@@ -1202,6 +1236,12 @@ rb_prepend_module(VALUE klass, VALUE module)
}
if (RB_TYPE_P(klass, T_MODULE)) {
rb_subclass_entry_t *iclass = RCLASS_SUBCLASSES(klass);
+ // skip the placeholder subclass entry at the head of the list if it exists
+ if (iclass && iclass->next) {
+ RUBY_ASSERT(!iclass->klass);
+ iclass = iclass->next;
+ }
+
VALUE klass_origin = RCLASS_ORIGIN(klass);
struct rb_id_table *klass_m_tbl = RCLASS_M_TBL(klass);
struct rb_id_table *klass_origin_m_tbl = RCLASS_M_TBL(klass_origin);
@@ -1339,6 +1379,7 @@ struct subclass_traverse_data
VALUE buffer;
long count;
long maxcount;
+ bool immediate_only;
};
static void
@@ -1352,8 +1393,38 @@ class_descendants_recursive(VALUE klass, VALUE v)
rb_ary_push(data->buffer, klass);
}
data->count++;
+ if (!data->immediate_only) {
+ rb_class_foreach_subclass(klass, class_descendants_recursive, v);
+ }
+ }
+ else {
+ rb_class_foreach_subclass(klass, class_descendants_recursive, v);
+ }
+}
+
+static VALUE
+class_descendants(VALUE klass, bool immediate_only)
+{
+ struct subclass_traverse_data data = { Qfalse, 0, -1, immediate_only };
+
+ // estimate the count of subclasses
+ rb_class_foreach_subclass(klass, class_descendants_recursive, (VALUE) &data);
+
+ // the following allocation may cause GC which may change the number of subclasses
+ data.buffer = rb_ary_new_capa(data.count);
+ data.maxcount = data.count;
+ data.count = 0;
+
+ size_t gc_count = rb_gc_count();
+
+ // enumerate subclasses
+ rb_class_foreach_subclass(klass, class_descendants_recursive, (VALUE) &data);
+
+ if (gc_count != rb_gc_count()) {
+ rb_bug("GC must not occur during the subclass iteration of Class#descendants");
}
- rb_class_foreach_subclass(klass, class_descendants_recursive, v);
+
+ return data.buffer;
}
/*
@@ -1377,26 +1448,32 @@ class_descendants_recursive(VALUE klass, VALUE v)
VALUE
rb_class_descendants(VALUE klass)
{
- struct subclass_traverse_data data = { Qfalse, 0, -1 };
-
- // estimate the count of subclasses
- rb_class_foreach_subclass(klass, class_descendants_recursive, (VALUE) &data);
-
- // the following allocation may cause GC which may change the number of subclasses
- data.buffer = rb_ary_new_capa(data.count);
- data.maxcount = data.count;
- data.count = 0;
+ return class_descendants(klass, false);
+}
- size_t gc_count = rb_gc_count();
- // enumerate subclasses
- rb_class_foreach_subclass(klass, class_descendants_recursive, (VALUE) &data);
-
- if (gc_count != rb_gc_count()) {
- rb_bug("GC must not occur during the subclass iteration of Class#descendants");
- }
+/*
+ * call-seq:
+ * subclasses -> array
+ *
+ * Returns an array of classes where the receiver is the
+ * direct superclass of the class, excluding singleton classes.
+ * The order of the returned array is not defined.
+ *
+ * class A; end
+ * class B < A; end
+ * class C < B; end
+ * class D < A; end
+ *
+ * A.subclasses #=> [D, B]
+ * B.subclasses #=> [C]
+ * C.subclasses #=> []
+ */
- return data.buffer;
+VALUE
+rb_class_subclasses(VALUE klass)
+{
+ return class_descendants(klass, true);
}
static void
diff --git a/common.mk b/common.mk
index 7ba32ac6e8fe60..9243285689f757 100644
--- a/common.mk
+++ b/common.mk
@@ -1681,7 +1681,6 @@ addr2line.$(OBJEXT): {$(VPATH)}assert.h
addr2line.$(OBJEXT): {$(VPATH)}backward/2/assume.h
addr2line.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
addr2line.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-addr2line.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
addr2line.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
addr2line.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
addr2line.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
@@ -1730,7 +1729,6 @@ addr2line.$(OBJEXT): {$(VPATH)}internal/stdbool.h
addr2line.$(OBJEXT): {$(VPATH)}internal/warning_push.h
addr2line.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
addr2line.$(OBJEXT): {$(VPATH)}missing.h
-array.$(OBJEXT): $(hdrdir)/ruby.h
array.$(OBJEXT): $(hdrdir)/ruby/ruby.h
array.$(OBJEXT): $(top_srcdir)/internal/array.h
array.$(OBJEXT): $(top_srcdir)/internal/bignum.h
@@ -2129,7 +2127,6 @@ ast.$(OBJEXT): {$(VPATH)}thread_native.h
ast.$(OBJEXT): {$(VPATH)}util.h
ast.$(OBJEXT): {$(VPATH)}vm_core.h
ast.$(OBJEXT): {$(VPATH)}vm_opts.h
-bignum.$(OBJEXT): $(hdrdir)/ruby.h
bignum.$(OBJEXT): $(hdrdir)/ruby/ruby.h
bignum.$(OBJEXT): $(top_srcdir)/internal/bignum.h
bignum.$(OBJEXT): $(top_srcdir)/internal/bits.h
@@ -2313,7 +2310,6 @@ builtin.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
builtin.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
builtin.$(OBJEXT): $(CCAN_DIR)/list/list.h
builtin.$(OBJEXT): $(CCAN_DIR)/str/str.h
-builtin.$(OBJEXT): $(hdrdir)/ruby.h
builtin.$(OBJEXT): $(hdrdir)/ruby/ruby.h
builtin.$(OBJEXT): $(top_srcdir)/internal/array.h
builtin.$(OBJEXT): $(top_srcdir)/internal/compilers.h
@@ -2498,12 +2494,10 @@ class.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
class.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
class.$(OBJEXT): $(CCAN_DIR)/list/list.h
class.$(OBJEXT): $(CCAN_DIR)/str/str.h
-class.$(OBJEXT): $(hdrdir)/ruby.h
class.$(OBJEXT): $(hdrdir)/ruby/ruby.h
class.$(OBJEXT): $(top_srcdir)/internal/array.h
class.$(OBJEXT): $(top_srcdir)/internal/class.h
class.$(OBJEXT): $(top_srcdir)/internal/compilers.h
-class.$(OBJEXT): $(top_srcdir)/internal/error.h
class.$(OBJEXT): $(top_srcdir)/internal/eval.h
class.$(OBJEXT): $(top_srcdir)/internal/gc.h
class.$(OBJEXT): $(top_srcdir)/internal/hash.h
@@ -2698,7 +2692,6 @@ class.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
class.$(OBJEXT): {$(VPATH)}thread_native.h
class.$(OBJEXT): {$(VPATH)}vm_core.h
class.$(OBJEXT): {$(VPATH)}vm_opts.h
-compar.$(OBJEXT): $(hdrdir)/ruby.h
compar.$(OBJEXT): $(hdrdir)/ruby/ruby.h
compar.$(OBJEXT): $(top_srcdir)/internal/compar.h
compar.$(OBJEXT): $(top_srcdir)/internal/compilers.h
@@ -2881,7 +2874,6 @@ compile.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
compile.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
compile.$(OBJEXT): $(CCAN_DIR)/list/list.h
compile.$(OBJEXT): $(CCAN_DIR)/str/str.h
-compile.$(OBJEXT): $(hdrdir)/ruby.h
compile.$(OBJEXT): $(hdrdir)/ruby/ruby.h
compile.$(OBJEXT): $(top_srcdir)/internal/array.h
compile.$(OBJEXT): $(top_srcdir)/internal/bignum.h
@@ -3091,9 +3083,7 @@ compile.$(OBJEXT): {$(VPATH)}missing.h
compile.$(OBJEXT): {$(VPATH)}node.h
compile.$(OBJEXT): {$(VPATH)}onigmo.h
compile.$(OBJEXT): {$(VPATH)}oniguruma.h
-compile.$(OBJEXT): {$(VPATH)}opt_sc.inc
compile.$(OBJEXT): {$(VPATH)}optinsn.inc
-compile.$(OBJEXT): {$(VPATH)}optunifs.inc
compile.$(OBJEXT): {$(VPATH)}re.h
compile.$(OBJEXT): {$(VPATH)}regex.h
compile.$(OBJEXT): {$(VPATH)}ruby_assert.h
@@ -3107,8 +3097,6 @@ compile.$(OBJEXT): {$(VPATH)}vm_callinfo.h
compile.$(OBJEXT): {$(VPATH)}vm_core.h
compile.$(OBJEXT): {$(VPATH)}vm_debug.h
compile.$(OBJEXT): {$(VPATH)}vm_opts.h
-compile.$(OBJEXT): {$(VPATH)}yjit.h
-complex.$(OBJEXT): $(hdrdir)/ruby.h
complex.$(OBJEXT): $(hdrdir)/ruby/ruby.h
complex.$(OBJEXT): $(top_srcdir)/internal/array.h
complex.$(OBJEXT): $(top_srcdir)/internal/bignum.h
@@ -3116,7 +3104,6 @@ complex.$(OBJEXT): $(top_srcdir)/internal/bits.h
complex.$(OBJEXT): $(top_srcdir)/internal/class.h
complex.$(OBJEXT): $(top_srcdir)/internal/compilers.h
complex.$(OBJEXT): $(top_srcdir)/internal/complex.h
-complex.$(OBJEXT): $(top_srcdir)/internal/error.h
complex.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
complex.$(OBJEXT): $(top_srcdir)/internal/gc.h
complex.$(OBJEXT): $(top_srcdir)/internal/math.h
@@ -3125,7 +3112,6 @@ complex.$(OBJEXT): $(top_srcdir)/internal/object.h
complex.$(OBJEXT): $(top_srcdir)/internal/rational.h
complex.$(OBJEXT): $(top_srcdir)/internal/serial.h
complex.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
-complex.$(OBJEXT): $(top_srcdir)/internal/string.h
complex.$(OBJEXT): $(top_srcdir)/internal/vm.h
complex.$(OBJEXT): $(top_srcdir)/internal/warnings.h
complex.$(OBJEXT): {$(VPATH)}assert.h
@@ -3141,7 +3127,6 @@ complex.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
complex.$(OBJEXT): {$(VPATH)}complex.c
complex.$(OBJEXT): {$(VPATH)}config.h
complex.$(OBJEXT): {$(VPATH)}defines.h
-complex.$(OBJEXT): {$(VPATH)}encoding.h
complex.$(OBJEXT): {$(VPATH)}id.h
complex.$(OBJEXT): {$(VPATH)}id_table.h
complex.$(OBJEXT): {$(VPATH)}intern.h
@@ -3286,8 +3271,6 @@ complex.$(OBJEXT): {$(VPATH)}internal/variable.h
complex.$(OBJEXT): {$(VPATH)}internal/warning_push.h
complex.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
complex.$(OBJEXT): {$(VPATH)}missing.h
-complex.$(OBJEXT): {$(VPATH)}onigmo.h
-complex.$(OBJEXT): {$(VPATH)}oniguruma.h
complex.$(OBJEXT): {$(VPATH)}ruby_assert.h
complex.$(OBJEXT): {$(VPATH)}st.h
complex.$(OBJEXT): {$(VPATH)}subst.h
@@ -3297,7 +3280,6 @@ cont.$(OBJEXT): $(CCAN_DIR)/list/list.h
cont.$(OBJEXT): $(CCAN_DIR)/str/str.h
cont.$(OBJEXT): $(hdrdir)/ruby.h
cont.$(OBJEXT): $(hdrdir)/ruby/ruby.h
-cont.$(OBJEXT): $(top_srcdir)/include/ruby/fiber/scheduler.h
cont.$(OBJEXT): $(top_srcdir)/internal/array.h
cont.$(OBJEXT): $(top_srcdir)/internal/compilers.h
cont.$(OBJEXT): $(top_srcdir)/internal/cont.h
@@ -3491,7 +3473,6 @@ debug.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
debug.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
debug.$(OBJEXT): $(CCAN_DIR)/list/list.h
debug.$(OBJEXT): $(CCAN_DIR)/str/str.h
-debug.$(OBJEXT): $(hdrdir)/ruby.h
debug.$(OBJEXT): $(hdrdir)/ruby/ruby.h
debug.$(OBJEXT): $(top_srcdir)/internal/array.h
debug.$(OBJEXT): $(top_srcdir)/internal/compilers.h
@@ -3694,13 +3675,11 @@ debug.$(OBJEXT): {$(VPATH)}vm_callinfo.h
debug.$(OBJEXT): {$(VPATH)}vm_core.h
debug.$(OBJEXT): {$(VPATH)}vm_debug.h
debug.$(OBJEXT): {$(VPATH)}vm_opts.h
-debug_counter.$(OBJEXT): $(hdrdir)/ruby.h
debug_counter.$(OBJEXT): $(hdrdir)/ruby/ruby.h
debug_counter.$(OBJEXT): {$(VPATH)}assert.h
debug_counter.$(OBJEXT): {$(VPATH)}backward/2/assume.h
debug_counter.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
debug_counter.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-debug_counter.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
debug_counter.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
debug_counter.$(OBJEXT): {$(VPATH)}backward/2/limits.h
debug_counter.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
@@ -3855,7 +3834,6 @@ debug_counter.$(OBJEXT): {$(VPATH)}missing.h
debug_counter.$(OBJEXT): {$(VPATH)}st.h
debug_counter.$(OBJEXT): {$(VPATH)}subst.h
debug_counter.$(OBJEXT): {$(VPATH)}thread_native.h
-dir.$(OBJEXT): $(hdrdir)/ruby.h
dir.$(OBJEXT): $(hdrdir)/ruby/ruby.h
dir.$(OBJEXT): $(top_srcdir)/internal/array.h
dir.$(OBJEXT): $(top_srcdir)/internal/class.h
@@ -4049,7 +4027,6 @@ dir.$(OBJEXT): {$(VPATH)}st.h
dir.$(OBJEXT): {$(VPATH)}subst.h
dir.$(OBJEXT): {$(VPATH)}thread.h
dir.$(OBJEXT): {$(VPATH)}util.h
-dln.$(OBJEXT): $(hdrdir)/ruby.h
dln.$(OBJEXT): $(hdrdir)/ruby/ruby.h
dln.$(OBJEXT): $(top_srcdir)/internal/compilers.h
dln.$(OBJEXT): $(top_srcdir)/internal/warnings.h
@@ -4216,7 +4193,6 @@ dln_find.$(OBJEXT): {$(VPATH)}assert.h
dln_find.$(OBJEXT): {$(VPATH)}backward/2/assume.h
dln_find.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
dln_find.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-dln_find.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
dln_find.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
dln_find.$(OBJEXT): {$(VPATH)}backward/2/limits.h
dln_find.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
@@ -4374,7 +4350,6 @@ dmydln.$(OBJEXT): {$(VPATH)}assert.h
dmydln.$(OBJEXT): {$(VPATH)}backward/2/assume.h
dmydln.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
dmydln.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-dmydln.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
dmydln.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
dmydln.$(OBJEXT): {$(VPATH)}backward/2/limits.h
dmydln.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
@@ -4528,17 +4503,329 @@ dmydln.$(OBJEXT): {$(VPATH)}st.h
dmydln.$(OBJEXT): {$(VPATH)}subst.h
dmyenc.$(OBJEXT): {$(VPATH)}dmyenc.c
dmyext.$(OBJEXT): {$(VPATH)}dmyext.c
+enc/ascii.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enc/ascii.$(OBJEXT): {$(VPATH)}assert.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+enc/ascii.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
enc/ascii.$(OBJEXT): {$(VPATH)}config.h
enc/ascii.$(OBJEXT): {$(VPATH)}defines.h
enc/ascii.$(OBJEXT): {$(VPATH)}enc/ascii.c
enc/ascii.$(OBJEXT): {$(VPATH)}encindex.h
+enc/ascii.$(OBJEXT): {$(VPATH)}encoding.h
+enc/ascii.$(OBJEXT): {$(VPATH)}intern.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/assume.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/cast.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/config.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/ctype.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/dosish.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/error.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/eval.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/event.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/gc.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/glob.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/globals.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/iterator.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/memory.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/method.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/module.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/newobj.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/symbol.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/value.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/value_type.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/variable.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+enc/ascii.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
enc/ascii.$(OBJEXT): {$(VPATH)}missing.h
+enc/ascii.$(OBJEXT): {$(VPATH)}onigmo.h
+enc/ascii.$(OBJEXT): {$(VPATH)}oniguruma.h
enc/ascii.$(OBJEXT): {$(VPATH)}regenc.h
+enc/ascii.$(OBJEXT): {$(VPATH)}st.h
+enc/ascii.$(OBJEXT): {$(VPATH)}subst.h
enc/trans/newline.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}assert.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
enc/trans/newline.$(OBJEXT): {$(VPATH)}config.h
enc/trans/newline.$(OBJEXT): {$(VPATH)}defines.h
enc/trans/newline.$(OBJEXT): {$(VPATH)}enc/trans/newline.c
enc/trans/newline.$(OBJEXT): {$(VPATH)}intern.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/assume.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/cast.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/config.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/ctype.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/dosish.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/error.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/eval.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/event.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/gc.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/glob.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/globals.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/iterator.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/memory.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/method.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/module.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/newobj.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/symbol.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/value.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/value_type.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/variable.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+enc/trans/newline.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
enc/trans/newline.$(OBJEXT): {$(VPATH)}missing.h
enc/trans/newline.$(OBJEXT): {$(VPATH)}st.h
enc/trans/newline.$(OBJEXT): {$(VPATH)}subst.h
@@ -4546,29 +4833,504 @@ enc/trans/newline.$(OBJEXT): {$(VPATH)}transcode_data.h
enc/unicode.$(OBJEXT): $(UNICODE_HDR_DIR)/casefold.h
enc/unicode.$(OBJEXT): $(UNICODE_HDR_DIR)/name2ctype.h
enc/unicode.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enc/unicode.$(OBJEXT): {$(VPATH)}assert.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+enc/unicode.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
enc/unicode.$(OBJEXT): {$(VPATH)}config.h
enc/unicode.$(OBJEXT): {$(VPATH)}defines.h
enc/unicode.$(OBJEXT): {$(VPATH)}enc/unicode.c
enc/unicode.$(OBJEXT): {$(VPATH)}intern.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/assume.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/cast.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/config.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/ctype.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/dosish.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/error.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/eval.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/event.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/gc.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/glob.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/globals.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/iterator.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/memory.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/method.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/module.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/newobj.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/symbol.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/value.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/value_type.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/variable.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+enc/unicode.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
enc/unicode.$(OBJEXT): {$(VPATH)}missing.h
enc/unicode.$(OBJEXT): {$(VPATH)}onigmo.h
enc/unicode.$(OBJEXT): {$(VPATH)}regenc.h
enc/unicode.$(OBJEXT): {$(VPATH)}regint.h
enc/unicode.$(OBJEXT): {$(VPATH)}st.h
enc/unicode.$(OBJEXT): {$(VPATH)}subst.h
+enc/us_ascii.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}assert.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
enc/us_ascii.$(OBJEXT): {$(VPATH)}config.h
enc/us_ascii.$(OBJEXT): {$(VPATH)}defines.h
enc/us_ascii.$(OBJEXT): {$(VPATH)}enc/us_ascii.c
enc/us_ascii.$(OBJEXT): {$(VPATH)}encindex.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}encoding.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}intern.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/assume.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/cast.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/config.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/ctype.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/dosish.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/error.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/eval.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/event.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/gc.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/glob.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/globals.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/iterator.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/memory.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/method.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/module.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/newobj.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/symbol.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/value.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/value_type.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/variable.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
enc/us_ascii.$(OBJEXT): {$(VPATH)}missing.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}onigmo.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}oniguruma.h
enc/us_ascii.$(OBJEXT): {$(VPATH)}regenc.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}st.h
+enc/us_ascii.$(OBJEXT): {$(VPATH)}subst.h
+enc/utf_8.$(OBJEXT): $(hdrdir)/ruby/ruby.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}assert.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/assume.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/bool.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/limits.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
enc/utf_8.$(OBJEXT): {$(VPATH)}config.h
enc/utf_8.$(OBJEXT): {$(VPATH)}defines.h
enc/utf_8.$(OBJEXT): {$(VPATH)}enc/utf_8.c
enc/utf_8.$(OBJEXT): {$(VPATH)}encindex.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}encoding.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}intern.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/anyargs.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/assume.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/const.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/error.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/format.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/cast.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/config.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/constant_p.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/robject.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/ctype.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/dllexport.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/dosish.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/coderange.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/ctype.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/encoding.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/pathname.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/re.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/sprintf.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/string.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/symbol.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/encoding/transcode.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/error.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/eval.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/event.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/fl_type.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/gc.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/glob.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/globals.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/extension.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/feature.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/has/warning.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/array.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/class.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/error.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/file.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/io.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/load.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/object.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/process.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/random.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/range.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/re.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/select.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/string.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/time.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/interpreter.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/iterator.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/memory.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/method.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/module.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/newobj.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/rgengc.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/scan_args.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/special_consts.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/static_assert.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/stdalign.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/stdbool.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/symbol.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/value.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/value_type.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/variable.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/warning_push.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
enc/utf_8.$(OBJEXT): {$(VPATH)}missing.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}onigmo.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}oniguruma.h
enc/utf_8.$(OBJEXT): {$(VPATH)}regenc.h
-encoding.$(OBJEXT): $(hdrdir)/ruby.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}st.h
+enc/utf_8.$(OBJEXT): {$(VPATH)}subst.h
encoding.$(OBJEXT): $(hdrdir)/ruby/ruby.h
encoding.$(OBJEXT): $(top_srcdir)/internal/class.h
encoding.$(OBJEXT): $(top_srcdir)/internal/compilers.h
@@ -4751,7 +5513,6 @@ encoding.$(OBJEXT): {$(VPATH)}internal/variable.h
encoding.$(OBJEXT): {$(VPATH)}internal/warning_push.h
encoding.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
encoding.$(OBJEXT): {$(VPATH)}missing.h
-encoding.$(OBJEXT): {$(VPATH)}node.h
encoding.$(OBJEXT): {$(VPATH)}onigmo.h
encoding.$(OBJEXT): {$(VPATH)}oniguruma.h
encoding.$(OBJEXT): {$(VPATH)}regenc.h
@@ -4761,7 +5522,6 @@ encoding.$(OBJEXT): {$(VPATH)}subst.h
encoding.$(OBJEXT): {$(VPATH)}util.h
encoding.$(OBJEXT): {$(VPATH)}vm_debug.h
encoding.$(OBJEXT): {$(VPATH)}vm_sync.h
-enum.$(OBJEXT): $(hdrdir)/ruby.h
enum.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enum.$(OBJEXT): $(top_srcdir)/internal/array.h
enum.$(OBJEXT): $(top_srcdir)/internal/bignum.h
@@ -4957,7 +5717,6 @@ enum.$(OBJEXT): {$(VPATH)}st.h
enum.$(OBJEXT): {$(VPATH)}subst.h
enum.$(OBJEXT): {$(VPATH)}symbol.h
enum.$(OBJEXT): {$(VPATH)}util.h
-enumerator.$(OBJEXT): $(hdrdir)/ruby.h
enumerator.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enumerator.$(OBJEXT): $(top_srcdir)/internal/array.h
enumerator.$(OBJEXT): $(top_srcdir)/internal/bignum.h
@@ -5153,7 +5912,6 @@ error.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
error.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
error.$(OBJEXT): $(CCAN_DIR)/list/list.h
error.$(OBJEXT): $(CCAN_DIR)/str/str.h
-error.$(OBJEXT): $(hdrdir)/ruby.h
error.$(OBJEXT): $(hdrdir)/ruby/ruby.h
error.$(OBJEXT): $(top_srcdir)/internal/array.h
error.$(OBJEXT): $(top_srcdir)/internal/class.h
@@ -5192,7 +5950,6 @@ error.$(OBJEXT): {$(VPATH)}darray.h
error.$(OBJEXT): {$(VPATH)}defines.h
error.$(OBJEXT): {$(VPATH)}encoding.h
error.$(OBJEXT): {$(VPATH)}error.c
-error.$(OBJEXT): {$(VPATH)}eval_intern.h
error.$(OBJEXT): {$(VPATH)}id.h
error.$(OBJEXT): {$(VPATH)}id_table.h
error.$(OBJEXT): {$(VPATH)}intern.h
@@ -5367,7 +6124,6 @@ eval.$(OBJEXT): $(CCAN_DIR)/list/list.h
eval.$(OBJEXT): $(CCAN_DIR)/str/str.h
eval.$(OBJEXT): $(hdrdir)/ruby.h
eval.$(OBJEXT): $(hdrdir)/ruby/ruby.h
-eval.$(OBJEXT): $(top_srcdir)/include/ruby/fiber/scheduler.h
eval.$(OBJEXT): $(top_srcdir)/internal/array.h
eval.$(OBJEXT): $(top_srcdir)/internal/class.h
eval.$(OBJEXT): $(top_srcdir)/internal/compilers.h
@@ -5600,7 +6356,6 @@ explicit_bzero.$(OBJEXT): {$(VPATH)}internal/config.h
explicit_bzero.$(OBJEXT): {$(VPATH)}internal/dllexport.h
explicit_bzero.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
explicit_bzero.$(OBJEXT): {$(VPATH)}missing.h
-file.$(OBJEXT): $(hdrdir)/ruby.h
file.$(OBJEXT): $(hdrdir)/ruby/ruby.h
file.$(OBJEXT): $(top_srcdir)/internal/array.h
file.$(OBJEXT): $(top_srcdir)/internal/class.h
@@ -6038,190 +6793,6 @@ gc.$(OBJEXT): {$(VPATH)}vm_debug.h
gc.$(OBJEXT): {$(VPATH)}vm_opts.h
gc.$(OBJEXT): {$(VPATH)}vm_sync.h
gc.$(OBJEXT): {$(VPATH)}yjit.h
-golf_prelude.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
-golf_prelude.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
-golf_prelude.$(OBJEXT): $(CCAN_DIR)/list/list.h
-golf_prelude.$(OBJEXT): $(CCAN_DIR)/str/str.h
-golf_prelude.$(OBJEXT): $(hdrdir)/ruby.h
-golf_prelude.$(OBJEXT): $(hdrdir)/ruby/ruby.h
-golf_prelude.$(OBJEXT): $(top_srcdir)/internal/array.h
-golf_prelude.$(OBJEXT): $(top_srcdir)/internal/compilers.h
-golf_prelude.$(OBJEXT): $(top_srcdir)/internal/gc.h
-golf_prelude.$(OBJEXT): $(top_srcdir)/internal/imemo.h
-golf_prelude.$(OBJEXT): $(top_srcdir)/internal/serial.h
-golf_prelude.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
-golf_prelude.$(OBJEXT): $(top_srcdir)/internal/vm.h
-golf_prelude.$(OBJEXT): $(top_srcdir)/internal/warnings.h
-golf_prelude.$(OBJEXT): {$(VPATH)}assert.h
-golf_prelude.$(OBJEXT): {$(VPATH)}atomic.h
-golf_prelude.$(OBJEXT): {$(VPATH)}backward/2/assume.h
-golf_prelude.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
-golf_prelude.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-golf_prelude.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
-golf_prelude.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
-golf_prelude.$(OBJEXT): {$(VPATH)}backward/2/limits.h
-golf_prelude.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
-golf_prelude.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
-golf_prelude.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
-golf_prelude.$(OBJEXT): {$(VPATH)}config.h
-golf_prelude.$(OBJEXT): {$(VPATH)}darray.h
-golf_prelude.$(OBJEXT): {$(VPATH)}defines.h
-golf_prelude.$(OBJEXT): {$(VPATH)}golf_prelude.c
-golf_prelude.$(OBJEXT): {$(VPATH)}golf_prelude.rb
-golf_prelude.$(OBJEXT): {$(VPATH)}id.h
-golf_prelude.$(OBJEXT): {$(VPATH)}intern.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/anyargs.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic/double.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic/fixnum.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic/gid_t.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic/int.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic/intptr_t.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic/long.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic/long_long.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic/mode_t.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic/off_t.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic/pid_t.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/assume.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/cold.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/const.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/constexpr.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/deprecated.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/diagnose_if.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/enum_extensibility.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/error.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/flag_enum.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/forceinline.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/format.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/maybe_unused.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/noalias.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/nodiscard.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/noexcept.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/noinline.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/nonnull.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/noreturn.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/pure.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/restrict.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/returns_nonnull.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/warning.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/attr/weakref.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/cast.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/config.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/constant_p.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/core.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/core/rarray.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/core/rbasic.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/core/rbignum.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/core/rclass.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/core/rdata.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/core/rfile.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/core/rhash.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/core/robject.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/core/rregexp.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/core/rstring.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/core/rstruct.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/core/rtypeddata.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/ctype.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/dllexport.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/dosish.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/error.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/eval.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/event.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/fl_type.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/gc.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/glob.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/globals.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/has/attribute.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/has/builtin.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/has/c_attribute.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/has/cpp_attribute.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/has/extension.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/has/feature.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/has/warning.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/array.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/class.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/compar.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/complex.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/cont.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/dir.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/enum.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/enumerator.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/error.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/eval.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/file.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/gc.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/hash.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/io.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/load.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/marshal.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/numeric.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/object.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/parse.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/proc.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/process.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/random.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/range.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/rational.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/re.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/ruby.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/select.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/select/largesize.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/signal.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/sprintf.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/string.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/struct.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/thread.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/time.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/variable.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/intern/vm.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/interpreter.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/iterator.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/memory.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/method.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/module.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/newobj.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/rgengc.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/scan_args.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/special_consts.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/static_assert.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/stdalign.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/stdbool.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/symbol.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/value.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/value_type.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/variable.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/warning_push.h
-golf_prelude.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
-golf_prelude.$(OBJEXT): {$(VPATH)}iseq.h
-golf_prelude.$(OBJEXT): {$(VPATH)}method.h
-golf_prelude.$(OBJEXT): {$(VPATH)}missing.h
-golf_prelude.$(OBJEXT): {$(VPATH)}node.h
-golf_prelude.$(OBJEXT): {$(VPATH)}ruby_assert.h
-golf_prelude.$(OBJEXT): {$(VPATH)}ruby_atomic.h
-golf_prelude.$(OBJEXT): {$(VPATH)}st.h
-golf_prelude.$(OBJEXT): {$(VPATH)}subst.h
-golf_prelude.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
-golf_prelude.$(OBJEXT): {$(VPATH)}thread_native.h
-golf_prelude.$(OBJEXT): {$(VPATH)}vm_core.h
-golf_prelude.$(OBJEXT): {$(VPATH)}vm_opts.h
goruby.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
goruby.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
goruby.$(OBJEXT): $(CCAN_DIR)/list/list.h
@@ -6410,7 +6981,6 @@ goruby.$(OBJEXT): {$(VPATH)}thread_native.h
goruby.$(OBJEXT): {$(VPATH)}vm_core.h
goruby.$(OBJEXT): {$(VPATH)}vm_debug.h
goruby.$(OBJEXT): {$(VPATH)}vm_opts.h
-hash.$(OBJEXT): $(hdrdir)/ruby.h
hash.$(OBJEXT): $(hdrdir)/ruby/ruby.h
hash.$(OBJEXT): $(top_srcdir)/internal/array.h
hash.$(OBJEXT): $(top_srcdir)/internal/bignum.h
@@ -6628,7 +7198,6 @@ inits.$(OBJEXT): {$(VPATH)}config.h
inits.$(OBJEXT): {$(VPATH)}defines.h
inits.$(OBJEXT): {$(VPATH)}inits.c
inits.$(OBJEXT): {$(VPATH)}intern.h
-inits.$(OBJEXT): {$(VPATH)}internal.h
inits.$(OBJEXT): {$(VPATH)}internal/anyargs.h
inits.$(OBJEXT): {$(VPATH)}internal/arithmetic.h
inits.$(OBJEXT): {$(VPATH)}internal/arithmetic/char.h
@@ -6776,9 +7345,7 @@ io.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
io.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
io.$(OBJEXT): $(CCAN_DIR)/list/list.h
io.$(OBJEXT): $(CCAN_DIR)/str/str.h
-io.$(OBJEXT): $(hdrdir)/ruby.h
io.$(OBJEXT): $(hdrdir)/ruby/ruby.h
-io.$(OBJEXT): $(top_srcdir)/include/ruby/fiber/scheduler.h
io.$(OBJEXT): $(top_srcdir)/internal/array.h
io.$(OBJEXT): $(top_srcdir)/internal/bignum.h
io.$(OBJEXT): $(top_srcdir)/internal/bits.h
@@ -7175,7 +7742,6 @@ iseq.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
iseq.$(OBJEXT): $(CCAN_DIR)/list/list.h
iseq.$(OBJEXT): $(CCAN_DIR)/str/str.h
iseq.$(OBJEXT): $(hdrdir)/ruby.h
-iseq.$(OBJEXT): $(hdrdir)/ruby/ractor.h
iseq.$(OBJEXT): $(hdrdir)/ruby/ruby.h
iseq.$(OBJEXT): $(top_srcdir)/internal/array.h
iseq.$(OBJEXT): $(top_srcdir)/internal/bits.h
@@ -7397,7 +7963,6 @@ load.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
load.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
load.$(OBJEXT): $(CCAN_DIR)/list/list.h
load.$(OBJEXT): $(CCAN_DIR)/str/str.h
-load.$(OBJEXT): $(hdrdir)/ruby.h
load.$(OBJEXT): $(hdrdir)/ruby/ruby.h
load.$(OBJEXT): $(top_srcdir)/internal/array.h
load.$(OBJEXT): $(top_srcdir)/internal/compilers.h
@@ -7610,7 +8175,6 @@ loadpath.$(OBJEXT): {$(VPATH)}assert.h
loadpath.$(OBJEXT): {$(VPATH)}backward/2/assume.h
loadpath.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
loadpath.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-loadpath.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
loadpath.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
loadpath.$(OBJEXT): {$(VPATH)}backward/2/limits.h
loadpath.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
@@ -7763,13 +8327,11 @@ loadpath.$(OBJEXT): {$(VPATH)}missing.h
loadpath.$(OBJEXT): {$(VPATH)}st.h
loadpath.$(OBJEXT): {$(VPATH)}subst.h
loadpath.$(OBJEXT): {$(VPATH)}verconf.h
-localeinit.$(OBJEXT): $(hdrdir)/ruby.h
localeinit.$(OBJEXT): $(hdrdir)/ruby/ruby.h
localeinit.$(OBJEXT): {$(VPATH)}assert.h
localeinit.$(OBJEXT): {$(VPATH)}backward/2/assume.h
localeinit.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
localeinit.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-localeinit.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
localeinit.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
localeinit.$(OBJEXT): {$(VPATH)}backward/2/limits.h
localeinit.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
@@ -7942,7 +8504,6 @@ main.$(OBJEXT): {$(VPATH)}backward.h
main.$(OBJEXT): {$(VPATH)}backward/2/assume.h
main.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
main.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-main.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
main.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
main.$(OBJEXT): {$(VPATH)}backward/2/limits.h
main.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
@@ -8092,11 +8653,9 @@ main.$(OBJEXT): {$(VPATH)}internal/warning_push.h
main.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
main.$(OBJEXT): {$(VPATH)}main.c
main.$(OBJEXT): {$(VPATH)}missing.h
-main.$(OBJEXT): {$(VPATH)}node.h
main.$(OBJEXT): {$(VPATH)}st.h
main.$(OBJEXT): {$(VPATH)}subst.h
main.$(OBJEXT): {$(VPATH)}vm_debug.h
-marshal.$(OBJEXT): $(hdrdir)/ruby.h
marshal.$(OBJEXT): $(hdrdir)/ruby/ruby.h
marshal.$(OBJEXT): $(top_srcdir)/internal/array.h
marshal.$(OBJEXT): $(top_srcdir)/internal/bignum.h
@@ -8283,7 +8842,6 @@ marshal.$(OBJEXT): {$(VPATH)}internal/warning_push.h
marshal.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
marshal.$(OBJEXT): {$(VPATH)}io.h
marshal.$(OBJEXT): {$(VPATH)}marshal.c
-marshal.$(OBJEXT): {$(VPATH)}marshal.rb
marshal.$(OBJEXT): {$(VPATH)}marshal.rbinc
marshal.$(OBJEXT): {$(VPATH)}missing.h
marshal.$(OBJEXT): {$(VPATH)}onigmo.h
@@ -8291,7 +8849,6 @@ marshal.$(OBJEXT): {$(VPATH)}oniguruma.h
marshal.$(OBJEXT): {$(VPATH)}st.h
marshal.$(OBJEXT): {$(VPATH)}subst.h
marshal.$(OBJEXT): {$(VPATH)}util.h
-math.$(OBJEXT): $(hdrdir)/ruby.h
math.$(OBJEXT): $(hdrdir)/ruby/ruby.h
math.$(OBJEXT): $(top_srcdir)/internal/bignum.h
math.$(OBJEXT): $(top_srcdir)/internal/class.h
@@ -8469,7 +9026,6 @@ memory_view.$(OBJEXT): {$(VPATH)}assert.h
memory_view.$(OBJEXT): {$(VPATH)}backward/2/assume.h
memory_view.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
memory_view.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-memory_view.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
memory_view.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
memory_view.$(OBJEXT): {$(VPATH)}backward/2/limits.h
memory_view.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
@@ -8624,7 +9180,6 @@ memory_view.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
memory_view.$(OBJEXT): {$(VPATH)}memory_view.c
memory_view.$(OBJEXT): {$(VPATH)}memory_view.h
memory_view.$(OBJEXT): {$(VPATH)}missing.h
-memory_view.$(OBJEXT): {$(VPATH)}node.h
memory_view.$(OBJEXT): {$(VPATH)}st.h
memory_view.$(OBJEXT): {$(VPATH)}subst.h
memory_view.$(OBJEXT): {$(VPATH)}util.h
@@ -8634,7 +9189,6 @@ miniinit.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
miniinit.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
miniinit.$(OBJEXT): $(CCAN_DIR)/list/list.h
miniinit.$(OBJEXT): $(CCAN_DIR)/str/str.h
-miniinit.$(OBJEXT): $(hdrdir)/ruby.h
miniinit.$(OBJEXT): $(hdrdir)/ruby/ruby.h
miniinit.$(OBJEXT): $(top_srcdir)/internal/array.h
miniinit.$(OBJEXT): $(top_srcdir)/internal/compilers.h
@@ -8845,38 +9399,6 @@ miniinit.$(OBJEXT): {$(VPATH)}vm_core.h
miniinit.$(OBJEXT): {$(VPATH)}vm_opts.h
miniinit.$(OBJEXT): {$(VPATH)}warning.rb
miniinit.$(OBJEXT): {$(VPATH)}yjit.rb
-miniprelude.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
-miniprelude.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
-miniprelude.$(OBJEXT): $(CCAN_DIR)/list/list.h
-miniprelude.$(OBJEXT): $(CCAN_DIR)/str/str.h
-miniprelude.$(OBJEXT): $(hdrdir)/ruby.h
-miniprelude.$(OBJEXT): $(hdrdir)/ruby/ruby.h
-miniprelude.$(OBJEXT): {$(VPATH)}assert.h
-miniprelude.$(OBJEXT): {$(VPATH)}ast.rb
-miniprelude.$(OBJEXT): {$(VPATH)}atomic.h
-miniprelude.$(OBJEXT): {$(VPATH)}config.h
-miniprelude.$(OBJEXT): {$(VPATH)}defines.h
-miniprelude.$(OBJEXT): {$(VPATH)}gc.rb
-miniprelude.$(OBJEXT): {$(VPATH)}id.h
-miniprelude.$(OBJEXT): {$(VPATH)}intern.h
-miniprelude.$(OBJEXT): {$(VPATH)}internal.h
-miniprelude.$(OBJEXT): {$(VPATH)}io.rb
-miniprelude.$(OBJEXT): {$(VPATH)}iseq.h
-miniprelude.$(OBJEXT): {$(VPATH)}method.h
-miniprelude.$(OBJEXT): {$(VPATH)}miniprelude.c
-miniprelude.$(OBJEXT): {$(VPATH)}missing.h
-miniprelude.$(OBJEXT): {$(VPATH)}node.h
-miniprelude.$(OBJEXT): {$(VPATH)}pack.rb
-miniprelude.$(OBJEXT): {$(VPATH)}prelude.rb
-miniprelude.$(OBJEXT): {$(VPATH)}ruby_assert.h
-miniprelude.$(OBJEXT): {$(VPATH)}ruby_atomic.h
-miniprelude.$(OBJEXT): {$(VPATH)}st.h
-miniprelude.$(OBJEXT): {$(VPATH)}subst.h
-miniprelude.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
-miniprelude.$(OBJEXT): {$(VPATH)}thread_native.h
-miniprelude.$(OBJEXT): {$(VPATH)}trace_point.rb
-miniprelude.$(OBJEXT): {$(VPATH)}vm_core.h
-miniprelude.$(OBJEXT): {$(VPATH)}vm_opts.h
mjit.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
mjit.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
mjit.$(OBJEXT): $(CCAN_DIR)/list/list.h
@@ -9097,30 +9619,6 @@ mjit.$(OBJEXT): {$(VPATH)}vm_debug.h
mjit.$(OBJEXT): {$(VPATH)}vm_opts.h
mjit.$(OBJEXT): {$(VPATH)}vm_sync.h
mjit.$(OBJEXT): {$(VPATH)}yjit.h
-mjit_build_dir.$(OBJEXT): {$(VPATH)}config.h
-mjit_build_dir.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
-mjit_build_dir.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
-mjit_build_dir.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
-mjit_build_dir.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
-mjit_build_dir.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
-mjit_build_dir.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
-mjit_build_dir.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
-mjit_build_dir.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
-mjit_build_dir.$(OBJEXT): {$(VPATH)}internal/config.h
-mjit_build_dir.$(OBJEXT): {$(VPATH)}ruby-runner.c
-mjit_build_dir.$(OBJEXT): {$(VPATH)}ruby-runner.h
-mjit_build_dir.so-ruby-runner.$(OBJEXT): {$(VPATH)}config.h
-mjit_build_dir.so-ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_is.h
-mjit_build_dir.so-ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_is/apple.h
-mjit_build_dir.so-ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_is/clang.h
-mjit_build_dir.so-ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_is/gcc.h
-mjit_build_dir.so-ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
-mjit_build_dir.so-ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
-mjit_build_dir.so-ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
-mjit_build_dir.so-ruby-runner.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
-mjit_build_dir.so-ruby-runner.$(OBJEXT): {$(VPATH)}internal/config.h
-mjit_build_dir.so-ruby-runner.$(OBJEXT): {$(VPATH)}ruby-runner.c
-mjit_build_dir.so-ruby-runner.$(OBJEXT): {$(VPATH)}ruby-runner.h
mjit_compile.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
mjit_compile.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
mjit_compile.$(OBJEXT): $(CCAN_DIR)/list/list.h
@@ -9326,7 +9824,6 @@ node.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
node.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
node.$(OBJEXT): $(CCAN_DIR)/list/list.h
node.$(OBJEXT): $(CCAN_DIR)/str/str.h
-node.$(OBJEXT): $(hdrdir)/ruby.h
node.$(OBJEXT): $(hdrdir)/ruby/ruby.h
node.$(OBJEXT): $(top_srcdir)/internal/array.h
node.$(OBJEXT): $(top_srcdir)/internal/compilers.h
@@ -9508,7 +10005,6 @@ node.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
node.$(OBJEXT): {$(VPATH)}thread_native.h
node.$(OBJEXT): {$(VPATH)}vm_core.h
node.$(OBJEXT): {$(VPATH)}vm_opts.h
-numeric.$(OBJEXT): $(hdrdir)/ruby.h
numeric.$(OBJEXT): $(hdrdir)/ruby/ruby.h
numeric.$(OBJEXT): $(top_srcdir)/internal/array.h
numeric.$(OBJEXT): $(top_srcdir)/internal/bignum.h
@@ -9523,9 +10019,9 @@ numeric.$(OBJEXT): $(top_srcdir)/internal/hash.h
numeric.$(OBJEXT): $(top_srcdir)/internal/numeric.h
numeric.$(OBJEXT): $(top_srcdir)/internal/object.h
numeric.$(OBJEXT): $(top_srcdir)/internal/rational.h
-numeric.$(OBJEXT): $(top_srcdir)/internal/string.h
numeric.$(OBJEXT): $(top_srcdir)/internal/serial.h
numeric.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
+numeric.$(OBJEXT): $(top_srcdir)/internal/string.h
numeric.$(OBJEXT): $(top_srcdir)/internal/util.h
numeric.$(OBJEXT): $(top_srcdir)/internal/variable.h
numeric.$(OBJEXT): $(top_srcdir)/internal/vm.h
@@ -9600,7 +10096,6 @@ numeric.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
numeric.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
numeric.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
numeric.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
-numeric.$(OBJEXT): {$(VPATH)}internal/compilers.h
numeric.$(OBJEXT): {$(VPATH)}internal/config.h
numeric.$(OBJEXT): {$(VPATH)}internal/constant_p.h
numeric.$(OBJEXT): {$(VPATH)}internal/core.h
@@ -9708,7 +10203,6 @@ numeric.$(OBJEXT): {$(VPATH)}ruby_assert.h
numeric.$(OBJEXT): {$(VPATH)}st.h
numeric.$(OBJEXT): {$(VPATH)}subst.h
numeric.$(OBJEXT): {$(VPATH)}util.h
-object.$(OBJEXT): $(hdrdir)/ruby.h
object.$(OBJEXT): $(hdrdir)/ruby/ruby.h
object.$(OBJEXT): $(top_srcdir)/internal/array.h
object.$(OBJEXT): $(top_srcdir)/internal/bignum.h
@@ -9900,7 +10394,6 @@ object.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
object.$(OBJEXT): {$(VPATH)}kernel.rb
object.$(OBJEXT): {$(VPATH)}kernel.rbinc
object.$(OBJEXT): {$(VPATH)}missing.h
-object.$(OBJEXT): {$(VPATH)}nilclass.rb
object.$(OBJEXT): {$(VPATH)}nilclass.rbinc
object.$(OBJEXT): {$(VPATH)}object.c
object.$(OBJEXT): {$(VPATH)}onigmo.h
@@ -9910,7 +10403,6 @@ object.$(OBJEXT): {$(VPATH)}probes.h
object.$(OBJEXT): {$(VPATH)}st.h
object.$(OBJEXT): {$(VPATH)}subst.h
object.$(OBJEXT): {$(VPATH)}util.h
-pack.$(OBJEXT): $(hdrdir)/ruby.h
pack.$(OBJEXT): $(hdrdir)/ruby/ruby.h
pack.$(OBJEXT): $(top_srcdir)/internal/array.h
pack.$(OBJEXT): $(top_srcdir)/internal/bits.h
@@ -10094,7 +10586,6 @@ pack.$(OBJEXT): {$(VPATH)}pack.rbinc
pack.$(OBJEXT): {$(VPATH)}st.h
pack.$(OBJEXT): {$(VPATH)}subst.h
pack.$(OBJEXT): {$(VPATH)}util.h
-parse.$(OBJEXT): $(hdrdir)/ruby.h
parse.$(OBJEXT): $(hdrdir)/ruby/ruby.h
parse.$(OBJEXT): $(top_srcdir)/internal/array.h
parse.$(OBJEXT): $(top_srcdir)/internal/bignum.h
@@ -10306,38 +10797,10 @@ parse.$(OBJEXT): {$(VPATH)}st.h
parse.$(OBJEXT): {$(VPATH)}subst.h
parse.$(OBJEXT): {$(VPATH)}symbol.h
parse.$(OBJEXT): {$(VPATH)}util.h
-prelude.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
-prelude.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
-prelude.$(OBJEXT): $(CCAN_DIR)/list/list.h
-prelude.$(OBJEXT): $(CCAN_DIR)/str/str.h
-prelude.$(OBJEXT): $(hdrdir)/ruby.h
-prelude.$(OBJEXT): $(hdrdir)/ruby/ruby.h
-prelude.$(OBJEXT): {$(VPATH)}assert.h
-prelude.$(OBJEXT): {$(VPATH)}atomic.h
-prelude.$(OBJEXT): {$(VPATH)}config.h
-prelude.$(OBJEXT): {$(VPATH)}defines.h
-prelude.$(OBJEXT): {$(VPATH)}gem_prelude.rb
-prelude.$(OBJEXT): {$(VPATH)}id.h
-prelude.$(OBJEXT): {$(VPATH)}intern.h
-prelude.$(OBJEXT): {$(VPATH)}internal.h
-prelude.$(OBJEXT): {$(VPATH)}iseq.h
-prelude.$(OBJEXT): {$(VPATH)}method.h
-prelude.$(OBJEXT): {$(VPATH)}missing.h
-prelude.$(OBJEXT): {$(VPATH)}node.h
-prelude.$(OBJEXT): {$(VPATH)}prelude.c
-prelude.$(OBJEXT): {$(VPATH)}ruby_assert.h
-prelude.$(OBJEXT): {$(VPATH)}ruby_atomic.h
-prelude.$(OBJEXT): {$(VPATH)}st.h
-prelude.$(OBJEXT): {$(VPATH)}subst.h
-prelude.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
-prelude.$(OBJEXT): {$(VPATH)}thread_native.h
-prelude.$(OBJEXT): {$(VPATH)}vm_core.h
-prelude.$(OBJEXT): {$(VPATH)}vm_opts.h
proc.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
proc.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
proc.$(OBJEXT): $(CCAN_DIR)/list/list.h
proc.$(OBJEXT): $(CCAN_DIR)/str/str.h
-proc.$(OBJEXT): $(hdrdir)/ruby.h
proc.$(OBJEXT): $(hdrdir)/ruby/ruby.h
proc.$(OBJEXT): $(top_srcdir)/internal/array.h
proc.$(OBJEXT): $(top_srcdir)/internal/class.h
@@ -10545,7 +11008,6 @@ process.$(OBJEXT): $(CCAN_DIR)/list/list.h
process.$(OBJEXT): $(CCAN_DIR)/str/str.h
process.$(OBJEXT): $(hdrdir)/ruby.h
process.$(OBJEXT): $(hdrdir)/ruby/ruby.h
-process.$(OBJEXT): $(top_srcdir)/include/ruby/fiber/scheduler.h
process.$(OBJEXT): $(top_srcdir)/internal/array.h
process.$(OBJEXT): $(top_srcdir)/internal/bignum.h
process.$(OBJEXT): $(top_srcdir)/internal/bits.h
@@ -10568,7 +11030,6 @@ process.$(OBJEXT): $(top_srcdir)/internal/thread.h
process.$(OBJEXT): $(top_srcdir)/internal/variable.h
process.$(OBJEXT): $(top_srcdir)/internal/vm.h
process.$(OBJEXT): $(top_srcdir)/internal/warnings.h
-process.$(OBJEXT): {$(VPATH)}$(COROUTINE_H)
process.$(OBJEXT): {$(VPATH)}assert.h
process.$(OBJEXT): {$(VPATH)}atomic.h
process.$(OBJEXT): {$(VPATH)}backward/2/assume.h
@@ -10798,9 +11259,7 @@ ractor.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
ractor.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
ractor.$(OBJEXT): {$(VPATH)}builtin.h
ractor.$(OBJEXT): {$(VPATH)}config.h
-ractor.$(OBJEXT): {$(VPATH)}constant.h
ractor.$(OBJEXT): {$(VPATH)}darray.h
-ractor.$(OBJEXT): {$(VPATH)}debug.h
ractor.$(OBJEXT): {$(VPATH)}debug_counter.h
ractor.$(OBJEXT): {$(VPATH)}defines.h
ractor.$(OBJEXT): {$(VPATH)}encoding.h
@@ -10981,20 +11440,17 @@ ractor.$(OBJEXT): {$(VPATH)}vm_debug.h
ractor.$(OBJEXT): {$(VPATH)}vm_opts.h
ractor.$(OBJEXT): {$(VPATH)}vm_sync.h
ractor.$(OBJEXT): {$(VPATH)}yjit.h
-random.$(OBJEXT): $(hdrdir)/ruby.h
random.$(OBJEXT): $(hdrdir)/ruby/ruby.h
random.$(OBJEXT): $(top_srcdir)/internal/array.h
random.$(OBJEXT): $(top_srcdir)/internal/bignum.h
random.$(OBJEXT): $(top_srcdir)/internal/bits.h
random.$(OBJEXT): $(top_srcdir)/internal/compilers.h
-random.$(OBJEXT): $(top_srcdir)/internal/error.h
random.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
random.$(OBJEXT): $(top_srcdir)/internal/numeric.h
random.$(OBJEXT): $(top_srcdir)/internal/random.h
random.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
random.$(OBJEXT): $(top_srcdir)/internal/serial.h
random.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
-random.$(OBJEXT): $(top_srcdir)/internal/string.h
random.$(OBJEXT): $(top_srcdir)/internal/variable.h
random.$(OBJEXT): $(top_srcdir)/internal/vm.h
random.$(OBJEXT): $(top_srcdir)/internal/warnings.h
@@ -11012,7 +11468,6 @@ random.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
random.$(OBJEXT): {$(VPATH)}config.h
random.$(OBJEXT): {$(VPATH)}constant.h
random.$(OBJEXT): {$(VPATH)}defines.h
-random.$(OBJEXT): {$(VPATH)}encoding.h
random.$(OBJEXT): {$(VPATH)}id_table.h
random.$(OBJEXT): {$(VPATH)}intern.h
random.$(OBJEXT): {$(VPATH)}internal.h
@@ -11157,8 +11612,6 @@ random.$(OBJEXT): {$(VPATH)}internal/warning_push.h
random.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
random.$(OBJEXT): {$(VPATH)}missing.h
random.$(OBJEXT): {$(VPATH)}mt19937.c
-random.$(OBJEXT): {$(VPATH)}onigmo.h
-random.$(OBJEXT): {$(VPATH)}oniguruma.h
random.$(OBJEXT): {$(VPATH)}ractor.h
random.$(OBJEXT): {$(VPATH)}random.c
random.$(OBJEXT): {$(VPATH)}random.h
@@ -11167,7 +11620,6 @@ random.$(OBJEXT): {$(VPATH)}siphash.c
random.$(OBJEXT): {$(VPATH)}siphash.h
random.$(OBJEXT): {$(VPATH)}st.h
random.$(OBJEXT): {$(VPATH)}subst.h
-range.$(OBJEXT): $(hdrdir)/ruby.h
range.$(OBJEXT): $(hdrdir)/ruby/ruby.h
range.$(OBJEXT): $(top_srcdir)/internal/array.h
range.$(OBJEXT): $(top_srcdir)/internal/bignum.h
@@ -11357,7 +11809,6 @@ range.$(OBJEXT): {$(VPATH)}oniguruma.h
range.$(OBJEXT): {$(VPATH)}range.c
range.$(OBJEXT): {$(VPATH)}st.h
range.$(OBJEXT): {$(VPATH)}subst.h
-rational.$(OBJEXT): $(hdrdir)/ruby.h
rational.$(OBJEXT): $(hdrdir)/ruby/ruby.h
rational.$(OBJEXT): $(top_srcdir)/internal/array.h
rational.$(OBJEXT): $(top_srcdir)/internal/bignum.h
@@ -11365,7 +11816,6 @@ rational.$(OBJEXT): $(top_srcdir)/internal/bits.h
rational.$(OBJEXT): $(top_srcdir)/internal/class.h
rational.$(OBJEXT): $(top_srcdir)/internal/compilers.h
rational.$(OBJEXT): $(top_srcdir)/internal/complex.h
-rational.$(OBJEXT): $(top_srcdir)/internal/error.h
rational.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
rational.$(OBJEXT): $(top_srcdir)/internal/gc.h
rational.$(OBJEXT): $(top_srcdir)/internal/numeric.h
@@ -11373,7 +11823,6 @@ rational.$(OBJEXT): $(top_srcdir)/internal/object.h
rational.$(OBJEXT): $(top_srcdir)/internal/rational.h
rational.$(OBJEXT): $(top_srcdir)/internal/serial.h
rational.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
-rational.$(OBJEXT): $(top_srcdir)/internal/string.h
rational.$(OBJEXT): $(top_srcdir)/internal/vm.h
rational.$(OBJEXT): $(top_srcdir)/internal/warnings.h
rational.$(OBJEXT): {$(VPATH)}assert.h
@@ -11388,7 +11837,6 @@ rational.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
rational.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
rational.$(OBJEXT): {$(VPATH)}config.h
rational.$(OBJEXT): {$(VPATH)}defines.h
-rational.$(OBJEXT): {$(VPATH)}encoding.h
rational.$(OBJEXT): {$(VPATH)}id.h
rational.$(OBJEXT): {$(VPATH)}id_table.h
rational.$(OBJEXT): {$(VPATH)}intern.h
@@ -11533,17 +11981,13 @@ rational.$(OBJEXT): {$(VPATH)}internal/variable.h
rational.$(OBJEXT): {$(VPATH)}internal/warning_push.h
rational.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
rational.$(OBJEXT): {$(VPATH)}missing.h
-rational.$(OBJEXT): {$(VPATH)}onigmo.h
-rational.$(OBJEXT): {$(VPATH)}oniguruma.h
rational.$(OBJEXT): {$(VPATH)}rational.c
rational.$(OBJEXT): {$(VPATH)}ruby_assert.h
rational.$(OBJEXT): {$(VPATH)}st.h
rational.$(OBJEXT): {$(VPATH)}subst.h
-re.$(OBJEXT): $(hdrdir)/ruby.h
re.$(OBJEXT): $(hdrdir)/ruby/ruby.h
re.$(OBJEXT): $(top_srcdir)/internal/array.h
re.$(OBJEXT): $(top_srcdir)/internal/compilers.h
-re.$(OBJEXT): $(top_srcdir)/internal/error.h
re.$(OBJEXT): $(top_srcdir)/internal/gc.h
re.$(OBJEXT): $(top_srcdir)/internal/hash.h
re.$(OBJEXT): $(top_srcdir)/internal/imemo.h
@@ -11735,7 +12179,6 @@ regcomp.$(OBJEXT): {$(VPATH)}assert.h
regcomp.$(OBJEXT): {$(VPATH)}backward/2/assume.h
regcomp.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
regcomp.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-regcomp.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
regcomp.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
regcomp.$(OBJEXT): {$(VPATH)}backward/2/limits.h
regcomp.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
@@ -11896,7 +12339,6 @@ regenc.$(OBJEXT): {$(VPATH)}assert.h
regenc.$(OBJEXT): {$(VPATH)}backward/2/assume.h
regenc.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
regenc.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-regenc.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
regenc.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
regenc.$(OBJEXT): {$(VPATH)}backward/2/limits.h
regenc.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
@@ -12056,7 +12498,6 @@ regerror.$(OBJEXT): {$(VPATH)}assert.h
regerror.$(OBJEXT): {$(VPATH)}backward/2/assume.h
regerror.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
regerror.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-regerror.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
regerror.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
regerror.$(OBJEXT): {$(VPATH)}backward/2/limits.h
regerror.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
@@ -12216,7 +12657,6 @@ regexec.$(OBJEXT): {$(VPATH)}assert.h
regexec.$(OBJEXT): {$(VPATH)}backward/2/assume.h
regexec.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
regexec.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-regexec.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
regexec.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
regexec.$(OBJEXT): {$(VPATH)}backward/2/limits.h
regexec.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
@@ -12376,7 +12816,6 @@ regparse.$(OBJEXT): {$(VPATH)}assert.h
regparse.$(OBJEXT): {$(VPATH)}backward/2/assume.h
regparse.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
regparse.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-regparse.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
regparse.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
regparse.$(OBJEXT): {$(VPATH)}backward/2/limits.h
regparse.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
@@ -12537,7 +12976,6 @@ regsyntax.$(OBJEXT): {$(VPATH)}assert.h
regsyntax.$(OBJEXT): {$(VPATH)}backward/2/assume.h
regsyntax.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
regsyntax.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-regsyntax.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
regsyntax.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
regsyntax.$(OBJEXT): {$(VPATH)}backward/2/limits.h
regsyntax.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
@@ -12927,7 +13365,6 @@ scheduler.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
scheduler.$(OBJEXT): $(CCAN_DIR)/list/list.h
scheduler.$(OBJEXT): $(CCAN_DIR)/str/str.h
scheduler.$(OBJEXT): $(hdrdir)/ruby/ruby.h
-scheduler.$(OBJEXT): $(top_srcdir)/include/ruby/fiber/scheduler.h
scheduler.$(OBJEXT): $(top_srcdir)/internal/array.h
scheduler.$(OBJEXT): $(top_srcdir)/internal/compilers.h
scheduler.$(OBJEXT): $(top_srcdir)/internal/gc.h
@@ -12954,7 +13391,6 @@ scheduler.$(OBJEXT): {$(VPATH)}defines.h
scheduler.$(OBJEXT): {$(VPATH)}encoding.h
scheduler.$(OBJEXT): {$(VPATH)}fiber/scheduler.h
scheduler.$(OBJEXT): {$(VPATH)}id.h
-scheduler.$(OBJEXT): {$(VPATH)}include/ruby/fiber/scheduler.h
scheduler.$(OBJEXT): {$(VPATH)}intern.h
scheduler.$(OBJEXT): {$(VPATH)}internal.h
scheduler.$(OBJEXT): {$(VPATH)}internal/anyargs.h
@@ -13127,7 +13563,6 @@ setproctitle.$(OBJEXT): {$(VPATH)}assert.h
setproctitle.$(OBJEXT): {$(VPATH)}backward/2/assume.h
setproctitle.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
setproctitle.$(OBJEXT): {$(VPATH)}backward/2/bool.h
-setproctitle.$(OBJEXT): {$(VPATH)}backward/2/gcc_version_since.h
setproctitle.$(OBJEXT): {$(VPATH)}backward/2/inttypes.h
setproctitle.$(OBJEXT): {$(VPATH)}backward/2/limits.h
setproctitle.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
@@ -13284,7 +13719,6 @@ signal.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
signal.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
signal.$(OBJEXT): $(CCAN_DIR)/list/list.h
signal.$(OBJEXT): $(CCAN_DIR)/str/str.h
-signal.$(OBJEXT): $(hdrdir)/ruby.h
signal.$(OBJEXT): $(hdrdir)/ruby/ruby.h
signal.$(OBJEXT): $(top_srcdir)/internal/array.h
signal.$(OBJEXT): $(top_srcdir)/internal/compilers.h
@@ -13485,7 +13919,6 @@ signal.$(OBJEXT): {$(VPATH)}thread_native.h
signal.$(OBJEXT): {$(VPATH)}vm_core.h
signal.$(OBJEXT): {$(VPATH)}vm_debug.h
signal.$(OBJEXT): {$(VPATH)}vm_opts.h
-sprintf.$(OBJEXT): $(hdrdir)/ruby.h
sprintf.$(OBJEXT): $(hdrdir)/ruby/ruby.h
sprintf.$(OBJEXT): $(top_srcdir)/internal/bignum.h
sprintf.$(OBJEXT): $(top_srcdir)/internal/bits.h
@@ -13680,7 +14113,6 @@ sprintf.$(OBJEXT): {$(VPATH)}st.h
sprintf.$(OBJEXT): {$(VPATH)}subst.h
sprintf.$(OBJEXT): {$(VPATH)}util.h
sprintf.$(OBJEXT): {$(VPATH)}vsnprintf.c
-st.$(OBJEXT): $(hdrdir)/ruby.h
st.$(OBJEXT): $(hdrdir)/ruby/ruby.h
st.$(OBJEXT): $(top_srcdir)/internal/bits.h
st.$(OBJEXT): $(top_srcdir)/internal/compilers.h
@@ -13845,7 +14277,6 @@ st.$(OBJEXT): {$(VPATH)}missing.h
st.$(OBJEXT): {$(VPATH)}st.c
st.$(OBJEXT): {$(VPATH)}st.h
st.$(OBJEXT): {$(VPATH)}subst.h
-strftime.$(OBJEXT): $(hdrdir)/ruby.h
strftime.$(OBJEXT): $(hdrdir)/ruby/ruby.h
strftime.$(OBJEXT): $(top_srcdir)/internal/compilers.h
strftime.$(OBJEXT): $(top_srcdir)/internal/serial.h
@@ -14023,7 +14454,6 @@ strftime.$(OBJEXT): {$(VPATH)}strftime.c
strftime.$(OBJEXT): {$(VPATH)}subst.h
strftime.$(OBJEXT): {$(VPATH)}timev.h
strftime.$(OBJEXT): {$(VPATH)}util.h
-string.$(OBJEXT): $(hdrdir)/ruby.h
string.$(OBJEXT): $(hdrdir)/ruby/ruby.h
string.$(OBJEXT): $(top_srcdir)/internal/array.h
string.$(OBJEXT): $(top_srcdir)/internal/bignum.h
@@ -14058,7 +14488,6 @@ string.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
string.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
string.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
string.$(OBJEXT): {$(VPATH)}config.h
-string.$(OBJEXT): {$(VPATH)}crypt.h
string.$(OBJEXT): {$(VPATH)}debug_counter.h
string.$(OBJEXT): {$(VPATH)}defines.h
string.$(OBJEXT): {$(VPATH)}encindex.h
@@ -14218,7 +14647,6 @@ string.$(OBJEXT): {$(VPATH)}internal/variable.h
string.$(OBJEXT): {$(VPATH)}internal/warning_push.h
string.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
string.$(OBJEXT): {$(VPATH)}missing.h
-string.$(OBJEXT): {$(VPATH)}node.h
string.$(OBJEXT): {$(VPATH)}onigmo.h
string.$(OBJEXT): {$(VPATH)}oniguruma.h
string.$(OBJEXT): {$(VPATH)}probes.dmyh
@@ -14267,7 +14695,6 @@ struct.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
struct.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
struct.$(OBJEXT): $(CCAN_DIR)/list/list.h
struct.$(OBJEXT): $(CCAN_DIR)/str/str.h
-struct.$(OBJEXT): $(hdrdir)/ruby.h
struct.$(OBJEXT): $(hdrdir)/ruby/ruby.h
struct.$(OBJEXT): $(top_srcdir)/internal/array.h
struct.$(OBJEXT): $(top_srcdir)/internal/class.h
@@ -14468,7 +14895,6 @@ struct.$(OBJEXT): {$(VPATH)}thread_native.h
struct.$(OBJEXT): {$(VPATH)}transient_heap.h
struct.$(OBJEXT): {$(VPATH)}vm_core.h
struct.$(OBJEXT): {$(VPATH)}vm_opts.h
-symbol.$(OBJEXT): $(hdrdir)/ruby.h
symbol.$(OBJEXT): $(hdrdir)/ruby/ruby.h
symbol.$(OBJEXT): $(top_srcdir)/internal/class.h
symbol.$(OBJEXT): $(top_srcdir)/internal/compilers.h
@@ -14652,7 +15078,6 @@ symbol.$(OBJEXT): {$(VPATH)}internal/variable.h
symbol.$(OBJEXT): {$(VPATH)}internal/warning_push.h
symbol.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
symbol.$(OBJEXT): {$(VPATH)}missing.h
-symbol.$(OBJEXT): {$(VPATH)}node.h
symbol.$(OBJEXT): {$(VPATH)}onigmo.h
symbol.$(OBJEXT): {$(VPATH)}oniguruma.h
symbol.$(OBJEXT): {$(VPATH)}probes.dmyh
@@ -14670,7 +15095,6 @@ thread.$(OBJEXT): $(CCAN_DIR)/list/list.h
thread.$(OBJEXT): $(CCAN_DIR)/str/str.h
thread.$(OBJEXT): $(hdrdir)/ruby.h
thread.$(OBJEXT): $(hdrdir)/ruby/ruby.h
-thread.$(OBJEXT): $(top_srcdir)/include/ruby/fiber/scheduler.h
thread.$(OBJEXT): $(top_srcdir)/internal/array.h
thread.$(OBJEXT): $(top_srcdir)/internal/bits.h
thread.$(OBJEXT): $(top_srcdir)/internal/class.h
@@ -14691,7 +15115,6 @@ thread.$(OBJEXT): $(top_srcdir)/internal/thread.h
thread.$(OBJEXT): $(top_srcdir)/internal/time.h
thread.$(OBJEXT): $(top_srcdir)/internal/vm.h
thread.$(OBJEXT): $(top_srcdir)/internal/warnings.h
-thread.$(OBJEXT): {$(VPATH)}$(COROUTINE_H)
thread.$(OBJEXT): {$(VPATH)}assert.h
thread.$(OBJEXT): {$(VPATH)}atomic.h
thread.$(OBJEXT): {$(VPATH)}backward/2/assume.h
@@ -14891,7 +15314,6 @@ thread.$(OBJEXT): {$(VPATH)}vm_debug.h
thread.$(OBJEXT): {$(VPATH)}vm_opts.h
thread.$(OBJEXT): {$(VPATH)}vm_sync.h
thread.$(OBJEXT): {$(VPATH)}yjit.h
-time.$(OBJEXT): $(hdrdir)/ruby.h
time.$(OBJEXT): $(hdrdir)/ruby/ruby.h
time.$(OBJEXT): $(top_srcdir)/internal/array.h
time.$(OBJEXT): $(top_srcdir)/internal/bignum.h
@@ -15085,7 +15507,6 @@ time.$(OBJEXT): {$(VPATH)}subst.h
time.$(OBJEXT): {$(VPATH)}time.c
time.$(OBJEXT): {$(VPATH)}timev.h
time.$(OBJEXT): {$(VPATH)}timev.rbinc
-transcode.$(OBJEXT): $(hdrdir)/ruby.h
transcode.$(OBJEXT): $(hdrdir)/ruby/ruby.h
transcode.$(OBJEXT): $(top_srcdir)/internal/array.h
transcode.$(OBJEXT): $(top_srcdir)/internal/class.h
@@ -15270,26 +15691,16 @@ transcode.$(OBJEXT): {$(VPATH)}st.h
transcode.$(OBJEXT): {$(VPATH)}subst.h
transcode.$(OBJEXT): {$(VPATH)}transcode.c
transcode.$(OBJEXT): {$(VPATH)}transcode_data.h
-transient_heap.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
-transient_heap.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
-transient_heap.$(OBJEXT): $(CCAN_DIR)/list/list.h
-transient_heap.$(OBJEXT): $(CCAN_DIR)/str/str.h
-transient_heap.$(OBJEXT): $(hdrdir)/ruby.h
transient_heap.$(OBJEXT): $(hdrdir)/ruby/ruby.h
-transient_heap.$(OBJEXT): $(top_srcdir)/internal/array.h
transient_heap.$(OBJEXT): $(top_srcdir)/internal/compilers.h
transient_heap.$(OBJEXT): $(top_srcdir)/internal/gc.h
transient_heap.$(OBJEXT): $(top_srcdir)/internal/hash.h
-transient_heap.$(OBJEXT): $(top_srcdir)/internal/imemo.h
transient_heap.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
-transient_heap.$(OBJEXT): $(top_srcdir)/internal/serial.h
transient_heap.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
transient_heap.$(OBJEXT): $(top_srcdir)/internal/struct.h
transient_heap.$(OBJEXT): $(top_srcdir)/internal/variable.h
-transient_heap.$(OBJEXT): $(top_srcdir)/internal/vm.h
transient_heap.$(OBJEXT): $(top_srcdir)/internal/warnings.h
transient_heap.$(OBJEXT): {$(VPATH)}assert.h
-transient_heap.$(OBJEXT): {$(VPATH)}atomic.h
transient_heap.$(OBJEXT): {$(VPATH)}backward/2/assume.h
transient_heap.$(OBJEXT): {$(VPATH)}backward/2/attributes.h
transient_heap.$(OBJEXT): {$(VPATH)}backward/2/bool.h
@@ -15305,7 +15716,6 @@ transient_heap.$(OBJEXT): {$(VPATH)}debug.h
transient_heap.$(OBJEXT): {$(VPATH)}debug_counter.h
transient_heap.$(OBJEXT): {$(VPATH)}defines.h
transient_heap.$(OBJEXT): {$(VPATH)}gc.h
-transient_heap.$(OBJEXT): {$(VPATH)}id.h
transient_heap.$(OBJEXT): {$(VPATH)}id_table.h
transient_heap.$(OBJEXT): {$(VPATH)}intern.h
transient_heap.$(OBJEXT): {$(VPATH)}internal.h
@@ -15448,22 +15858,14 @@ transient_heap.$(OBJEXT): {$(VPATH)}internal/value_type.h
transient_heap.$(OBJEXT): {$(VPATH)}internal/variable.h
transient_heap.$(OBJEXT): {$(VPATH)}internal/warning_push.h
transient_heap.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
-transient_heap.$(OBJEXT): {$(VPATH)}method.h
transient_heap.$(OBJEXT): {$(VPATH)}missing.h
-transient_heap.$(OBJEXT): {$(VPATH)}node.h
transient_heap.$(OBJEXT): {$(VPATH)}ruby_assert.h
-transient_heap.$(OBJEXT): {$(VPATH)}ruby_atomic.h
transient_heap.$(OBJEXT): {$(VPATH)}st.h
transient_heap.$(OBJEXT): {$(VPATH)}subst.h
-transient_heap.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
-transient_heap.$(OBJEXT): {$(VPATH)}thread_native.h
transient_heap.$(OBJEXT): {$(VPATH)}transient_heap.c
transient_heap.$(OBJEXT): {$(VPATH)}transient_heap.h
-transient_heap.$(OBJEXT): {$(VPATH)}vm_core.h
transient_heap.$(OBJEXT): {$(VPATH)}vm_debug.h
-transient_heap.$(OBJEXT): {$(VPATH)}vm_opts.h
transient_heap.$(OBJEXT): {$(VPATH)}vm_sync.h
-util.$(OBJEXT): $(hdrdir)/ruby.h
util.$(OBJEXT): $(hdrdir)/ruby/ruby.h
util.$(OBJEXT): $(top_srcdir)/internal/compilers.h
util.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
@@ -15634,7 +16036,6 @@ variable.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
variable.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
variable.$(OBJEXT): $(CCAN_DIR)/list/list.h
variable.$(OBJEXT): $(CCAN_DIR)/str/str.h
-variable.$(OBJEXT): $(hdrdir)/ruby.h
variable.$(OBJEXT): $(hdrdir)/ruby/ruby.h
variable.$(OBJEXT): $(top_srcdir)/internal/array.h
variable.$(OBJEXT): $(top_srcdir)/internal/class.h
@@ -15872,7 +16273,6 @@ version.$(OBJEXT): {$(VPATH)}backward/2/limits.h
version.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
version.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
version.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
-version.$(OBJEXT): {$(VPATH)}builtin.h
version.$(OBJEXT): {$(VPATH)}config.h
version.$(OBJEXT): {$(VPATH)}darray.h
version.$(OBJEXT): {$(VPATH)}debug_counter.h
@@ -16030,13 +16430,9 @@ version.$(OBJEXT): {$(VPATH)}subst.h
version.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
version.$(OBJEXT): {$(VPATH)}thread_native.h
version.$(OBJEXT): {$(VPATH)}version.c
-version.$(OBJEXT): {$(VPATH)}vm_callinfo.h
version.$(OBJEXT): {$(VPATH)}vm_core.h
version.$(OBJEXT): {$(VPATH)}vm_opts.h
version.$(OBJEXT): {$(VPATH)}yjit.h
-version.$(OBJEXT): {$(VPATH)}yjit_asm.h
-version.$(OBJEXT): {$(VPATH)}yjit_core.h
-version.$(OBJEXT): {$(VPATH)}yjit_iface.h
vm.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
vm.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
vm.$(OBJEXT): $(CCAN_DIR)/list/list.h
@@ -16291,7 +16687,6 @@ vm_backtrace.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
vm_backtrace.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
vm_backtrace.$(OBJEXT): $(CCAN_DIR)/list/list.h
vm_backtrace.$(OBJEXT): $(CCAN_DIR)/str/str.h
-vm_backtrace.$(OBJEXT): $(hdrdir)/ruby.h
vm_backtrace.$(OBJEXT): $(hdrdir)/ruby/ruby.h
vm_backtrace.$(OBJEXT): $(top_srcdir)/internal/array.h
vm_backtrace.$(OBJEXT): $(top_srcdir)/internal/compilers.h
@@ -16490,7 +16885,6 @@ vm_dump.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
vm_dump.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
vm_dump.$(OBJEXT): $(CCAN_DIR)/list/list.h
vm_dump.$(OBJEXT): $(CCAN_DIR)/str/str.h
-vm_dump.$(OBJEXT): $(hdrdir)/ruby.h
vm_dump.$(OBJEXT): $(hdrdir)/ruby/ruby.h
vm_dump.$(OBJEXT): $(top_srcdir)/internal/array.h
vm_dump.$(OBJEXT): $(top_srcdir)/internal/compilers.h
@@ -16682,7 +17076,6 @@ vm_sync.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
vm_sync.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
vm_sync.$(OBJEXT): $(CCAN_DIR)/list/list.h
vm_sync.$(OBJEXT): $(CCAN_DIR)/str/str.h
-vm_sync.$(OBJEXT): $(hdrdir)/ruby.h
vm_sync.$(OBJEXT): $(hdrdir)/ruby/ruby.h
vm_sync.$(OBJEXT): $(top_srcdir)/internal/array.h
vm_sync.$(OBJEXT): $(top_srcdir)/internal/compilers.h
@@ -16692,7 +17085,6 @@ vm_sync.$(OBJEXT): $(top_srcdir)/internal/serial.h
vm_sync.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
vm_sync.$(OBJEXT): $(top_srcdir)/internal/vm.h
vm_sync.$(OBJEXT): $(top_srcdir)/internal/warnings.h
-vm_sync.$(OBJEXT): {$(VPATH)}addr2line.h
vm_sync.$(OBJEXT): {$(VPATH)}assert.h
vm_sync.$(OBJEXT): {$(VPATH)}atomic.h
vm_sync.$(OBJEXT): {$(VPATH)}backward/2/assume.h
@@ -16705,7 +17097,6 @@ vm_sync.$(OBJEXT): {$(VPATH)}backward/2/long_long.h
vm_sync.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h
vm_sync.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
vm_sync.$(OBJEXT): {$(VPATH)}config.h
-vm_sync.$(OBJEXT): {$(VPATH)}constant.h
vm_sync.$(OBJEXT): {$(VPATH)}darray.h
vm_sync.$(OBJEXT): {$(VPATH)}debug_counter.h
vm_sync.$(OBJEXT): {$(VPATH)}defines.h
@@ -16731,7 +17122,6 @@ vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/short.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/size_t.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/st_data_t.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/arithmetic/uid_t.h
-vm_sync.$(OBJEXT): {$(VPATH)}internal/array.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/assume.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/alloc_size.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/attr/artificial.h
@@ -16766,7 +17156,6 @@ vm_sync.$(OBJEXT): {$(VPATH)}internal/compiler_is/intel.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/compiler_is/msvc.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/compiler_is/sunpro.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/compiler_since.h
-vm_sync.$(OBJEXT): {$(VPATH)}internal/compilers.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/config.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/constant_p.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/core.h
@@ -16800,7 +17189,6 @@ vm_sync.$(OBJEXT): {$(VPATH)}internal/has/declspec_attribute.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/has/extension.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/has/feature.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/has/warning.h
-vm_sync.$(OBJEXT): {$(VPATH)}internal/imemo.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/array.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/bignum.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/intern/class.h
@@ -16846,7 +17234,6 @@ vm_sync.$(OBJEXT): {$(VPATH)}internal/module.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/newobj.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/rgengc.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/scan_args.h
-vm_sync.$(OBJEXT): {$(VPATH)}internal/serial.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/special_consts.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/static_assert.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/stdalign.h
@@ -16855,15 +17242,11 @@ vm_sync.$(OBJEXT): {$(VPATH)}internal/symbol.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/value.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/value_type.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/variable.h
-vm_sync.$(OBJEXT): {$(VPATH)}internal/vm.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/warning_push.h
-vm_sync.$(OBJEXT): {$(VPATH)}internal/warnings.h
vm_sync.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
-vm_sync.$(OBJEXT): {$(VPATH)}iseq.h
vm_sync.$(OBJEXT): {$(VPATH)}method.h
vm_sync.$(OBJEXT): {$(VPATH)}missing.h
vm_sync.$(OBJEXT): {$(VPATH)}node.h
-vm_sync.$(OBJEXT): {$(VPATH)}procstat_vm.c
vm_sync.$(OBJEXT): {$(VPATH)}ractor.h
vm_sync.$(OBJEXT): {$(VPATH)}ractor_core.h
vm_sync.$(OBJEXT): {$(VPATH)}ruby_assert.h
@@ -17100,6 +17483,7 @@ yjit.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
yjit.$(OBJEXT): $(top_srcdir)/internal/serial.h
yjit.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
yjit.$(OBJEXT): $(top_srcdir)/internal/string.h
+yjit.$(OBJEXT): $(top_srcdir)/internal/struct.h
yjit.$(OBJEXT): $(top_srcdir)/internal/variable.h
yjit.$(OBJEXT): $(top_srcdir)/internal/vm.h
yjit.$(OBJEXT): $(top_srcdir)/internal/warnings.h
diff --git a/compile.c b/compile.c
index a6505f82d6d17d..fc9f2eee6b3b7a 100644
--- a/compile.c
+++ b/compile.c
@@ -482,7 +482,7 @@ static int iseq_setup_insn(rb_iseq_t *iseq, LINK_ANCHOR *const anchor);
static int iseq_optimize(rb_iseq_t *iseq, LINK_ANCHOR *const anchor);
static int iseq_insns_unification(rb_iseq_t *iseq, LINK_ANCHOR *const anchor);
-static int iseq_set_local_table(rb_iseq_t *iseq, const ID *tbl);
+static int iseq_set_local_table(rb_iseq_t *iseq, const rb_ast_id_table_t *tbl);
static int iseq_set_exception_local_table(rb_iseq_t *iseq);
static int iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *const anchor, const NODE *const node);
@@ -753,7 +753,7 @@ rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node)
iseq_set_local_table(iseq, 0);
}
/* assume node is T_NODE */
- else if (nd_type(node) == NODE_SCOPE) {
+ else if (nd_type_p(node, NODE_SCOPE)) {
/* iseq type of top, method, class, block */
iseq_set_local_table(iseq, node->nd_tbl);
iseq_set_arguments(iseq, ret, node->nd_args);
@@ -1783,7 +1783,7 @@ iseq_set_arguments_keywords(rb_iseq_t *iseq, LINK_ANCHOR *const optargs,
dv = Qfalse;
break;
default:
- NO_CHECK(COMPILE_POPPED(optargs, "kwarg", node)); /* nd_type(node) == NODE_KW_ARG */
+ NO_CHECK(COMPILE_POPPED(optargs, "kwarg", node)); /* nd_type_p(node, NODE_KW_ARG) */
dv = complex_mark;
}
@@ -1946,21 +1946,13 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *const optargs, const NODE *cons
}
static int
-iseq_set_local_table(rb_iseq_t *iseq, const ID *tbl)
+iseq_set_local_table(rb_iseq_t *iseq, const rb_ast_id_table_t *tbl)
{
- unsigned int size;
-
- if (tbl) {
- size = (unsigned int)*tbl;
- tbl++;
- }
- else {
- size = 0;
- }
+ unsigned int size = tbl ? tbl->size : 0;
if (size > 0) {
ID *ids = (ID *)ALLOC_N(ID, size);
- MEMCPY(ids, tbl, ID, size);
+ MEMCPY(ids, tbl->ids, ID, size);
iseq->body->local_table = ids;
}
iseq->body->local_table_size = size;
@@ -3922,7 +3914,7 @@ compile_dstr_fragments(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *cons
while (list) {
const NODE *const head = list->nd_head;
- if (nd_type(head) == NODE_STR) {
+ if (nd_type_p(head, NODE_STR)) {
lit = rb_fstring(head->nd_lit);
ADD_INSN1(ret, head, putobject, lit);
RB_OBJ_WRITTEN(iseq, Qundef, lit);
@@ -3946,7 +3938,7 @@ compile_dstr_fragments(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *cons
static int
compile_block(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int popped)
{
- while (node && nd_type(node) == NODE_BLOCK) {
+ while (node && nd_type_p(node, NODE_BLOCK)) {
CHECK(COMPILE_(ret, "BLOCK body", node->nd_head,
(node->nd_next ? 1 : popped)));
node = node->nd_next;
@@ -4091,7 +4083,7 @@ compile_branch_condition(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *co
static int
keyword_node_p(const NODE *const node)
{
- return nd_type(node) == NODE_HASH && (node->nd_brace & HASH_BRACE) != HASH_BRACE;
+ return nd_type_p(node, NODE_HASH) && (node->nd_brace & HASH_BRACE) != HASH_BRACE;
}
static int
@@ -4102,7 +4094,7 @@ compile_keyword_arg(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
{
if (kw_arg_ptr == NULL) return FALSE;
- if (root_node->nd_head && nd_type(root_node->nd_head) == NODE_LIST) {
+ if (root_node->nd_head && nd_type_p(root_node->nd_head, NODE_LIST)) {
const NODE *node = root_node->nd_head;
int seen_nodes = 0;
@@ -4110,8 +4102,8 @@ compile_keyword_arg(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
const NODE *key_node = node->nd_head;
seen_nodes++;
- assert(nd_type(node) == NODE_LIST);
- if (key_node && nd_type(key_node) == NODE_LIT && SYMBOL_P(key_node->nd_lit)) {
+ assert(nd_type_p(node, NODE_LIST));
+ if (key_node && nd_type_p(key_node, NODE_LIT) && SYMBOL_P(key_node->nd_lit)) {
/* can be keywords */
}
else {
@@ -4232,7 +4224,7 @@ compile_array(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int pop
{
const NODE *line_node = node;
- if (nd_type(node) == NODE_ZLIST) {
+ if (nd_type_p(node, NODE_ZLIST)) {
if (!popped) {
ADD_INSN1(ret, line_node, newarray, INT2FIX(0));
}
@@ -4369,7 +4361,7 @@ compile_hash(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int meth
node = node->nd_head;
- if (!node || nd_type(node) == NODE_ZLIST) {
+ if (!node || nd_type_p(node, NODE_ZLIST)) {
if (!popped) {
ADD_INSN1(ret, line_node, newhash, INT2FIX(0));
}
@@ -4492,7 +4484,7 @@ compile_hash(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int meth
FLUSH_CHUNK();
const NODE *kw = node->nd_next->nd_head;
- int empty_kw = nd_type(kw) == NODE_LIT && RB_TYPE_P(kw->nd_lit, T_HASH); /* foo( ..., **{}, ...) */
+ int empty_kw = nd_type_p(kw, NODE_LIT) && RB_TYPE_P(kw->nd_lit, T_HASH); /* foo( ..., **{}, ...) */
int first_kw = first_chunk && stack_len == 0; /* foo(1,2,3, **kw, ...) */
int last_kw = !node->nd_next->nd_next; /* foo( ..., **kw) */
int only_kw = last_kw && first_kw; /* foo(1,2,3, **kw) */
@@ -4598,7 +4590,7 @@ when_vals(rb_iseq_t *iseq, LINK_ANCHOR *const cond_seq, const NODE *vals,
rb_hash_aset(literals, lit, (VALUE)(l1) | 1);
}
- if (nd_type(val) == NODE_STR) {
+ if (nd_type_p(val, NODE_STR)) {
debugp_param("nd_lit", val->nd_lit);
lit = rb_fstring(val->nd_lit);
ADD_INSN1(cond_seq, val, putobject, lit);
@@ -4892,7 +4884,7 @@ compile_massign_opt(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
mem[memindex++] = (v); \
}
- if (rhsn == 0 || nd_type(rhsn) != NODE_LIST) {
+ if (rhsn == 0 || !nd_type_p(rhsn, NODE_LIST)) {
return 0;
}
@@ -4960,7 +4952,7 @@ compile_massign0(rb_iseq_t *iseq, LINK_ANCHOR *const pre, LINK_ANCHOR *const rhs
}
if (lhs_splat) {
- if (nd_type(splatn) == NODE_POSTARG) {
+ if (nd_type_p(splatn, NODE_POSTARG)) {
/*a, b, *r, p1, p2 */
const NODE *postn = splatn->nd_2nd;
const NODE *restn = splatn->nd_1st;
@@ -5077,7 +5069,7 @@ compile_const_prefix(rb_iseq_t *iseq, const NODE *const node,
static int
compile_cpath(LINK_ANCHOR *const ret, rb_iseq_t *iseq, const NODE *cpath)
{
- if (nd_type(cpath) == NODE_COLON3) {
+ if (nd_type_p(cpath, NODE_COLON3)) {
/* toplevel class ::Foo */
ADD_INSN1(ret, cpath, putobject, rb_cObject);
return VM_DEFINECLASS_FLAG_SCOPED;
@@ -5098,7 +5090,7 @@ compile_cpath(LINK_ANCHOR *const ret, rb_iseq_t *iseq, const NODE *cpath)
static inline int
private_recv_p(const NODE *node)
{
- if (nd_type(node->nd_recv) == NODE_SELF) {
+ if (nd_type_p(node->nd_recv, NODE_SELF)) {
NODE *self = node->nd_recv;
return self->nd_state != 0;
}
@@ -5487,7 +5479,7 @@ check_keyword(const NODE *node)
{
/* This check is essentially a code clone of compile_keyword_arg. */
- if (nd_type(node) == NODE_LIST) {
+ if (nd_type_p(node, NODE_LIST)) {
while (node->nd_next) {
node = node->nd_next;
}
@@ -5511,9 +5503,9 @@ setup_args_core(rb_iseq_t *iseq, LINK_ANCHOR *const args, const NODE *argn,
}
case NODE_ARGSCAT:
case NODE_ARGSPUSH: {
- int next_is_list = (nd_type(argn->nd_head) == NODE_LIST);
+ int next_is_list = (nd_type_p(argn->nd_head, NODE_LIST));
VALUE argc = setup_args_core(iseq, args, argn->nd_head, 1, NULL, NULL);
- if (nd_type(argn->nd_body) == NODE_LIST) {
+ if (nd_type_p(argn->nd_body, NODE_LIST)) {
/* This branch is needed to avoid "newarraykwsplat" [Bug #16442] */
int rest_len = compile_args(iseq, args, argn->nd_body, NULL, NULL);
ADD_INSN1(args, argn, newarray, INT2FIX(rest_len));
@@ -5528,7 +5520,7 @@ setup_args_core(rb_iseq_t *iseq, LINK_ANCHOR *const args, const NODE *argn,
if (check_keyword(argn->nd_body))
*flag |= VM_CALL_KW_SPLAT;
}
- if (nd_type(argn) == NODE_ARGSCAT) {
+ if (nd_type_p(argn, NODE_ARGSCAT)) {
if (next_is_list) {
ADD_INSN1(args, argn, splatarray, Qtrue);
return INT2FIX(FIX2INT(argc) + 1);
@@ -5562,7 +5554,7 @@ setup_args(rb_iseq_t *iseq, LINK_ANCHOR *const args, const NODE *argn,
unsigned int *flag, struct rb_callinfo_kwarg **keywords)
{
VALUE ret;
- if (argn && nd_type(argn) == NODE_BLOCK_PASS) {
+ if (argn && nd_type_p(argn, NODE_BLOCK_PASS)) {
unsigned int dup_rest = 1;
DECL_ANCHOR(arg_block);
INIT_ANCHOR(arg_block);
@@ -5904,7 +5896,7 @@ compile_case2(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const orig_no
INIT_ANCHOR(body_seq);
endlabel = NEW_LABEL(nd_line(node));
- while (node && nd_type(node) == NODE_WHEN) {
+ while (node && nd_type_p(node, NODE_WHEN)) {
const int line = nd_line(node);
LABEL *l1 = NEW_LABEL(line);
ADD_LABEL(body_seq, l1);
@@ -6435,7 +6427,7 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
NODE *value_node = args->nd_next->nd_head;
VALUE key;
- if (nd_type(key_node) != NODE_LIT) {
+ if (!nd_type_p(key_node, NODE_LIT)) {
UNKNOWN_NODE("NODE_IN", key_node, COMPILE_NG);
}
key = key_node->nd_lit;
@@ -6603,7 +6595,7 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
match_succeeded = NEW_LABEL(line);
ADD_INSN(ret, line_node, dup);
- if (nd_type(node) == NODE_IF) {
+ if (nd_type_p(node, NODE_IF)) {
ADD_INSNL(ret, line_node, branchif, match_succeeded);
}
else {
@@ -6620,7 +6612,7 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
ADD_LABEL(ret, match_succeeded);
}
- if (nd_type(node) == NODE_IF) {
+ if (nd_type_p(node, NODE_IF)) {
ADD_INSNL(ret, line_node, branchunless, match_failed);
}
else {
@@ -6635,7 +6627,7 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
match_failed = NEW_LABEL(line);
n = node->nd_head;
- if (! (nd_type(n) == NODE_LIST && n->nd_alen == 2)) {
+ if (! (nd_type_p(n, NODE_LIST) && n->nd_alen == 2)) {
COMPILE_ERROR(ERROR_ARGS "unexpected node");
return COMPILE_NG;
}
@@ -7152,7 +7144,7 @@ compile_iter(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, in
const rb_iseq_t *child_iseq;
ADD_LABEL(ret, retry_label);
- if (nd_type(node) == NODE_FOR) {
+ if (nd_type_p(node, NODE_FOR)) {
CHECK(COMPILE(ret, "iter caller (for)", node->nd_iter));
ISEQ_COMPILE_DATA(iseq)->current_block = child_iseq =
@@ -7695,7 +7687,7 @@ compile_call_precheck_freeze(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE
/* optimization shortcut
* "literal".freeze -> opt_str_freeze("literal")
*/
- if (node->nd_recv && nd_type(node->nd_recv) == NODE_STR &&
+ if (node->nd_recv && nd_type_p(node->nd_recv, NODE_STR) &&
(node->nd_mid == idFreeze || node->nd_mid == idUMinus) &&
node->nd_args == NULL &&
ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
@@ -7719,8 +7711,8 @@ compile_call_precheck_freeze(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE
* obj["literal"] -> opt_aref_with(obj, "literal")
*/
if (node->nd_mid == idAREF && !private_recv_p(node) && node->nd_args &&
- nd_type(node->nd_args) == NODE_LIST && node->nd_args->nd_alen == 1 &&
- nd_type(node->nd_args->nd_head) == NODE_STR &&
+ nd_type_p(node->nd_args, NODE_LIST) && node->nd_args->nd_alen == 1 &&
+ nd_type_p(node->nd_args->nd_head, NODE_STR) &&
ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
!ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal &&
ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction) {
@@ -7858,11 +7850,11 @@ static int
compile_builtin_arg(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, const NODE *line_node, int popped)
{
if (!node) goto no_arg;
- if (nd_type(node) != NODE_LIST) goto bad_arg;
+ if (!nd_type_p(node, NODE_LIST)) goto bad_arg;
if (node->nd_next) goto too_many_arg;
node = node->nd_head;
if (!node) goto no_arg;
- if (nd_type(node) != NODE_LIT) goto bad_arg;
+ if (!nd_type_p(node, NODE_LIT)) goto bad_arg;
VALUE name = node->nd_lit;
if (!SYMBOL_P(name)) goto non_symbol_arg;
if (!popped) {
@@ -7908,17 +7900,20 @@ compile_builtin_mandatory_only_method(rb_iseq_t *iseq, const NODE *node, const N
// local table without non-mandatory parameters
const int skip_local_size = iseq->body->param.size - iseq->body->param.lead_num;
const int table_size = iseq->body->local_table_size - skip_local_size;
- ID *tbl = ALLOCA_N(ID, table_size + 1);
- tbl[0] = table_size;
+
+ VALUE idtmp = 0;
+ rb_ast_id_table_t *tbl = ALLOCV(idtmp, sizeof(rb_ast_id_table_t) + table_size * sizeof(ID));
+ tbl->size = table_size;
+
int i;
// lead parameters
for (i=0; ibody->param.lead_num; i++) {
- tbl[i+1] = iseq->body->local_table[i];
+ tbl->ids[i] = iseq->body->local_table[i];
}
// local variables
for (; ibody->local_table[i + skip_local_size];
+ tbl->ids[i] = iseq->body->local_table[i + skip_local_size];
}
NODE scope_node;
@@ -7939,6 +7934,7 @@ compile_builtin_mandatory_only_method(rb_iseq_t *iseq, const NODE *node, const N
ISEQ_TYPE_METHOD, ISEQ_COMPILE_DATA(iseq)->option);
GET_VM()->builtin_inline_index = prev_inline_index;
+ ALLOCV_END(idtmp);
return COMPILE_OK;
}
@@ -8064,7 +8060,7 @@ compile_call(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, co
INIT_ANCHOR(recv);
INIT_ANCHOR(args);
#if OPT_SUPPORT_JOKE
- if (nd_type(node) == NODE_VCALL) {
+ if (nd_type_p(node, NODE_VCALL)) {
ID id_bitblt;
ID id_answer;
@@ -8088,7 +8084,7 @@ compile_call(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, co
CONST_ID(goto_id, "__goto__");
CONST_ID(label_id, "__label__");
- if (nd_type(node) == NODE_FCALL &&
+ if (nd_type_p(node, NODE_FCALL) &&
(mid == goto_id || mid == label_id)) {
LABEL *label;
st_data_t data;
@@ -8099,7 +8095,7 @@ compile_call(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, co
labels_table = st_init_numtable();
ISEQ_COMPILE_DATA(iseq)->labels_table = labels_table;
}
- if (nd_type(node->nd_args->nd_head) == NODE_LIT &&
+ if (nd_type_p(node->nd_args->nd_head, NODE_LIT) &&
SYMBOL_P(node->nd_args->nd_head->nd_lit)) {
label_name = node->nd_args->nd_head->nd_lit;
@@ -8140,7 +8136,7 @@ compile_call(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, co
int idx, level;
if (mid == idCall &&
- nd_type(node->nd_recv) == NODE_LVAR &&
+ nd_type_p(node->nd_recv, NODE_LVAR) &&
iseq_block_param_id_p(iseq, node->nd_recv->nd_vid, &idx, &level)) {
ADD_INSN2(recv, node->nd_recv, getblockparamproxy, INT2FIX(idx + VM_ENV_DATA_SIZE - 1), INT2FIX(level));
}
@@ -8518,7 +8514,7 @@ compile_op_log(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node,
LABEL *lfin = NEW_LABEL(line);
LABEL *lassign;
- if (type == NODE_OP_ASGN_OR && nd_type(node->nd_head) != NODE_IVAR) {
+ if (type == NODE_OP_ASGN_OR && !nd_type_p(node->nd_head, NODE_IVAR)) {
LABEL *lfinish[2];
lfinish[0] = lfin;
lfinish[1] = 0;
@@ -8861,8 +8857,8 @@ compile_dots(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, in
if (optimizable_range_item_p(b) && optimizable_range_item_p(e)) {
if (!popped) {
- VALUE bv = nd_type(b) == NODE_LIT ? b->nd_lit : Qnil;
- VALUE ev = nd_type(e) == NODE_LIT ? e->nd_lit : Qnil;
+ VALUE bv = nd_type_p(b, NODE_LIT) ? b->nd_lit : Qnil;
+ VALUE ev = nd_type_p(e, NODE_LIT) ? e->nd_lit : Qnil;
VALUE val = rb_range_new(bv, ev, excl);
ADD_INSN1(ret, node, putobject, val);
RB_OBJ_WRITTEN(iseq, Qundef, val);
@@ -8918,10 +8914,10 @@ compile_kw_arg(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node,
COMPILE_ERROR(ERROR_ARGS "unreachable");
return COMPILE_NG;
}
- else if (nd_type(default_value) == NODE_LIT ||
- nd_type(default_value) == NODE_NIL ||
- nd_type(default_value) == NODE_TRUE ||
- nd_type(default_value) == NODE_FALSE) {
+ else if (nd_type_p(default_value, NODE_LIT) ||
+ nd_type_p(default_value, NODE_NIL) ||
+ nd_type_p(default_value, NODE_TRUE) ||
+ nd_type_p(default_value, NODE_FALSE)) {
COMPILE_ERROR(ERROR_ARGS "unreachable");
return COMPILE_NG;
}
@@ -8956,8 +8952,8 @@ compile_attrasgn(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node
* obj["literal"] = value -> opt_aset_with(obj, "literal", value)
*/
if (mid == idASET && !private_recv_p(node) && node->nd_args &&
- nd_type(node->nd_args) == NODE_LIST && node->nd_args->nd_alen == 2 &&
- nd_type(node->nd_args->nd_head) == NODE_STR &&
+ nd_type_p(node->nd_args, NODE_LIST) && node->nd_args->nd_alen == 2 &&
+ nd_type_p(node->nd_args->nd_head, NODE_STR) &&
ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
!ISEQ_COMPILE_DATA(iseq)->option->frozen_string_literal &&
ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction)
@@ -11558,6 +11554,7 @@ ibf_load_outer_variables(const struct ibf_load * load, ibf_offset_t outer_variab
for (size_t i = 0; i < table_size; i++) {
ID key = ibf_load_id(load, (ID)ibf_load_small_value(load, &reading_pos));
VALUE value = ibf_load_small_value(load, &reading_pos);
+ if (!key) key = rb_make_temporary_id(i);
rb_id_table_insert(tbl, key, value);
}
diff --git a/complex.c b/complex.c
index 3b4b05a2bb5656..a3dda4d0e14d0a 100644
--- a/complex.c
+++ b/complex.c
@@ -2267,6 +2267,14 @@ float_arg(VALUE self)
* and i is imaginary unit. Real a equals complex a+0i
* mathematically.
*
+ * You can create a \Complex object explicitly with:
+ *
+ * - A {complex literal}[doc/syntax/literals_rdoc.html#label-Complex+Literals].
+ *
+ * You can convert certain objects to \Complex objects with:
+ *
+ * - \Method {Complex}[Kernel.html#method-i-Complex].
+ *
* Complex object can be created as literal, and also by using
* Kernel#Complex, Complex::rect, Complex::polar or to_c method.
*
diff --git a/configure.ac b/configure.ac
index 66a7a9e2b0b8f9..0f7c0d5477f5f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1107,6 +1107,18 @@ main()
RUBY_APPEND_OPTIONS(CXXFLAGS, -U_XOPEN_SOURCE)
])
])
+ AC_CHECK_TYPES([caddr_t],[],[],[@%:@include ])
+ AC_CACHE_CHECK([whether madvise declaration is needed], rb_cv_madvice_prototype_using_caddr_t,
+ [RUBY_WERROR_FLAG([AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ @%:@include
+ @%:@include
+ @%:@include
+ extern int madvise(caddr_t, size_t, int);
+ ]], [[]])],
+ [rb_cv_madvice_prototype_using_caddr_t=yes], [rb_cv_madvice_prototype_using_caddr_t=no])
+ ])
+ ])
+ AS_IF([test $rb_cv_madvice_prototype_using_caddr_t = yes], [AC_DEFINE(NEED_MADVICE_PROTOTYPE_USING_CADDR_T, 1)])
],
[haiku*], [
LIBS="$LIBS" # m lib is include in root
@@ -3472,7 +3484,13 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_SONAME='lib$(RUBY_SO_NAME).$(SOEXT).$(RUBY_PROGRAM_VERSION)'
LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_SO_NAME).$(SOEXT)'
RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ["${linker_flag}-h${linker_flag:+,}"'$(@F)'])
- XLDFLAGS="$XLDFLAGS "'-R${libdir}'
+ AS_IF([test "$load_relative" = yes], [
+ libprefix="'\$\$ORIGIN/../${libdir_basename}'"
+ LIBRUBY_RPATHFLAGS="-R${libprefix}"
+ LIBRUBY_RELATIVE=yes
+ ], [
+ LIBRUBY_RPATHFLAGS='-R${libdir}'
+ ])
],
[hpux*], [
XLDFLAGS="$XLDFLAGS "'-Wl,+s,+b,$(libdir)'
diff --git a/cont.c b/cont.c
index 8a56fa673528aa..290be430122121 100644
--- a/cont.c
+++ b/cont.c
@@ -16,6 +16,13 @@
#include
#endif
+// On Solaris, madvise() is NOT declared for SUS (XPG4v2) or later,
+// but MADV_* macros are defined when __EXTENSIONS__ is defined.
+#ifdef NEED_MADVICE_PROTOTYPE_USING_CADDR_T
+#include
+extern int madvise(caddr_t, size_t, int);
+#endif
+
#include COROUTINE_H
#include "eval_intern.h"
diff --git a/defs/gmake.mk b/defs/gmake.mk
index dd258970543b99..dd7da5f7707570 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -338,8 +338,13 @@ $(UNICODE_SRC_DATA_DIR)/.unicode-tables.time: \
$(UNICODE_FILES) $(UNICODE_PROPERTY_FILES)
endif
+ifeq ($(wildcard $(srcdir)/revision.h),)
+REVISION_IN_HEADER := none
+REVISION_LATEST := update
+else
REVISION_IN_HEADER := $(shell sed -n 's/^\#define RUBY_FULL_REVISION "\(.*\)"/\1/p' $(srcdir)/revision.h 2>/dev/null)
REVISION_LATEST := $(shell $(CHDIR) $(srcdir) && git log -1 --format=%H 2>/dev/null)
+endif
ifneq ($(REVISION_IN_HEADER),$(REVISION_LATEST))
# GNU make treat the target as unmodified when its dependents get
# updated but it is not updated, while others may not.
@@ -362,11 +367,10 @@ spec/bundler: test-bundler-parallel
$(Q)$(NULLCMD)
# workaround to avoid matching non ruby files with "spec/%/" under GNU make 3.81
-spec/%_spec.c spec/%_spec.$(DLEXT):
+spec/%_spec.c:
+ $(empty)
+$(srcdir)/$(RUBYSPEC_CAPIEXT)/rubyspec.h:
$(empty)
-
-spec/%/ spec/%_spec.rb: programs exts PHONY
- +$(RUNRUBY) -r./$(arch)-fake $(srcdir)/spec/mspec/bin/mspec-run -B $(srcdir)/spec/default.mspec $(SPECOPTS) $(patsubst %,$(srcdir)/%,$@)
benchmark/%: miniruby$(EXEEXT) update-benchmark-driver PHONY
$(Q)$(BASERUBY) -rrubygems -I$(srcdir)/benchmark/lib $(srcdir)/benchmark/benchmark-driver/exe/benchmark-driver \
@@ -417,3 +421,8 @@ rubyspec-capiext: $(patsubst %.c,$(RUBYSPEC_CAPIEXT)/%.$(DLEXT),$(notdir $(wildc
ifeq ($(ENABLE_SHARED),yes)
exts: rubyspec-capiext
endif
+
+spec/%/ spec/%_spec.rb: programs exts PHONY
+ +$(RUNRUBY) -r./$(arch)-fake $(srcdir)/spec/mspec/bin/mspec-run -B $(srcdir)/spec/default.mspec $(SPECOPTS) $(patsubst %,$(srcdir)/%,$@)
+
+ruby.pc: $(filter-out ruby.pc,$(ruby_pc))
diff --git a/doc/extension.rdoc b/doc/extension.rdoc
index a1ad930d7e383e..1054e6a6afaeb0 100644
--- a/doc/extension.rdoc
+++ b/doc/extension.rdoc
@@ -450,7 +450,7 @@ you may rely on:
To specify whether keyword arguments are passed when calling super:
- VALUE rb_call_super(int argc, const VALUE *argv, int kw_splat)
+ VALUE rb_call_super_kw(int argc, const VALUE *argv, int kw_splat)
+kw_splat+ can have these possible values (used by all methods that accept
+kw_splat+ argument):
diff --git a/doc/syntax/literals.rdoc b/doc/syntax/literals.rdoc
index cfdbb71700dcf7..66e17fd5034ad7 100644
--- a/doc/syntax/literals.rdoc
+++ b/doc/syntax/literals.rdoc
@@ -2,17 +2,33 @@
Literals create objects you can use in your program. Literals include:
-* Booleans and nil
-* Numbers
-* Strings
-* Symbols
-* Arrays
-* Hashes
-* Ranges
-* Regular Expressions
-* Procs
-
-== Booleans and nil
+* {Boolean and Nil Literals}[#label-Boolean+and+Nil+Literals]
+* {Number Literals}[#label-Number+Literals]
+
+ * {Integer Literals}[#label-Integer+Literals]
+ * {Float Literals}[#label-Float+Literals]
+ * {Rational Literals}[#label-Rational+Literals]
+ * {Complex Literals}[#label-Complex+Literals]
+
+* {String Literals}[#label-String+Literals]
+* {Here Document Literals}[#label-Here+Document+Literals]
+* {Symbol Literals}[#label-Symbol+Literals]
+* {Array Literals}[#label-Array+Literals]
+* {Hash Literals}[#label-Hash+Literals]
+* {Range Literals}[#label-Range+Literals]
+* {Regexp Literals}[#label-Regexp+Literals]
+* {Lambda Proc Literals}[#label-Lambda+Proc+Literals]
+* {Percent Literals}[#label-Percent+Literals]
+
+ * {%q: Non-Interpolable String Literals}[#label-25q-3A+Non-Interpolable+String+Literals]
+ * {% and %Q: Interpolable String Literals}[#label-25+and+-25Q-3A+Interpolable+String+Literals]
+ * {%w and %W: String-Array Literals}[#label-25w+and+-25W-3A+String-Array+Literals]
+ * {%i and %I: Symbol-Array Literals}[#label-25i+and+-25I-3A+Symbol-Array+Literals]
+ * {%r: Regexp Literals}[#label-25r-3A+Regexp+Literals]
+ * {%s: Symbol Literals}[#label-25s-3A+Symbol+Literals]
+ * {%x: Backtick Literals}[#label-25x-3A+Backtick+Literals]
+
+== Boolean and Nil Literals
+nil+ and +false+ are both false values. +nil+ is sometimes used to indicate
"no value" or "unknown" but evaluates to +false+ in conditional expressions.
@@ -20,7 +36,9 @@ Literals create objects you can use in your program. Literals include:
+true+ is a true value. All objects except +nil+ and +false+ evaluate to a
true value in conditional expressions.
-== Numbers
+== Number Literals
+
+=== \Integer Literals
You can write integers of any size as follows:
@@ -31,15 +49,6 @@ These numbers have the same value, 1,234. The underscore may be used to
enhance readability for humans. You may place an underscore anywhere in the
number.
-Floating point numbers may be written as follows:
-
- 12.34
- 1234e-2
- 1.234E1
-
-These numbers have the same value, 12.34. You may use underscores in floating
-point numbers as well.
-
You can use a special prefix to write numbers in decimal, hexadecimal, octal
or binary formats. For decimal numbers use a prefix of 0d, for
hexadecimal numbers use a prefix of 0x, for octal numbers use a
@@ -68,35 +77,48 @@ Examples:
All these numbers have the same decimal value, 170. Like integers and floats
you may use an underscore for readability.
-=== Rational numbers
+=== \Float Literals
+
+Floating-point numbers may be written as follows:
-Numbers suffixed by +r+ are Rational numbers.
+ 12.34
+ 1234e-2
+ 1.234E1
+
+These numbers have the same value, 12.34. You may use underscores in floating
+point numbers as well.
+
+=== \Rational Literals
+
+You can write a Rational number as follows (suffixed +r+):
12r #=> (12/1)
12.3r #=> (123/10)
-Rational numbers are exact, whereas Float numbers are inexact.
+A \Rational number is exact, whereas a \Float number may be inexact.
0.1r + 0.2r #=> (3/10)
0.1 + 0.2 #=> 0.30000000000000004
-=== Complex numbers
+=== \Complex Literals
-Numbers suffixed by +i+ are Complex (or imaginary) numbers.
+You can write a Complex number as follows (suffixed +i+):
1i #=> (0+1i)
1i * 1i #=> (-1+0i)
-Also Rational numbers may be imaginary numbers.
+Also \Rational numbers may be imaginary numbers.
12.3ri #=> (0+(123/10)*i)
-+i+ must be placed after +r+, the opposite is not allowed.
++i+ must be placed after +r+; the opposite is not allowed.
- 12.3ir #=> syntax error
+ 12.3ir #=> Syntax error
== Strings
+=== \String Literals
+
The most common way of writing strings is using ":
"This is a string."
@@ -156,15 +178,6 @@ In addition to disabling interpolation, single-quoted strings also disable all
escape sequences except for the single-quote (\') and backslash
(\\\\).
-You may also create strings using %:
-
- %(1 + 1 is #{1 + 1}) #=> "1 + 1 is 2"
-
-There are two different types of % strings %q(...) behaves
-like a single-quote string (no interpolation or character escaping), while
-%Q behaves as a double-quote string. See Percent Strings below for
-more discussion of the syntax of percent strings.
-
Adjacent string literals are automatically concatenated by the interpreter:
"con" "cat" "en" "at" "ion" #=> "concatenation"
@@ -194,7 +207,12 @@ a single codepoint in the script encoding:
?\C-\M-a #=> "\x81", same as above
?あ #=> "あ"
-=== Here Documents (heredocs)
+See also:
+
+* {%q: Non-Interpolable String Literals}[#label-25q-3A+Non-Interpolable+String+Literals]
+* {% and %Q: Interpolable String Literals}[#label-25+and+-25Q-3A+Interpolable+String+Literals]
+
+=== Here Document Literals
If you are writing a large block of text you may use a "here document" or
"heredoc":
@@ -274,7 +292,7 @@ read:
content for heredoc two
TWO
-== Symbols
+== \Symbol Literals
A Symbol represents a name inside the ruby interpreter. See Symbol for more
details on what symbols are and when ruby creates them internally.
@@ -293,7 +311,12 @@ Like strings, a single-quote may be used to disable interpolation:
When creating a Hash, there is a special syntax for referencing a Symbol as
well.
-== Arrays
+See also:
+
+* {%s: Symbol Literals}[#label-25s-3A+Symbol+Literals]
+
+
+== \Array Literals
An array is created using the objects between [ and ]:
@@ -304,9 +327,14 @@ You may place expressions inside the array:
[1, 1 + 1, 1 + 2]
[1, [1 + 1, [1 + 2]]]
+See also:
+
+* {%w and %W: String-Array Literals}[#label-25w+and+-25W-3A+String-Array+Literals]
+* {%i and %I: Symbol-Array Literals}[#label-25i+and+-25I-3A+Symbol-Array+Literals]
+
See Array for the methods you may use with an array.
-== Hashes
+== \Hash Literals
A hash is created using key-value pairs between { and }:
@@ -330,7 +358,7 @@ is equal to
See Hash for the methods you may use with a hash.
-== Ranges
+== \Range Literals
A range represents an interval of values. The range may include or exclude
its ending value.
@@ -343,7 +371,7 @@ its ending value.
You may create a range of any object. See the Range documentation for details
on the methods you need to implement.
-== Regular Expressions
+== \Regexp Literals
A regular expression is created using "/":
@@ -359,9 +387,13 @@ Interpolation may be used inside regular expressions along with escaped
characters. Note that a regular expression may require additional escaped
characters than a string.
+See also:
+
+* {%r: Regexp Literals}[#label-25r-3A+Regexp+Literals]
+
See Regexp for a description of the syntax of regular expressions.
-== Procs
+== Lambda Proc Literals
A lambda proc can be created with ->:
@@ -375,27 +407,83 @@ You can require arguments for the proc as follows:
This proc will add one to its argument.
-== Percent Strings
+== Percent Literals
+
+Each of the literals in described in this section
+may use these paired delimiters:
+
+* [ and ].
+* ( and ).
+* { and }.
+* < and >.
+* Any other character, as both beginning and ending delimiters.
+
+These are demonstrated in the next section.
+
+=== %q: Non-Interpolable String Literals
+
+You can write a non-interpolable string with %q.
+The created string is the same as if you created it with single quotes:
+
+ %[foo bar baz] # => "foo bar baz" # Using [].
+ %(foo bar baz) # => "foo bar baz" # Using ().
+ %{foo bar baz} # => "foo bar baz" # Using {}.
+ % # => "foo bar baz" # Using <>.
+ %|foo bar baz| # => "foo bar baz" # Using two |.
+ %:foo bar baz: # => "foo bar baz" # Using two :.
+ %q(1 + 1 is #{1 + 1}) # => "1 + 1 is \#{1 + 1}" # No interpolation.
+
+=== % and %Q: Interpolable String Literals
+
+You can write an interpolable string with %Q
+or with its alias %:
+
+ %[foo bar baz] # => "foo bar baz"
+ %(1 + 1 is #{1 + 1}) # => "1 + 1 is 2" # Interpolation.
+
+=== %w and %W: String-Array Literals
+
+You can write an array of strings with %w (non-interpolable)
+or %W (interpolable):
+
+ %w[foo bar baz] # => ["foo", "bar", "baz"]
+ %w[1 % *] # => ["1", "%", "*"]
+ # Use backslash to embed spaces in the strings.
+ %w[foo\ bar baz\ bat] # => ["foo bar", "baz bat"]
+ %w(#{1 + 1}) # => ["\#{1", "+", "1}"]
+ %W(#{1 + 1}) # => ["2"]
+
+=== %i and %I: Symbol-Array Literals
+
+You can write an array of symbols with %i (non-interpolable)
+or %I (interpolable):
+
+ %i[foo bar baz] # => [:foo, :bar, :baz]
+ %i[1 % *] # => [:"1", :%, :*]
+ # Use backslash to embed spaces in the symbols.
+ %i[foo\ bar baz\ bat] # => [:"foo bar", :"baz bat"]
+ %i(#{1 + 1}) # => [:"\#{1", :+, :"1}"]
+ %I(#{1 + 1}) # => [:"2"]
+
+=== %s: Symbol Literals
+
+You can write a symbol with %s:
+
+ %s[foo] # => :foo
+ %s[foo bar] # => :"foo bar"
+
+=== %r: Regexp Literals
-Besides %(...) which creates a String, the % may create
-other types of object. As with strings, an uppercase letter allows
-interpolation and escaped characters while a lowercase letter disables them.
+You can write a regular expression with %r:
-These are the types of percent strings in ruby:
+ r = %r[foo\sbar] # => /foo\sbar/
+ 'foo bar'.match(r) # => #
+ r = %r[foo\sbar]i # => /foo\sbar/i
+ 'FOO BAR'.match(r) # => #
-%i :: Array of Symbols
-%q :: String
-%r :: Regular Expression
-%s :: Symbol
-%w :: Array of Strings
-%x :: Backtick (capture subshell result)
-For the two array forms of percent string, if you wish to include a space in
-one of the array entries you must escape it with a "\\" character:
+=== %x: Backtick Literals
- %w[one one-hundred\ one]
- #=> ["one", "one-hundred one"]
+You can write and execute a shell command with %x:
-If you are using "(", "[", "{", "<" you must close it with ")", "]", "}", ">"
-respectively. You may use most other non-alphanumeric characters for percent
-string delimiters such as "%", "|", "^", etc.
+ %x(echo 1) # => "1\n"
diff --git a/doc/yjit/yjit.md b/doc/yjit/yjit.md
index 0da6c15911455c..a56aec652adb9a 100644
--- a/doc/yjit/yjit.md
+++ b/doc/yjit/yjit.md
@@ -121,7 +121,7 @@ You can dump statistics about compilation and execution by running YJIT with the
./miniruby --yjit-stats myscript.rb
```
-The machine code generated for a given method can be printed by adding `puts YJIT.disasm(method(:method_name))` to a Ruby script. Note that no code will be generated if the method is not compiled.
+The machine code generated for a given method can be printed by adding `puts RubyVM::YJIT.disasm(method(:method_name))` to a Ruby script. Note that no code will be generated if the method is not compiled.
### Command-Line Options
diff --git a/enc/depend b/enc/depend
index bbbf57a4731d2f..8922b2b25892eb 100644
--- a/enc/depend
+++ b/enc/depend
@@ -185,7 +185,6 @@ enc/ascii.$(OBJEXT): assert.h
enc/ascii.$(OBJEXT): backward/2/assume.h
enc/ascii.$(OBJEXT): backward/2/attributes.h
enc/ascii.$(OBJEXT): backward/2/bool.h
-enc/ascii.$(OBJEXT): backward/2/gcc_version_since.h
enc/ascii.$(OBJEXT): backward/2/inttypes.h
enc/ascii.$(OBJEXT): backward/2/limits.h
enc/ascii.$(OBJEXT): backward/2/long_long.h
@@ -354,7 +353,6 @@ enc/big5.$(OBJEXT): assert.h
enc/big5.$(OBJEXT): backward/2/assume.h
enc/big5.$(OBJEXT): backward/2/attributes.h
enc/big5.$(OBJEXT): backward/2/bool.h
-enc/big5.$(OBJEXT): backward/2/gcc_version_since.h
enc/big5.$(OBJEXT): backward/2/long_long.h
enc/big5.$(OBJEXT): backward/2/stdalign.h
enc/big5.$(OBJEXT): backward/2/stdarg.h
@@ -413,7 +411,6 @@ enc/cesu_8.$(OBJEXT): backward.h
enc/cesu_8.$(OBJEXT): backward/2/assume.h
enc/cesu_8.$(OBJEXT): backward/2/attributes.h
enc/cesu_8.$(OBJEXT): backward/2/bool.h
-enc/cesu_8.$(OBJEXT): backward/2/gcc_version_since.h
enc/cesu_8.$(OBJEXT): backward/2/inttypes.h
enc/cesu_8.$(OBJEXT): backward/2/limits.h
enc/cesu_8.$(OBJEXT): backward/2/long_long.h
@@ -582,7 +579,6 @@ enc/cp949.$(OBJEXT): assert.h
enc/cp949.$(OBJEXT): backward/2/assume.h
enc/cp949.$(OBJEXT): backward/2/attributes.h
enc/cp949.$(OBJEXT): backward/2/bool.h
-enc/cp949.$(OBJEXT): backward/2/gcc_version_since.h
enc/cp949.$(OBJEXT): backward/2/long_long.h
enc/cp949.$(OBJEXT): backward/2/stdalign.h
enc/cp949.$(OBJEXT): backward/2/stdarg.h
@@ -638,7 +634,6 @@ enc/emacs_mule.$(OBJEXT): assert.h
enc/emacs_mule.$(OBJEXT): backward/2/assume.h
enc/emacs_mule.$(OBJEXT): backward/2/attributes.h
enc/emacs_mule.$(OBJEXT): backward/2/bool.h
-enc/emacs_mule.$(OBJEXT): backward/2/gcc_version_since.h
enc/emacs_mule.$(OBJEXT): backward/2/long_long.h
enc/emacs_mule.$(OBJEXT): backward/2/stdalign.h
enc/emacs_mule.$(OBJEXT): backward/2/stdarg.h
@@ -689,16 +684,13 @@ enc/emacs_mule.$(OBJEXT): internal/warning_push.h
enc/emacs_mule.$(OBJEXT): internal/xmalloc.h
enc/emacs_mule.$(OBJEXT): missing.h
enc/emacs_mule.$(OBJEXT): onigmo.h
-enc/encdb.$(OBJEXT): $(hdrdir)/ruby.h
enc/encdb.$(OBJEXT): $(hdrdir)/ruby/ruby.h
-enc/encdb.$(OBJEXT): $(top_srcdir)/internal.h
enc/encdb.$(OBJEXT): $(top_srcdir)/internal/encoding.h
enc/encdb.$(OBJEXT): assert.h
enc/encdb.$(OBJEXT): backward.h
enc/encdb.$(OBJEXT): backward/2/assume.h
enc/encdb.$(OBJEXT): backward/2/attributes.h
enc/encdb.$(OBJEXT): backward/2/bool.h
-enc/encdb.$(OBJEXT): backward/2/gcc_version_since.h
enc/encdb.$(OBJEXT): backward/2/inttypes.h
enc/encdb.$(OBJEXT): backward/2/limits.h
enc/encdb.$(OBJEXT): backward/2/long_long.h
@@ -868,7 +860,6 @@ enc/euc_jp.$(OBJEXT): assert.h
enc/euc_jp.$(OBJEXT): backward/2/assume.h
enc/euc_jp.$(OBJEXT): backward/2/attributes.h
enc/euc_jp.$(OBJEXT): backward/2/bool.h
-enc/euc_jp.$(OBJEXT): backward/2/gcc_version_since.h
enc/euc_jp.$(OBJEXT): backward/2/long_long.h
enc/euc_jp.$(OBJEXT): backward/2/stdalign.h
enc/euc_jp.$(OBJEXT): backward/2/stdarg.h
@@ -926,7 +917,6 @@ enc/euc_kr.$(OBJEXT): assert.h
enc/euc_kr.$(OBJEXT): backward/2/assume.h
enc/euc_kr.$(OBJEXT): backward/2/attributes.h
enc/euc_kr.$(OBJEXT): backward/2/bool.h
-enc/euc_kr.$(OBJEXT): backward/2/gcc_version_since.h
enc/euc_kr.$(OBJEXT): backward/2/long_long.h
enc/euc_kr.$(OBJEXT): backward/2/stdalign.h
enc/euc_kr.$(OBJEXT): backward/2/stdarg.h
@@ -982,7 +972,6 @@ enc/euc_tw.$(OBJEXT): assert.h
enc/euc_tw.$(OBJEXT): backward/2/assume.h
enc/euc_tw.$(OBJEXT): backward/2/attributes.h
enc/euc_tw.$(OBJEXT): backward/2/bool.h
-enc/euc_tw.$(OBJEXT): backward/2/gcc_version_since.h
enc/euc_tw.$(OBJEXT): backward/2/long_long.h
enc/euc_tw.$(OBJEXT): backward/2/stdalign.h
enc/euc_tw.$(OBJEXT): backward/2/stdarg.h
@@ -1038,7 +1027,6 @@ enc/gb18030.$(OBJEXT): assert.h
enc/gb18030.$(OBJEXT): backward/2/assume.h
enc/gb18030.$(OBJEXT): backward/2/attributes.h
enc/gb18030.$(OBJEXT): backward/2/bool.h
-enc/gb18030.$(OBJEXT): backward/2/gcc_version_since.h
enc/gb18030.$(OBJEXT): backward/2/long_long.h
enc/gb18030.$(OBJEXT): backward/2/stdalign.h
enc/gb18030.$(OBJEXT): backward/2/stdarg.h
@@ -1094,7 +1082,6 @@ enc/gb2312.$(OBJEXT): assert.h
enc/gb2312.$(OBJEXT): backward/2/assume.h
enc/gb2312.$(OBJEXT): backward/2/attributes.h
enc/gb2312.$(OBJEXT): backward/2/bool.h
-enc/gb2312.$(OBJEXT): backward/2/gcc_version_since.h
enc/gb2312.$(OBJEXT): backward/2/long_long.h
enc/gb2312.$(OBJEXT): backward/2/stdalign.h
enc/gb2312.$(OBJEXT): backward/2/stdarg.h
@@ -1150,7 +1137,6 @@ enc/gbk.$(OBJEXT): assert.h
enc/gbk.$(OBJEXT): backward/2/assume.h
enc/gbk.$(OBJEXT): backward/2/attributes.h
enc/gbk.$(OBJEXT): backward/2/bool.h
-enc/gbk.$(OBJEXT): backward/2/gcc_version_since.h
enc/gbk.$(OBJEXT): backward/2/long_long.h
enc/gbk.$(OBJEXT): backward/2/stdalign.h
enc/gbk.$(OBJEXT): backward/2/stdarg.h
@@ -1206,7 +1192,6 @@ enc/iso_8859_1.$(OBJEXT): assert.h
enc/iso_8859_1.$(OBJEXT): backward/2/assume.h
enc/iso_8859_1.$(OBJEXT): backward/2/attributes.h
enc/iso_8859_1.$(OBJEXT): backward/2/bool.h
-enc/iso_8859_1.$(OBJEXT): backward/2/gcc_version_since.h
enc/iso_8859_1.$(OBJEXT): backward/2/long_long.h
enc/iso_8859_1.$(OBJEXT): backward/2/stdalign.h
enc/iso_8859_1.$(OBJEXT): backward/2/stdarg.h
@@ -1263,7 +1248,6 @@ enc/iso_8859_10.$(OBJEXT): assert.h
enc/iso_8859_10.$(OBJEXT): backward/2/assume.h
enc/iso_8859_10.$(OBJEXT): backward/2/attributes.h
enc/iso_8859_10.$(OBJEXT): backward/2/bool.h
-enc/iso_8859_10.$(OBJEXT): backward/2/gcc_version_since.h
enc/iso_8859_10.$(OBJEXT): backward/2/long_long.h
enc/iso_8859_10.$(OBJEXT): backward/2/stdalign.h
enc/iso_8859_10.$(OBJEXT): backward/2/stdarg.h
@@ -1320,7 +1304,6 @@ enc/iso_8859_11.$(OBJEXT): assert.h
enc/iso_8859_11.$(OBJEXT): backward/2/assume.h
enc/iso_8859_11.$(OBJEXT): backward/2/attributes.h
enc/iso_8859_11.$(OBJEXT): backward/2/bool.h
-enc/iso_8859_11.$(OBJEXT): backward/2/gcc_version_since.h
enc/iso_8859_11.$(OBJEXT): backward/2/long_long.h
enc/iso_8859_11.$(OBJEXT): backward/2/stdalign.h
enc/iso_8859_11.$(OBJEXT): backward/2/stdarg.h
@@ -1376,7 +1359,6 @@ enc/iso_8859_13.$(OBJEXT): assert.h
enc/iso_8859_13.$(OBJEXT): backward/2/assume.h
enc/iso_8859_13.$(OBJEXT): backward/2/attributes.h
enc/iso_8859_13.$(OBJEXT): backward/2/bool.h
-enc/iso_8859_13.$(OBJEXT): backward/2/gcc_version_since.h
enc/iso_8859_13.$(OBJEXT): backward/2/long_long.h
enc/iso_8859_13.$(OBJEXT): backward/2/stdalign.h
enc/iso_8859_13.$(OBJEXT): backward/2/stdarg.h
@@ -1433,7 +1415,6 @@ enc/iso_8859_14.$(OBJEXT): assert.h
enc/iso_8859_14.$(OBJEXT): backward/2/assume.h
enc/iso_8859_14.$(OBJEXT): backward/2/attributes.h
enc/iso_8859_14.$(OBJEXT): backward/2/bool.h
-enc/iso_8859_14.$(OBJEXT): backward/2/gcc_version_since.h
enc/iso_8859_14.$(OBJEXT): backward/2/long_long.h
enc/iso_8859_14.$(OBJEXT): backward/2/stdalign.h
enc/iso_8859_14.$(OBJEXT): backward/2/stdarg.h
@@ -1490,7 +1471,6 @@ enc/iso_8859_15.$(OBJEXT): assert.h
enc/iso_8859_15.$(OBJEXT): backward/2/assume.h
enc/iso_8859_15.$(OBJEXT): backward/2/attributes.h
enc/iso_8859_15.$(OBJEXT): backward/2/bool.h
-enc/iso_8859_15.$(OBJEXT): backward/2/gcc_version_since.h
enc/iso_8859_15.$(OBJEXT): backward/2/long_long.h
enc/iso_8859_15.$(OBJEXT): backward/2/stdalign.h
enc/iso_8859_15.$(OBJEXT): backward/2/stdarg.h
@@ -1547,7 +1527,6 @@ enc/iso_8859_16.$(OBJEXT): assert.h
enc/iso_8859_16.$(OBJEXT): backward/2/assume.h
enc/iso_8859_16.$(OBJEXT): backward/2/attributes.h
enc/iso_8859_16.$(OBJEXT): backward/2/bool.h
-enc/iso_8859_16.$(OBJEXT): backward/2/gcc_version_since.h
enc/iso_8859_16.$(OBJEXT): backward/2/long_long.h
enc/iso_8859_16.$(OBJEXT): backward/2/stdalign.h
enc/iso_8859_16.$(OBJEXT): backward/2/stdarg.h
@@ -1604,7 +1583,6 @@ enc/iso_8859_2.$(OBJEXT): assert.h
enc/iso_8859_2.$(OBJEXT): backward/2/assume.h
enc/iso_8859_2.$(OBJEXT): backward/2/attributes.h
enc/iso_8859_2.$(OBJEXT): backward/2/bool.h
-enc/iso_8859_2.$(OBJEXT): backward/2/gcc_version_since.h
enc/iso_8859_2.$(OBJEXT): backward/2/long_long.h
enc/iso_8859_2.$(OBJEXT): backward/2/stdalign.h
enc/iso_8859_2.$(OBJEXT): backward/2/stdarg.h
@@ -1661,7 +1639,6 @@ enc/iso_8859_3.$(OBJEXT): assert.h
enc/iso_8859_3.$(OBJEXT): backward/2/assume.h
enc/iso_8859_3.$(OBJEXT): backward/2/attributes.h
enc/iso_8859_3.$(OBJEXT): backward/2/bool.h
-enc/iso_8859_3.$(OBJEXT): backward/2/gcc_version_since.h
enc/iso_8859_3.$(OBJEXT): backward/2/long_long.h
enc/iso_8859_3.$(OBJEXT): backward/2/stdalign.h
enc/iso_8859_3.$(OBJEXT): backward/2/stdarg.h
@@ -1718,7 +1695,6 @@ enc/iso_8859_4.$(OBJEXT): assert.h
enc/iso_8859_4.$(OBJEXT): backward/2/assume.h
enc/iso_8859_4.$(OBJEXT): backward/2/attributes.h
enc/iso_8859_4.$(OBJEXT): backward/2/bool.h
-enc/iso_8859_4.$(OBJEXT): backward/2/gcc_version_since.h
enc/iso_8859_4.$(OBJEXT): backward/2/long_long.h
enc/iso_8859_4.$(OBJEXT): backward/2/stdalign.h
enc/iso_8859_4.$(OBJEXT): backward/2/stdarg.h
@@ -1775,7 +1751,6 @@ enc/iso_8859_5.$(OBJEXT): assert.h
enc/iso_8859_5.$(OBJEXT): backward/2/assume.h
enc/iso_8859_5.$(OBJEXT): backward/2/attributes.h
enc/iso_8859_5.$(OBJEXT): backward/2/bool.h
-enc/iso_8859_5.$(OBJEXT): backward/2/gcc_version_since.h
enc/iso_8859_5.$(OBJEXT): backward/2/long_long.h
enc/iso_8859_5.$(OBJEXT): backward/2/stdalign.h
enc/iso_8859_5.$(OBJEXT): backward/2/stdarg.h
@@ -1831,7 +1806,6 @@ enc/iso_8859_6.$(OBJEXT): assert.h
enc/iso_8859_6.$(OBJEXT): backward/2/assume.h
enc/iso_8859_6.$(OBJEXT): backward/2/attributes.h
enc/iso_8859_6.$(OBJEXT): backward/2/bool.h
-enc/iso_8859_6.$(OBJEXT): backward/2/gcc_version_since.h
enc/iso_8859_6.$(OBJEXT): backward/2/long_long.h
enc/iso_8859_6.$(OBJEXT): backward/2/stdalign.h
enc/iso_8859_6.$(OBJEXT): backward/2/stdarg.h
@@ -1887,7 +1861,6 @@ enc/iso_8859_7.$(OBJEXT): assert.h
enc/iso_8859_7.$(OBJEXT): backward/2/assume.h
enc/iso_8859_7.$(OBJEXT): backward/2/attributes.h
enc/iso_8859_7.$(OBJEXT): backward/2/bool.h
-enc/iso_8859_7.$(OBJEXT): backward/2/gcc_version_since.h
enc/iso_8859_7.$(OBJEXT): backward/2/long_long.h
enc/iso_8859_7.$(OBJEXT): backward/2/stdalign.h
enc/iso_8859_7.$(OBJEXT): backward/2/stdarg.h
@@ -1943,7 +1916,6 @@ enc/iso_8859_8.$(OBJEXT): assert.h
enc/iso_8859_8.$(OBJEXT): backward/2/assume.h
enc/iso_8859_8.$(OBJEXT): backward/2/attributes.h
enc/iso_8859_8.$(OBJEXT): backward/2/bool.h
-enc/iso_8859_8.$(OBJEXT): backward/2/gcc_version_since.h
enc/iso_8859_8.$(OBJEXT): backward/2/long_long.h
enc/iso_8859_8.$(OBJEXT): backward/2/stdalign.h
enc/iso_8859_8.$(OBJEXT): backward/2/stdarg.h
@@ -1999,7 +1971,6 @@ enc/iso_8859_9.$(OBJEXT): assert.h
enc/iso_8859_9.$(OBJEXT): backward/2/assume.h
enc/iso_8859_9.$(OBJEXT): backward/2/attributes.h
enc/iso_8859_9.$(OBJEXT): backward/2/bool.h
-enc/iso_8859_9.$(OBJEXT): backward/2/gcc_version_since.h
enc/iso_8859_9.$(OBJEXT): backward/2/long_long.h
enc/iso_8859_9.$(OBJEXT): backward/2/stdalign.h
enc/iso_8859_9.$(OBJEXT): backward/2/stdarg.h
@@ -2056,7 +2027,6 @@ enc/koi8_r.$(OBJEXT): assert.h
enc/koi8_r.$(OBJEXT): backward/2/assume.h
enc/koi8_r.$(OBJEXT): backward/2/attributes.h
enc/koi8_r.$(OBJEXT): backward/2/bool.h
-enc/koi8_r.$(OBJEXT): backward/2/gcc_version_since.h
enc/koi8_r.$(OBJEXT): backward/2/long_long.h
enc/koi8_r.$(OBJEXT): backward/2/stdalign.h
enc/koi8_r.$(OBJEXT): backward/2/stdarg.h
@@ -2112,7 +2082,6 @@ enc/koi8_u.$(OBJEXT): assert.h
enc/koi8_u.$(OBJEXT): backward/2/assume.h
enc/koi8_u.$(OBJEXT): backward/2/attributes.h
enc/koi8_u.$(OBJEXT): backward/2/bool.h
-enc/koi8_u.$(OBJEXT): backward/2/gcc_version_since.h
enc/koi8_u.$(OBJEXT): backward/2/long_long.h
enc/koi8_u.$(OBJEXT): backward/2/stdalign.h
enc/koi8_u.$(OBJEXT): backward/2/stdarg.h
@@ -2168,7 +2137,6 @@ enc/shift_jis.$(OBJEXT): assert.h
enc/shift_jis.$(OBJEXT): backward/2/assume.h
enc/shift_jis.$(OBJEXT): backward/2/attributes.h
enc/shift_jis.$(OBJEXT): backward/2/bool.h
-enc/shift_jis.$(OBJEXT): backward/2/gcc_version_since.h
enc/shift_jis.$(OBJEXT): backward/2/long_long.h
enc/shift_jis.$(OBJEXT): backward/2/stdalign.h
enc/shift_jis.$(OBJEXT): backward/2/stdarg.h
@@ -2229,7 +2197,6 @@ enc/trans/big5.$(OBJEXT): backward.h
enc/trans/big5.$(OBJEXT): backward/2/assume.h
enc/trans/big5.$(OBJEXT): backward/2/attributes.h
enc/trans/big5.$(OBJEXT): backward/2/bool.h
-enc/trans/big5.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/big5.$(OBJEXT): backward/2/inttypes.h
enc/trans/big5.$(OBJEXT): backward/2/limits.h
enc/trans/big5.$(OBJEXT): backward/2/long_long.h
@@ -2388,7 +2355,6 @@ enc/trans/cesu_8.$(OBJEXT): backward.h
enc/trans/cesu_8.$(OBJEXT): backward/2/assume.h
enc/trans/cesu_8.$(OBJEXT): backward/2/attributes.h
enc/trans/cesu_8.$(OBJEXT): backward/2/bool.h
-enc/trans/cesu_8.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/cesu_8.$(OBJEXT): backward/2/inttypes.h
enc/trans/cesu_8.$(OBJEXT): backward/2/limits.h
enc/trans/cesu_8.$(OBJEXT): backward/2/long_long.h
@@ -2547,7 +2513,6 @@ enc/trans/chinese.$(OBJEXT): backward.h
enc/trans/chinese.$(OBJEXT): backward/2/assume.h
enc/trans/chinese.$(OBJEXT): backward/2/attributes.h
enc/trans/chinese.$(OBJEXT): backward/2/bool.h
-enc/trans/chinese.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/chinese.$(OBJEXT): backward/2/inttypes.h
enc/trans/chinese.$(OBJEXT): backward/2/limits.h
enc/trans/chinese.$(OBJEXT): backward/2/long_long.h
@@ -2706,7 +2671,6 @@ enc/trans/ebcdic.$(OBJEXT): backward.h
enc/trans/ebcdic.$(OBJEXT): backward/2/assume.h
enc/trans/ebcdic.$(OBJEXT): backward/2/attributes.h
enc/trans/ebcdic.$(OBJEXT): backward/2/bool.h
-enc/trans/ebcdic.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/ebcdic.$(OBJEXT): backward/2/inttypes.h
enc/trans/ebcdic.$(OBJEXT): backward/2/limits.h
enc/trans/ebcdic.$(OBJEXT): backward/2/long_long.h
@@ -2865,7 +2829,6 @@ enc/trans/emoji.$(OBJEXT): backward.h
enc/trans/emoji.$(OBJEXT): backward/2/assume.h
enc/trans/emoji.$(OBJEXT): backward/2/attributes.h
enc/trans/emoji.$(OBJEXT): backward/2/bool.h
-enc/trans/emoji.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/emoji.$(OBJEXT): backward/2/inttypes.h
enc/trans/emoji.$(OBJEXT): backward/2/limits.h
enc/trans/emoji.$(OBJEXT): backward/2/long_long.h
@@ -3024,7 +2987,6 @@ enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward.h
enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward/2/assume.h
enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward/2/attributes.h
enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward/2/bool.h
-enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward/2/inttypes.h
enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward/2/limits.h
enc/trans/emoji_iso2022_kddi.$(OBJEXT): backward/2/long_long.h
@@ -3183,7 +3145,6 @@ enc/trans/emoji_sjis_docomo.$(OBJEXT): backward.h
enc/trans/emoji_sjis_docomo.$(OBJEXT): backward/2/assume.h
enc/trans/emoji_sjis_docomo.$(OBJEXT): backward/2/attributes.h
enc/trans/emoji_sjis_docomo.$(OBJEXT): backward/2/bool.h
-enc/trans/emoji_sjis_docomo.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/emoji_sjis_docomo.$(OBJEXT): backward/2/inttypes.h
enc/trans/emoji_sjis_docomo.$(OBJEXT): backward/2/limits.h
enc/trans/emoji_sjis_docomo.$(OBJEXT): backward/2/long_long.h
@@ -3342,7 +3303,6 @@ enc/trans/emoji_sjis_kddi.$(OBJEXT): backward.h
enc/trans/emoji_sjis_kddi.$(OBJEXT): backward/2/assume.h
enc/trans/emoji_sjis_kddi.$(OBJEXT): backward/2/attributes.h
enc/trans/emoji_sjis_kddi.$(OBJEXT): backward/2/bool.h
-enc/trans/emoji_sjis_kddi.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/emoji_sjis_kddi.$(OBJEXT): backward/2/inttypes.h
enc/trans/emoji_sjis_kddi.$(OBJEXT): backward/2/limits.h
enc/trans/emoji_sjis_kddi.$(OBJEXT): backward/2/long_long.h
@@ -3501,7 +3461,6 @@ enc/trans/emoji_sjis_softbank.$(OBJEXT): backward.h
enc/trans/emoji_sjis_softbank.$(OBJEXT): backward/2/assume.h
enc/trans/emoji_sjis_softbank.$(OBJEXT): backward/2/attributes.h
enc/trans/emoji_sjis_softbank.$(OBJEXT): backward/2/bool.h
-enc/trans/emoji_sjis_softbank.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/emoji_sjis_softbank.$(OBJEXT): backward/2/inttypes.h
enc/trans/emoji_sjis_softbank.$(OBJEXT): backward/2/limits.h
enc/trans/emoji_sjis_softbank.$(OBJEXT): backward/2/long_long.h
@@ -3660,7 +3619,6 @@ enc/trans/escape.$(OBJEXT): backward.h
enc/trans/escape.$(OBJEXT): backward/2/assume.h
enc/trans/escape.$(OBJEXT): backward/2/attributes.h
enc/trans/escape.$(OBJEXT): backward/2/bool.h
-enc/trans/escape.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/escape.$(OBJEXT): backward/2/inttypes.h
enc/trans/escape.$(OBJEXT): backward/2/limits.h
enc/trans/escape.$(OBJEXT): backward/2/long_long.h
@@ -3819,7 +3777,6 @@ enc/trans/gb18030.$(OBJEXT): backward.h
enc/trans/gb18030.$(OBJEXT): backward/2/assume.h
enc/trans/gb18030.$(OBJEXT): backward/2/attributes.h
enc/trans/gb18030.$(OBJEXT): backward/2/bool.h
-enc/trans/gb18030.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/gb18030.$(OBJEXT): backward/2/inttypes.h
enc/trans/gb18030.$(OBJEXT): backward/2/limits.h
enc/trans/gb18030.$(OBJEXT): backward/2/long_long.h
@@ -3978,7 +3935,6 @@ enc/trans/gbk.$(OBJEXT): backward.h
enc/trans/gbk.$(OBJEXT): backward/2/assume.h
enc/trans/gbk.$(OBJEXT): backward/2/attributes.h
enc/trans/gbk.$(OBJEXT): backward/2/bool.h
-enc/trans/gbk.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/gbk.$(OBJEXT): backward/2/inttypes.h
enc/trans/gbk.$(OBJEXT): backward/2/limits.h
enc/trans/gbk.$(OBJEXT): backward/2/long_long.h
@@ -4137,7 +4093,6 @@ enc/trans/iso2022.$(OBJEXT): backward.h
enc/trans/iso2022.$(OBJEXT): backward/2/assume.h
enc/trans/iso2022.$(OBJEXT): backward/2/attributes.h
enc/trans/iso2022.$(OBJEXT): backward/2/bool.h
-enc/trans/iso2022.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/iso2022.$(OBJEXT): backward/2/inttypes.h
enc/trans/iso2022.$(OBJEXT): backward/2/limits.h
enc/trans/iso2022.$(OBJEXT): backward/2/long_long.h
@@ -4296,7 +4251,6 @@ enc/trans/japanese.$(OBJEXT): backward.h
enc/trans/japanese.$(OBJEXT): backward/2/assume.h
enc/trans/japanese.$(OBJEXT): backward/2/attributes.h
enc/trans/japanese.$(OBJEXT): backward/2/bool.h
-enc/trans/japanese.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/japanese.$(OBJEXT): backward/2/inttypes.h
enc/trans/japanese.$(OBJEXT): backward/2/limits.h
enc/trans/japanese.$(OBJEXT): backward/2/long_long.h
@@ -4455,7 +4409,6 @@ enc/trans/japanese_euc.$(OBJEXT): backward.h
enc/trans/japanese_euc.$(OBJEXT): backward/2/assume.h
enc/trans/japanese_euc.$(OBJEXT): backward/2/attributes.h
enc/trans/japanese_euc.$(OBJEXT): backward/2/bool.h
-enc/trans/japanese_euc.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/japanese_euc.$(OBJEXT): backward/2/inttypes.h
enc/trans/japanese_euc.$(OBJEXT): backward/2/limits.h
enc/trans/japanese_euc.$(OBJEXT): backward/2/long_long.h
@@ -4614,7 +4567,6 @@ enc/trans/japanese_sjis.$(OBJEXT): backward.h
enc/trans/japanese_sjis.$(OBJEXT): backward/2/assume.h
enc/trans/japanese_sjis.$(OBJEXT): backward/2/attributes.h
enc/trans/japanese_sjis.$(OBJEXT): backward/2/bool.h
-enc/trans/japanese_sjis.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/japanese_sjis.$(OBJEXT): backward/2/inttypes.h
enc/trans/japanese_sjis.$(OBJEXT): backward/2/limits.h
enc/trans/japanese_sjis.$(OBJEXT): backward/2/long_long.h
@@ -4773,7 +4725,6 @@ enc/trans/korean.$(OBJEXT): backward.h
enc/trans/korean.$(OBJEXT): backward/2/assume.h
enc/trans/korean.$(OBJEXT): backward/2/attributes.h
enc/trans/korean.$(OBJEXT): backward/2/bool.h
-enc/trans/korean.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/korean.$(OBJEXT): backward/2/inttypes.h
enc/trans/korean.$(OBJEXT): backward/2/limits.h
enc/trans/korean.$(OBJEXT): backward/2/long_long.h
@@ -4931,7 +4882,6 @@ enc/trans/newline.$(OBJEXT): assert.h
enc/trans/newline.$(OBJEXT): backward/2/assume.h
enc/trans/newline.$(OBJEXT): backward/2/attributes.h
enc/trans/newline.$(OBJEXT): backward/2/bool.h
-enc/trans/newline.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/newline.$(OBJEXT): backward/2/inttypes.h
enc/trans/newline.$(OBJEXT): backward/2/limits.h
enc/trans/newline.$(OBJEXT): backward/2/long_long.h
@@ -5090,7 +5040,6 @@ enc/trans/single_byte.$(OBJEXT): backward.h
enc/trans/single_byte.$(OBJEXT): backward/2/assume.h
enc/trans/single_byte.$(OBJEXT): backward/2/attributes.h
enc/trans/single_byte.$(OBJEXT): backward/2/bool.h
-enc/trans/single_byte.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/single_byte.$(OBJEXT): backward/2/inttypes.h
enc/trans/single_byte.$(OBJEXT): backward/2/limits.h
enc/trans/single_byte.$(OBJEXT): backward/2/long_long.h
@@ -5251,7 +5200,6 @@ enc/trans/utf8_mac.$(OBJEXT): backward.h
enc/trans/utf8_mac.$(OBJEXT): backward/2/assume.h
enc/trans/utf8_mac.$(OBJEXT): backward/2/attributes.h
enc/trans/utf8_mac.$(OBJEXT): backward/2/bool.h
-enc/trans/utf8_mac.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/utf8_mac.$(OBJEXT): backward/2/inttypes.h
enc/trans/utf8_mac.$(OBJEXT): backward/2/limits.h
enc/trans/utf8_mac.$(OBJEXT): backward/2/long_long.h
@@ -5410,7 +5358,6 @@ enc/trans/utf_16_32.$(OBJEXT): backward.h
enc/trans/utf_16_32.$(OBJEXT): backward/2/assume.h
enc/trans/utf_16_32.$(OBJEXT): backward/2/attributes.h
enc/trans/utf_16_32.$(OBJEXT): backward/2/bool.h
-enc/trans/utf_16_32.$(OBJEXT): backward/2/gcc_version_since.h
enc/trans/utf_16_32.$(OBJEXT): backward/2/inttypes.h
enc/trans/utf_16_32.$(OBJEXT): backward/2/limits.h
enc/trans/utf_16_32.$(OBJEXT): backward/2/long_long.h
@@ -5571,7 +5518,6 @@ enc/unicode.$(OBJEXT): assert.h
enc/unicode.$(OBJEXT): backward/2/assume.h
enc/unicode.$(OBJEXT): backward/2/attributes.h
enc/unicode.$(OBJEXT): backward/2/bool.h
-enc/unicode.$(OBJEXT): backward/2/gcc_version_since.h
enc/unicode.$(OBJEXT): backward/2/inttypes.h
enc/unicode.$(OBJEXT): backward/2/limits.h
enc/unicode.$(OBJEXT): backward/2/long_long.h
@@ -5731,7 +5677,6 @@ enc/us_ascii.$(OBJEXT): assert.h
enc/us_ascii.$(OBJEXT): backward/2/assume.h
enc/us_ascii.$(OBJEXT): backward/2/attributes.h
enc/us_ascii.$(OBJEXT): backward/2/bool.h
-enc/us_ascii.$(OBJEXT): backward/2/gcc_version_since.h
enc/us_ascii.$(OBJEXT): backward/2/inttypes.h
enc/us_ascii.$(OBJEXT): backward/2/limits.h
enc/us_ascii.$(OBJEXT): backward/2/long_long.h
@@ -5900,7 +5845,6 @@ enc/utf_16be.$(OBJEXT): assert.h
enc/utf_16be.$(OBJEXT): backward/2/assume.h
enc/utf_16be.$(OBJEXT): backward/2/attributes.h
enc/utf_16be.$(OBJEXT): backward/2/bool.h
-enc/utf_16be.$(OBJEXT): backward/2/gcc_version_since.h
enc/utf_16be.$(OBJEXT): backward/2/long_long.h
enc/utf_16be.$(OBJEXT): backward/2/stdalign.h
enc/utf_16be.$(OBJEXT): backward/2/stdarg.h
@@ -5957,7 +5901,6 @@ enc/utf_16le.$(OBJEXT): assert.h
enc/utf_16le.$(OBJEXT): backward/2/assume.h
enc/utf_16le.$(OBJEXT): backward/2/attributes.h
enc/utf_16le.$(OBJEXT): backward/2/bool.h
-enc/utf_16le.$(OBJEXT): backward/2/gcc_version_since.h
enc/utf_16le.$(OBJEXT): backward/2/long_long.h
enc/utf_16le.$(OBJEXT): backward/2/stdalign.h
enc/utf_16le.$(OBJEXT): backward/2/stdarg.h
@@ -6014,7 +5957,6 @@ enc/utf_32be.$(OBJEXT): assert.h
enc/utf_32be.$(OBJEXT): backward/2/assume.h
enc/utf_32be.$(OBJEXT): backward/2/attributes.h
enc/utf_32be.$(OBJEXT): backward/2/bool.h
-enc/utf_32be.$(OBJEXT): backward/2/gcc_version_since.h
enc/utf_32be.$(OBJEXT): backward/2/long_long.h
enc/utf_32be.$(OBJEXT): backward/2/stdalign.h
enc/utf_32be.$(OBJEXT): backward/2/stdarg.h
@@ -6071,7 +6013,6 @@ enc/utf_32le.$(OBJEXT): assert.h
enc/utf_32le.$(OBJEXT): backward/2/assume.h
enc/utf_32le.$(OBJEXT): backward/2/attributes.h
enc/utf_32le.$(OBJEXT): backward/2/bool.h
-enc/utf_32le.$(OBJEXT): backward/2/gcc_version_since.h
enc/utf_32le.$(OBJEXT): backward/2/long_long.h
enc/utf_32le.$(OBJEXT): backward/2/stdalign.h
enc/utf_32le.$(OBJEXT): backward/2/stdarg.h
@@ -6130,7 +6071,6 @@ enc/utf_8.$(OBJEXT): assert.h
enc/utf_8.$(OBJEXT): backward/2/assume.h
enc/utf_8.$(OBJEXT): backward/2/attributes.h
enc/utf_8.$(OBJEXT): backward/2/bool.h
-enc/utf_8.$(OBJEXT): backward/2/gcc_version_since.h
enc/utf_8.$(OBJEXT): backward/2/inttypes.h
enc/utf_8.$(OBJEXT): backward/2/limits.h
enc/utf_8.$(OBJEXT): backward/2/long_long.h
@@ -6299,7 +6239,6 @@ enc/windows_1250.$(OBJEXT): assert.h
enc/windows_1250.$(OBJEXT): backward/2/assume.h
enc/windows_1250.$(OBJEXT): backward/2/attributes.h
enc/windows_1250.$(OBJEXT): backward/2/bool.h
-enc/windows_1250.$(OBJEXT): backward/2/gcc_version_since.h
enc/windows_1250.$(OBJEXT): backward/2/long_long.h
enc/windows_1250.$(OBJEXT): backward/2/stdalign.h
enc/windows_1250.$(OBJEXT): backward/2/stdarg.h
@@ -6356,7 +6295,6 @@ enc/windows_1251.$(OBJEXT): assert.h
enc/windows_1251.$(OBJEXT): backward/2/assume.h
enc/windows_1251.$(OBJEXT): backward/2/attributes.h
enc/windows_1251.$(OBJEXT): backward/2/bool.h
-enc/windows_1251.$(OBJEXT): backward/2/gcc_version_since.h
enc/windows_1251.$(OBJEXT): backward/2/long_long.h
enc/windows_1251.$(OBJEXT): backward/2/stdalign.h
enc/windows_1251.$(OBJEXT): backward/2/stdarg.h
@@ -6412,7 +6350,6 @@ enc/windows_1252.$(OBJEXT): assert.h
enc/windows_1252.$(OBJEXT): backward/2/assume.h
enc/windows_1252.$(OBJEXT): backward/2/attributes.h
enc/windows_1252.$(OBJEXT): backward/2/bool.h
-enc/windows_1252.$(OBJEXT): backward/2/gcc_version_since.h
enc/windows_1252.$(OBJEXT): backward/2/long_long.h
enc/windows_1252.$(OBJEXT): backward/2/stdalign.h
enc/windows_1252.$(OBJEXT): backward/2/stdarg.h
@@ -6469,7 +6406,6 @@ enc/windows_1253.$(OBJEXT): assert.h
enc/windows_1253.$(OBJEXT): backward/2/assume.h
enc/windows_1253.$(OBJEXT): backward/2/attributes.h
enc/windows_1253.$(OBJEXT): backward/2/bool.h
-enc/windows_1253.$(OBJEXT): backward/2/gcc_version_since.h
enc/windows_1253.$(OBJEXT): backward/2/long_long.h
enc/windows_1253.$(OBJEXT): backward/2/stdalign.h
enc/windows_1253.$(OBJEXT): backward/2/stdarg.h
@@ -6525,7 +6461,6 @@ enc/windows_1254.$(OBJEXT): assert.h
enc/windows_1254.$(OBJEXT): backward/2/assume.h
enc/windows_1254.$(OBJEXT): backward/2/attributes.h
enc/windows_1254.$(OBJEXT): backward/2/bool.h
-enc/windows_1254.$(OBJEXT): backward/2/gcc_version_since.h
enc/windows_1254.$(OBJEXT): backward/2/long_long.h
enc/windows_1254.$(OBJEXT): backward/2/stdalign.h
enc/windows_1254.$(OBJEXT): backward/2/stdarg.h
@@ -6582,7 +6517,6 @@ enc/windows_1257.$(OBJEXT): assert.h
enc/windows_1257.$(OBJEXT): backward/2/assume.h
enc/windows_1257.$(OBJEXT): backward/2/attributes.h
enc/windows_1257.$(OBJEXT): backward/2/bool.h
-enc/windows_1257.$(OBJEXT): backward/2/gcc_version_since.h
enc/windows_1257.$(OBJEXT): backward/2/long_long.h
enc/windows_1257.$(OBJEXT): backward/2/stdalign.h
enc/windows_1257.$(OBJEXT): backward/2/stdarg.h
@@ -6639,7 +6573,6 @@ enc/windows_31j.$(OBJEXT): assert.h
enc/windows_31j.$(OBJEXT): backward/2/assume.h
enc/windows_31j.$(OBJEXT): backward/2/attributes.h
enc/windows_31j.$(OBJEXT): backward/2/bool.h
-enc/windows_31j.$(OBJEXT): backward/2/gcc_version_since.h
enc/windows_31j.$(OBJEXT): backward/2/long_long.h
enc/windows_31j.$(OBJEXT): backward/2/stdalign.h
enc/windows_31j.$(OBJEXT): backward/2/stdarg.h
diff --git a/eval.c b/eval.c
index 1cc699445faf3e..142413971052a9 100644
--- a/eval.c
+++ b/eval.c
@@ -1526,7 +1526,7 @@ refinement_import_methods_i(ID key, VALUE value, void *data)
struct refinement_import_methods_arg *arg = (struct refinement_import_methods_arg *)data;
if (me->def->type != VM_METHOD_TYPE_ISEQ) {
- rb_raise(rb_eArgError, "Can't import method: %"PRIsVALUE"#%"PRIsVALUE, rb_class_path(arg->module), rb_id2str(key));
+ rb_raise(rb_eArgError, "Can't import method which is not defined with Ruby code: %"PRIsVALUE"#%"PRIsVALUE, rb_class_path(arg->module), rb_id2str(key));
}
rb_cref_t *new_cref = rb_vm_cref_dup_without_refinements(me->def->body.iseq.cref);
CREF_REFINEMENTS_SET(new_cref, CREF_REFINEMENTS(arg->cref));
diff --git a/eval_intern.h b/eval_intern.h
index 58400b5f25702b..e858d79c3e09c8 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -173,11 +173,28 @@ rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st)
#define CREF_FL_PUSHED_BY_EVAL IMEMO_FL_USER1
#define CREF_FL_OMOD_SHARED IMEMO_FL_USER2
+#define CREF_FL_SINGLETON IMEMO_FL_USER3
+
+static inline int CREF_SINGLETON(const rb_cref_t *cref);
static inline VALUE
CREF_CLASS(const rb_cref_t *cref)
{
- return cref->klass;
+ if (CREF_SINGLETON(cref)) {
+ return CLASS_OF(cref->klass_or_self);
+ } else {
+ return cref->klass_or_self;
+ }
+}
+
+static inline VALUE
+CREF_CLASS_FOR_DEFINITION(const rb_cref_t *cref)
+{
+ if (CREF_SINGLETON(cref)) {
+ return rb_singleton_class(cref->klass_or_self);
+ } else {
+ return cref->klass_or_self;
+ }
}
static inline rb_cref_t *
@@ -216,6 +233,18 @@ CREF_PUSHED_BY_EVAL_SET(rb_cref_t *cref)
cref->flags |= CREF_FL_PUSHED_BY_EVAL;
}
+static inline int
+CREF_SINGLETON(const rb_cref_t *cref)
+{
+ return cref->flags & CREF_FL_SINGLETON;
+}
+
+static inline void
+CREF_SINGLETON_SET(rb_cref_t *cref)
+{
+ cref->flags |= CREF_FL_SINGLETON;
+}
+
static inline int
CREF_OMOD_SHARED(const rb_cref_t *cref)
{
diff --git a/ext/-test-/RUBY_ALIGNOF/depend b/ext/-test-/RUBY_ALIGNOF/depend
index 14dac0974c585b..f12fdf59cc7a99 100644
--- a/ext/-test-/RUBY_ALIGNOF/depend
+++ b/ext/-test-/RUBY_ALIGNOF/depend
@@ -7,7 +7,6 @@ c.o: $(hdrdir)/ruby/backward.h
c.o: $(hdrdir)/ruby/backward/2/assume.h
c.o: $(hdrdir)/ruby/backward/2/attributes.h
c.o: $(hdrdir)/ruby/backward/2/bool.h
-c.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
c.o: $(hdrdir)/ruby/backward/2/inttypes.h
c.o: $(hdrdir)/ruby/backward/2/limits.h
c.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/-test-/arith_seq/extract/depend b/ext/-test-/arith_seq/extract/depend
index 8bf12c5f47ded3..ac77825275389a 100644
--- a/ext/-test-/arith_seq/extract/depend
+++ b/ext/-test-/arith_seq/extract/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
extract.o: $(RUBY_EXTCONF_H)
extract.o: $(arch_hdrdir)/ruby/config.h
+extract.o: $(hdrdir)/ruby/assert.h
+extract.o: $(hdrdir)/ruby/backward.h
+extract.o: $(hdrdir)/ruby/backward/2/assume.h
+extract.o: $(hdrdir)/ruby/backward/2/attributes.h
+extract.o: $(hdrdir)/ruby/backward/2/bool.h
+extract.o: $(hdrdir)/ruby/backward/2/inttypes.h
+extract.o: $(hdrdir)/ruby/backward/2/limits.h
+extract.o: $(hdrdir)/ruby/backward/2/long_long.h
+extract.o: $(hdrdir)/ruby/backward/2/stdalign.h
+extract.o: $(hdrdir)/ruby/backward/2/stdarg.h
+extract.o: $(hdrdir)/ruby/defines.h
+extract.o: $(hdrdir)/ruby/intern.h
extract.o: $(hdrdir)/ruby/internal/anyargs.h
extract.o: $(hdrdir)/ruby/internal/arithmetic.h
extract.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ extract.o: $(hdrdir)/ruby/internal/value_type.h
extract.o: $(hdrdir)/ruby/internal/variable.h
extract.o: $(hdrdir)/ruby/internal/warning_push.h
extract.o: $(hdrdir)/ruby/internal/xmalloc.h
-extract.o: $(hdrdir)/ruby/assert.h
-extract.o: $(hdrdir)/ruby/backward.h
-extract.o: $(hdrdir)/ruby/backward/2/assume.h
-extract.o: $(hdrdir)/ruby/backward/2/attributes.h
-extract.o: $(hdrdir)/ruby/backward/2/bool.h
-extract.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-extract.o: $(hdrdir)/ruby/backward/2/inttypes.h
-extract.o: $(hdrdir)/ruby/backward/2/limits.h
-extract.o: $(hdrdir)/ruby/backward/2/long_long.h
-extract.o: $(hdrdir)/ruby/backward/2/stdalign.h
-extract.o: $(hdrdir)/ruby/backward/2/stdarg.h
-extract.o: $(hdrdir)/ruby/defines.h
-extract.o: $(hdrdir)/ruby/intern.h
extract.o: $(hdrdir)/ruby/missing.h
extract.o: $(hdrdir)/ruby/ruby.h
extract.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/array/concat/depend b/ext/-test-/array/concat/depend
index bcd5abd0c7d4b9..e1d49bc6486222 100644
--- a/ext/-test-/array/concat/depend
+++ b/ext/-test-/array/concat/depend
@@ -1,163 +1,4 @@
# AUTOGENERATED DEPENDENCIES START
-resize.o: $(RUBY_EXTCONF_H)
-resize.o: $(arch_hdrdir)/ruby/config.h
-resize.o: $(hdrdir)/ruby/assert.h
-resize.o: $(hdrdir)/ruby/backward.h
-resize.o: $(hdrdir)/ruby/backward/2/assume.h
-resize.o: $(hdrdir)/ruby/backward/2/attributes.h
-resize.o: $(hdrdir)/ruby/backward/2/bool.h
-resize.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-resize.o: $(hdrdir)/ruby/backward/2/inttypes.h
-resize.o: $(hdrdir)/ruby/backward/2/limits.h
-resize.o: $(hdrdir)/ruby/backward/2/long_long.h
-resize.o: $(hdrdir)/ruby/backward/2/stdalign.h
-resize.o: $(hdrdir)/ruby/backward/2/stdarg.h
-resize.o: $(hdrdir)/ruby/defines.h
-resize.o: $(hdrdir)/ruby/intern.h
-resize.o: $(hdrdir)/ruby/internal/anyargs.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/char.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/double.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/int.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/long.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/short.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
-resize.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
-resize.o: $(hdrdir)/ruby/internal/assume.h
-resize.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
-resize.o: $(hdrdir)/ruby/internal/attr/artificial.h
-resize.o: $(hdrdir)/ruby/internal/attr/cold.h
-resize.o: $(hdrdir)/ruby/internal/attr/const.h
-resize.o: $(hdrdir)/ruby/internal/attr/constexpr.h
-resize.o: $(hdrdir)/ruby/internal/attr/deprecated.h
-resize.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
-resize.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
-resize.o: $(hdrdir)/ruby/internal/attr/error.h
-resize.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
-resize.o: $(hdrdir)/ruby/internal/attr/forceinline.h
-resize.o: $(hdrdir)/ruby/internal/attr/format.h
-resize.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
-resize.o: $(hdrdir)/ruby/internal/attr/noalias.h
-resize.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
-resize.o: $(hdrdir)/ruby/internal/attr/noexcept.h
-resize.o: $(hdrdir)/ruby/internal/attr/noinline.h
-resize.o: $(hdrdir)/ruby/internal/attr/nonnull.h
-resize.o: $(hdrdir)/ruby/internal/attr/noreturn.h
-resize.o: $(hdrdir)/ruby/internal/attr/pure.h
-resize.o: $(hdrdir)/ruby/internal/attr/restrict.h
-resize.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
-resize.o: $(hdrdir)/ruby/internal/attr/warning.h
-resize.o: $(hdrdir)/ruby/internal/attr/weakref.h
-resize.o: $(hdrdir)/ruby/internal/cast.h
-resize.o: $(hdrdir)/ruby/internal/compiler_is.h
-resize.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
-resize.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
-resize.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
-resize.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
-resize.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
-resize.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
-resize.o: $(hdrdir)/ruby/internal/compiler_since.h
-resize.o: $(hdrdir)/ruby/internal/config.h
-resize.o: $(hdrdir)/ruby/internal/constant_p.h
-resize.o: $(hdrdir)/ruby/internal/core.h
-resize.o: $(hdrdir)/ruby/internal/core/rarray.h
-resize.o: $(hdrdir)/ruby/internal/core/rbasic.h
-resize.o: $(hdrdir)/ruby/internal/core/rbignum.h
-resize.o: $(hdrdir)/ruby/internal/core/rclass.h
-resize.o: $(hdrdir)/ruby/internal/core/rdata.h
-resize.o: $(hdrdir)/ruby/internal/core/rfile.h
-resize.o: $(hdrdir)/ruby/internal/core/rhash.h
-resize.o: $(hdrdir)/ruby/internal/core/robject.h
-resize.o: $(hdrdir)/ruby/internal/core/rregexp.h
-resize.o: $(hdrdir)/ruby/internal/core/rstring.h
-resize.o: $(hdrdir)/ruby/internal/core/rstruct.h
-resize.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
-resize.o: $(hdrdir)/ruby/internal/ctype.h
-resize.o: $(hdrdir)/ruby/internal/dllexport.h
-resize.o: $(hdrdir)/ruby/internal/dosish.h
-resize.o: $(hdrdir)/ruby/internal/error.h
-resize.o: $(hdrdir)/ruby/internal/eval.h
-resize.o: $(hdrdir)/ruby/internal/event.h
-resize.o: $(hdrdir)/ruby/internal/fl_type.h
-resize.o: $(hdrdir)/ruby/internal/gc.h
-resize.o: $(hdrdir)/ruby/internal/glob.h
-resize.o: $(hdrdir)/ruby/internal/globals.h
-resize.o: $(hdrdir)/ruby/internal/has/attribute.h
-resize.o: $(hdrdir)/ruby/internal/has/builtin.h
-resize.o: $(hdrdir)/ruby/internal/has/c_attribute.h
-resize.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
-resize.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
-resize.o: $(hdrdir)/ruby/internal/has/extension.h
-resize.o: $(hdrdir)/ruby/internal/has/feature.h
-resize.o: $(hdrdir)/ruby/internal/has/warning.h
-resize.o: $(hdrdir)/ruby/internal/intern/array.h
-resize.o: $(hdrdir)/ruby/internal/intern/bignum.h
-resize.o: $(hdrdir)/ruby/internal/intern/class.h
-resize.o: $(hdrdir)/ruby/internal/intern/compar.h
-resize.o: $(hdrdir)/ruby/internal/intern/complex.h
-resize.o: $(hdrdir)/ruby/internal/intern/cont.h
-resize.o: $(hdrdir)/ruby/internal/intern/dir.h
-resize.o: $(hdrdir)/ruby/internal/intern/enum.h
-resize.o: $(hdrdir)/ruby/internal/intern/enumerator.h
-resize.o: $(hdrdir)/ruby/internal/intern/error.h
-resize.o: $(hdrdir)/ruby/internal/intern/eval.h
-resize.o: $(hdrdir)/ruby/internal/intern/file.h
-resize.o: $(hdrdir)/ruby/internal/intern/gc.h
-resize.o: $(hdrdir)/ruby/internal/intern/hash.h
-resize.o: $(hdrdir)/ruby/internal/intern/io.h
-resize.o: $(hdrdir)/ruby/internal/intern/load.h
-resize.o: $(hdrdir)/ruby/internal/intern/marshal.h
-resize.o: $(hdrdir)/ruby/internal/intern/numeric.h
-resize.o: $(hdrdir)/ruby/internal/intern/object.h
-resize.o: $(hdrdir)/ruby/internal/intern/parse.h
-resize.o: $(hdrdir)/ruby/internal/intern/proc.h
-resize.o: $(hdrdir)/ruby/internal/intern/process.h
-resize.o: $(hdrdir)/ruby/internal/intern/random.h
-resize.o: $(hdrdir)/ruby/internal/intern/range.h
-resize.o: $(hdrdir)/ruby/internal/intern/rational.h
-resize.o: $(hdrdir)/ruby/internal/intern/re.h
-resize.o: $(hdrdir)/ruby/internal/intern/ruby.h
-resize.o: $(hdrdir)/ruby/internal/intern/select.h
-resize.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
-resize.o: $(hdrdir)/ruby/internal/intern/signal.h
-resize.o: $(hdrdir)/ruby/internal/intern/sprintf.h
-resize.o: $(hdrdir)/ruby/internal/intern/string.h
-resize.o: $(hdrdir)/ruby/internal/intern/struct.h
-resize.o: $(hdrdir)/ruby/internal/intern/thread.h
-resize.o: $(hdrdir)/ruby/internal/intern/time.h
-resize.o: $(hdrdir)/ruby/internal/intern/variable.h
-resize.o: $(hdrdir)/ruby/internal/intern/vm.h
-resize.o: $(hdrdir)/ruby/internal/interpreter.h
-resize.o: $(hdrdir)/ruby/internal/iterator.h
-resize.o: $(hdrdir)/ruby/internal/memory.h
-resize.o: $(hdrdir)/ruby/internal/method.h
-resize.o: $(hdrdir)/ruby/internal/module.h
-resize.o: $(hdrdir)/ruby/internal/newobj.h
-resize.o: $(hdrdir)/ruby/internal/rgengc.h
-resize.o: $(hdrdir)/ruby/internal/scan_args.h
-resize.o: $(hdrdir)/ruby/internal/special_consts.h
-resize.o: $(hdrdir)/ruby/internal/static_assert.h
-resize.o: $(hdrdir)/ruby/internal/stdalign.h
-resize.o: $(hdrdir)/ruby/internal/stdbool.h
-resize.o: $(hdrdir)/ruby/internal/symbol.h
-resize.o: $(hdrdir)/ruby/internal/value.h
-resize.o: $(hdrdir)/ruby/internal/value_type.h
-resize.o: $(hdrdir)/ruby/internal/variable.h
-resize.o: $(hdrdir)/ruby/internal/warning_push.h
-resize.o: $(hdrdir)/ruby/internal/xmalloc.h
-resize.o: $(hdrdir)/ruby/missing.h
-resize.o: $(hdrdir)/ruby/ruby.h
-resize.o: $(hdrdir)/ruby/st.h
-resize.o: $(hdrdir)/ruby/subst.h
-resize.o: resize.c
to_ary_concat.o: $(RUBY_EXTCONF_H)
to_ary_concat.o: $(arch_hdrdir)/ruby/config.h
to_ary_concat.o: $(hdrdir)/ruby.h
@@ -166,7 +7,6 @@ to_ary_concat.o: $(hdrdir)/ruby/backward.h
to_ary_concat.o: $(hdrdir)/ruby/backward/2/assume.h
to_ary_concat.o: $(hdrdir)/ruby/backward/2/attributes.h
to_ary_concat.o: $(hdrdir)/ruby/backward/2/bool.h
-to_ary_concat.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
to_ary_concat.o: $(hdrdir)/ruby/backward/2/inttypes.h
to_ary_concat.o: $(hdrdir)/ruby/backward/2/limits.h
to_ary_concat.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/-test-/array/resize/depend b/ext/-test-/array/resize/depend
index cf0c2320ae8925..bd0b1bf280ca35 100644
--- a/ext/-test-/array/resize/depend
+++ b/ext/-test-/array/resize/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
resize.o: $(RUBY_EXTCONF_H)
resize.o: $(arch_hdrdir)/ruby/config.h
+resize.o: $(hdrdir)/ruby/assert.h
+resize.o: $(hdrdir)/ruby/backward.h
+resize.o: $(hdrdir)/ruby/backward/2/assume.h
+resize.o: $(hdrdir)/ruby/backward/2/attributes.h
+resize.o: $(hdrdir)/ruby/backward/2/bool.h
+resize.o: $(hdrdir)/ruby/backward/2/inttypes.h
+resize.o: $(hdrdir)/ruby/backward/2/limits.h
+resize.o: $(hdrdir)/ruby/backward/2/long_long.h
+resize.o: $(hdrdir)/ruby/backward/2/stdalign.h
+resize.o: $(hdrdir)/ruby/backward/2/stdarg.h
+resize.o: $(hdrdir)/ruby/defines.h
+resize.o: $(hdrdir)/ruby/intern.h
resize.o: $(hdrdir)/ruby/internal/anyargs.h
resize.o: $(hdrdir)/ruby/internal/arithmetic.h
resize.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ resize.o: $(hdrdir)/ruby/internal/value_type.h
resize.o: $(hdrdir)/ruby/internal/variable.h
resize.o: $(hdrdir)/ruby/internal/warning_push.h
resize.o: $(hdrdir)/ruby/internal/xmalloc.h
-resize.o: $(hdrdir)/ruby/assert.h
-resize.o: $(hdrdir)/ruby/backward.h
-resize.o: $(hdrdir)/ruby/backward/2/assume.h
-resize.o: $(hdrdir)/ruby/backward/2/attributes.h
-resize.o: $(hdrdir)/ruby/backward/2/bool.h
-resize.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-resize.o: $(hdrdir)/ruby/backward/2/inttypes.h
-resize.o: $(hdrdir)/ruby/backward/2/limits.h
-resize.o: $(hdrdir)/ruby/backward/2/long_long.h
-resize.o: $(hdrdir)/ruby/backward/2/stdalign.h
-resize.o: $(hdrdir)/ruby/backward/2/stdarg.h
-resize.o: $(hdrdir)/ruby/defines.h
-resize.o: $(hdrdir)/ruby/intern.h
resize.o: $(hdrdir)/ruby/missing.h
resize.o: $(hdrdir)/ruby/ruby.h
resize.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/bignum/depend b/ext/-test-/bignum/depend
index ddc1e63570d4eb..28edc15f2b373a 100644
--- a/ext/-test-/bignum/depend
+++ b/ext/-test-/bignum/depend
@@ -1,7 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
big2str.o: $(RUBY_EXTCONF_H)
big2str.o: $(arch_hdrdir)/ruby/config.h
-big2str.o: $(hdrdir)/ruby.h
+big2str.o: $(hdrdir)/ruby/assert.h
+big2str.o: $(hdrdir)/ruby/backward.h
+big2str.o: $(hdrdir)/ruby/backward/2/assume.h
+big2str.o: $(hdrdir)/ruby/backward/2/attributes.h
+big2str.o: $(hdrdir)/ruby/backward/2/bool.h
+big2str.o: $(hdrdir)/ruby/backward/2/inttypes.h
+big2str.o: $(hdrdir)/ruby/backward/2/limits.h
+big2str.o: $(hdrdir)/ruby/backward/2/long_long.h
+big2str.o: $(hdrdir)/ruby/backward/2/stdalign.h
+big2str.o: $(hdrdir)/ruby/backward/2/stdarg.h
+big2str.o: $(hdrdir)/ruby/defines.h
+big2str.o: $(hdrdir)/ruby/intern.h
big2str.o: $(hdrdir)/ruby/internal/anyargs.h
big2str.o: $(hdrdir)/ruby/internal/arithmetic.h
big2str.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,29 +152,26 @@ big2str.o: $(hdrdir)/ruby/internal/value_type.h
big2str.o: $(hdrdir)/ruby/internal/variable.h
big2str.o: $(hdrdir)/ruby/internal/warning_push.h
big2str.o: $(hdrdir)/ruby/internal/xmalloc.h
-big2str.o: $(hdrdir)/ruby/assert.h
-big2str.o: $(hdrdir)/ruby/backward.h
-big2str.o: $(hdrdir)/ruby/backward/2/assume.h
-big2str.o: $(hdrdir)/ruby/backward/2/attributes.h
-big2str.o: $(hdrdir)/ruby/backward/2/bool.h
-big2str.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-big2str.o: $(hdrdir)/ruby/backward/2/inttypes.h
-big2str.o: $(hdrdir)/ruby/backward/2/limits.h
-big2str.o: $(hdrdir)/ruby/backward/2/long_long.h
-big2str.o: $(hdrdir)/ruby/backward/2/stdalign.h
-big2str.o: $(hdrdir)/ruby/backward/2/stdarg.h
-big2str.o: $(hdrdir)/ruby/defines.h
-big2str.o: $(hdrdir)/ruby/intern.h
big2str.o: $(hdrdir)/ruby/missing.h
big2str.o: $(hdrdir)/ruby/ruby.h
big2str.o: $(hdrdir)/ruby/st.h
big2str.o: $(hdrdir)/ruby/subst.h
-big2str.o: $(top_srcdir)/internal.h
big2str.o: $(top_srcdir)/internal/bignum.h
big2str.o: big2str.c
bigzero.o: $(RUBY_EXTCONF_H)
bigzero.o: $(arch_hdrdir)/ruby/config.h
-bigzero.o: $(hdrdir)/ruby.h
+bigzero.o: $(hdrdir)/ruby/assert.h
+bigzero.o: $(hdrdir)/ruby/backward.h
+bigzero.o: $(hdrdir)/ruby/backward/2/assume.h
+bigzero.o: $(hdrdir)/ruby/backward/2/attributes.h
+bigzero.o: $(hdrdir)/ruby/backward/2/bool.h
+bigzero.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bigzero.o: $(hdrdir)/ruby/backward/2/limits.h
+bigzero.o: $(hdrdir)/ruby/backward/2/long_long.h
+bigzero.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bigzero.o: $(hdrdir)/ruby/backward/2/stdarg.h
+bigzero.o: $(hdrdir)/ruby/defines.h
+bigzero.o: $(hdrdir)/ruby/intern.h
bigzero.o: $(hdrdir)/ruby/internal/anyargs.h
bigzero.o: $(hdrdir)/ruby/internal/arithmetic.h
bigzero.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -303,29 +311,26 @@ bigzero.o: $(hdrdir)/ruby/internal/value_type.h
bigzero.o: $(hdrdir)/ruby/internal/variable.h
bigzero.o: $(hdrdir)/ruby/internal/warning_push.h
bigzero.o: $(hdrdir)/ruby/internal/xmalloc.h
-bigzero.o: $(hdrdir)/ruby/assert.h
-bigzero.o: $(hdrdir)/ruby/backward.h
-bigzero.o: $(hdrdir)/ruby/backward/2/assume.h
-bigzero.o: $(hdrdir)/ruby/backward/2/attributes.h
-bigzero.o: $(hdrdir)/ruby/backward/2/bool.h
-bigzero.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-bigzero.o: $(hdrdir)/ruby/backward/2/inttypes.h
-bigzero.o: $(hdrdir)/ruby/backward/2/limits.h
-bigzero.o: $(hdrdir)/ruby/backward/2/long_long.h
-bigzero.o: $(hdrdir)/ruby/backward/2/stdalign.h
-bigzero.o: $(hdrdir)/ruby/backward/2/stdarg.h
-bigzero.o: $(hdrdir)/ruby/defines.h
-bigzero.o: $(hdrdir)/ruby/intern.h
bigzero.o: $(hdrdir)/ruby/missing.h
bigzero.o: $(hdrdir)/ruby/ruby.h
bigzero.o: $(hdrdir)/ruby/st.h
bigzero.o: $(hdrdir)/ruby/subst.h
-bigzero.o: $(top_srcdir)/internal.h
bigzero.o: $(top_srcdir)/internal/bignum.h
bigzero.o: bigzero.c
div.o: $(RUBY_EXTCONF_H)
div.o: $(arch_hdrdir)/ruby/config.h
-div.o: $(hdrdir)/ruby.h
+div.o: $(hdrdir)/ruby/assert.h
+div.o: $(hdrdir)/ruby/backward.h
+div.o: $(hdrdir)/ruby/backward/2/assume.h
+div.o: $(hdrdir)/ruby/backward/2/attributes.h
+div.o: $(hdrdir)/ruby/backward/2/bool.h
+div.o: $(hdrdir)/ruby/backward/2/inttypes.h
+div.o: $(hdrdir)/ruby/backward/2/limits.h
+div.o: $(hdrdir)/ruby/backward/2/long_long.h
+div.o: $(hdrdir)/ruby/backward/2/stdalign.h
+div.o: $(hdrdir)/ruby/backward/2/stdarg.h
+div.o: $(hdrdir)/ruby/defines.h
+div.o: $(hdrdir)/ruby/intern.h
div.o: $(hdrdir)/ruby/internal/anyargs.h
div.o: $(hdrdir)/ruby/internal/arithmetic.h
div.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -465,29 +470,27 @@ div.o: $(hdrdir)/ruby/internal/value_type.h
div.o: $(hdrdir)/ruby/internal/variable.h
div.o: $(hdrdir)/ruby/internal/warning_push.h
div.o: $(hdrdir)/ruby/internal/xmalloc.h
-div.o: $(hdrdir)/ruby/assert.h
-div.o: $(hdrdir)/ruby/backward.h
-div.o: $(hdrdir)/ruby/backward/2/assume.h
-div.o: $(hdrdir)/ruby/backward/2/attributes.h
-div.o: $(hdrdir)/ruby/backward/2/bool.h
-div.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-div.o: $(hdrdir)/ruby/backward/2/inttypes.h
-div.o: $(hdrdir)/ruby/backward/2/limits.h
-div.o: $(hdrdir)/ruby/backward/2/long_long.h
-div.o: $(hdrdir)/ruby/backward/2/stdalign.h
-div.o: $(hdrdir)/ruby/backward/2/stdarg.h
-div.o: $(hdrdir)/ruby/defines.h
-div.o: $(hdrdir)/ruby/intern.h
div.o: $(hdrdir)/ruby/missing.h
div.o: $(hdrdir)/ruby/ruby.h
div.o: $(hdrdir)/ruby/st.h
div.o: $(hdrdir)/ruby/subst.h
-div.o: $(top_srcdir)/internal.h
div.o: $(top_srcdir)/internal/bignum.h
div.o: div.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -627,19 +630,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -647,7 +637,18 @@ init.o: $(hdrdir)/ruby/subst.h
init.o: init.c
intpack.o: $(RUBY_EXTCONF_H)
intpack.o: $(arch_hdrdir)/ruby/config.h
-intpack.o: $(hdrdir)/ruby.h
+intpack.o: $(hdrdir)/ruby/assert.h
+intpack.o: $(hdrdir)/ruby/backward.h
+intpack.o: $(hdrdir)/ruby/backward/2/assume.h
+intpack.o: $(hdrdir)/ruby/backward/2/attributes.h
+intpack.o: $(hdrdir)/ruby/backward/2/bool.h
+intpack.o: $(hdrdir)/ruby/backward/2/inttypes.h
+intpack.o: $(hdrdir)/ruby/backward/2/limits.h
+intpack.o: $(hdrdir)/ruby/backward/2/long_long.h
+intpack.o: $(hdrdir)/ruby/backward/2/stdalign.h
+intpack.o: $(hdrdir)/ruby/backward/2/stdarg.h
+intpack.o: $(hdrdir)/ruby/defines.h
+intpack.o: $(hdrdir)/ruby/intern.h
intpack.o: $(hdrdir)/ruby/internal/anyargs.h
intpack.o: $(hdrdir)/ruby/internal/arithmetic.h
intpack.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -787,29 +788,26 @@ intpack.o: $(hdrdir)/ruby/internal/value_type.h
intpack.o: $(hdrdir)/ruby/internal/variable.h
intpack.o: $(hdrdir)/ruby/internal/warning_push.h
intpack.o: $(hdrdir)/ruby/internal/xmalloc.h
-intpack.o: $(hdrdir)/ruby/assert.h
-intpack.o: $(hdrdir)/ruby/backward.h
-intpack.o: $(hdrdir)/ruby/backward/2/assume.h
-intpack.o: $(hdrdir)/ruby/backward/2/attributes.h
-intpack.o: $(hdrdir)/ruby/backward/2/bool.h
-intpack.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-intpack.o: $(hdrdir)/ruby/backward/2/inttypes.h
-intpack.o: $(hdrdir)/ruby/backward/2/limits.h
-intpack.o: $(hdrdir)/ruby/backward/2/long_long.h
-intpack.o: $(hdrdir)/ruby/backward/2/stdalign.h
-intpack.o: $(hdrdir)/ruby/backward/2/stdarg.h
-intpack.o: $(hdrdir)/ruby/defines.h
-intpack.o: $(hdrdir)/ruby/intern.h
intpack.o: $(hdrdir)/ruby/missing.h
intpack.o: $(hdrdir)/ruby/ruby.h
intpack.o: $(hdrdir)/ruby/st.h
intpack.o: $(hdrdir)/ruby/subst.h
-intpack.o: $(top_srcdir)/internal.h
intpack.o: $(top_srcdir)/internal/bignum.h
intpack.o: intpack.c
mul.o: $(RUBY_EXTCONF_H)
mul.o: $(arch_hdrdir)/ruby/config.h
-mul.o: $(hdrdir)/ruby.h
+mul.o: $(hdrdir)/ruby/assert.h
+mul.o: $(hdrdir)/ruby/backward.h
+mul.o: $(hdrdir)/ruby/backward/2/assume.h
+mul.o: $(hdrdir)/ruby/backward/2/attributes.h
+mul.o: $(hdrdir)/ruby/backward/2/bool.h
+mul.o: $(hdrdir)/ruby/backward/2/inttypes.h
+mul.o: $(hdrdir)/ruby/backward/2/limits.h
+mul.o: $(hdrdir)/ruby/backward/2/long_long.h
+mul.o: $(hdrdir)/ruby/backward/2/stdalign.h
+mul.o: $(hdrdir)/ruby/backward/2/stdarg.h
+mul.o: $(hdrdir)/ruby/defines.h
+mul.o: $(hdrdir)/ruby/intern.h
mul.o: $(hdrdir)/ruby/internal/anyargs.h
mul.o: $(hdrdir)/ruby/internal/arithmetic.h
mul.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -949,29 +947,26 @@ mul.o: $(hdrdir)/ruby/internal/value_type.h
mul.o: $(hdrdir)/ruby/internal/variable.h
mul.o: $(hdrdir)/ruby/internal/warning_push.h
mul.o: $(hdrdir)/ruby/internal/xmalloc.h
-mul.o: $(hdrdir)/ruby/assert.h
-mul.o: $(hdrdir)/ruby/backward.h
-mul.o: $(hdrdir)/ruby/backward/2/assume.h
-mul.o: $(hdrdir)/ruby/backward/2/attributes.h
-mul.o: $(hdrdir)/ruby/backward/2/bool.h
-mul.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-mul.o: $(hdrdir)/ruby/backward/2/inttypes.h
-mul.o: $(hdrdir)/ruby/backward/2/limits.h
-mul.o: $(hdrdir)/ruby/backward/2/long_long.h
-mul.o: $(hdrdir)/ruby/backward/2/stdalign.h
-mul.o: $(hdrdir)/ruby/backward/2/stdarg.h
-mul.o: $(hdrdir)/ruby/defines.h
-mul.o: $(hdrdir)/ruby/intern.h
mul.o: $(hdrdir)/ruby/missing.h
mul.o: $(hdrdir)/ruby/ruby.h
mul.o: $(hdrdir)/ruby/st.h
mul.o: $(hdrdir)/ruby/subst.h
-mul.o: $(top_srcdir)/internal.h
mul.o: $(top_srcdir)/internal/bignum.h
mul.o: mul.c
str2big.o: $(RUBY_EXTCONF_H)
str2big.o: $(arch_hdrdir)/ruby/config.h
-str2big.o: $(hdrdir)/ruby.h
+str2big.o: $(hdrdir)/ruby/assert.h
+str2big.o: $(hdrdir)/ruby/backward.h
+str2big.o: $(hdrdir)/ruby/backward/2/assume.h
+str2big.o: $(hdrdir)/ruby/backward/2/attributes.h
+str2big.o: $(hdrdir)/ruby/backward/2/bool.h
+str2big.o: $(hdrdir)/ruby/backward/2/inttypes.h
+str2big.o: $(hdrdir)/ruby/backward/2/limits.h
+str2big.o: $(hdrdir)/ruby/backward/2/long_long.h
+str2big.o: $(hdrdir)/ruby/backward/2/stdalign.h
+str2big.o: $(hdrdir)/ruby/backward/2/stdarg.h
+str2big.o: $(hdrdir)/ruby/defines.h
+str2big.o: $(hdrdir)/ruby/intern.h
str2big.o: $(hdrdir)/ruby/internal/anyargs.h
str2big.o: $(hdrdir)/ruby/internal/arithmetic.h
str2big.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -1111,24 +1106,10 @@ str2big.o: $(hdrdir)/ruby/internal/value_type.h
str2big.o: $(hdrdir)/ruby/internal/variable.h
str2big.o: $(hdrdir)/ruby/internal/warning_push.h
str2big.o: $(hdrdir)/ruby/internal/xmalloc.h
-str2big.o: $(hdrdir)/ruby/assert.h
-str2big.o: $(hdrdir)/ruby/backward.h
-str2big.o: $(hdrdir)/ruby/backward/2/assume.h
-str2big.o: $(hdrdir)/ruby/backward/2/attributes.h
-str2big.o: $(hdrdir)/ruby/backward/2/bool.h
-str2big.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-str2big.o: $(hdrdir)/ruby/backward/2/inttypes.h
-str2big.o: $(hdrdir)/ruby/backward/2/limits.h
-str2big.o: $(hdrdir)/ruby/backward/2/long_long.h
-str2big.o: $(hdrdir)/ruby/backward/2/stdalign.h
-str2big.o: $(hdrdir)/ruby/backward/2/stdarg.h
-str2big.o: $(hdrdir)/ruby/defines.h
-str2big.o: $(hdrdir)/ruby/intern.h
str2big.o: $(hdrdir)/ruby/missing.h
str2big.o: $(hdrdir)/ruby/ruby.h
str2big.o: $(hdrdir)/ruby/st.h
str2big.o: $(hdrdir)/ruby/subst.h
-str2big.o: $(top_srcdir)/internal.h
str2big.o: $(top_srcdir)/internal/bignum.h
str2big.o: str2big.c
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/bug-14834/depend b/ext/-test-/bug-14834/depend
index 5bbaf170897f6d..0867139906db42 100644
--- a/ext/-test-/bug-14834/depend
+++ b/ext/-test-/bug-14834/depend
@@ -1,6 +1,19 @@
# AUTOGENERATED DEPENDENCIES START
bug-14384.o: $(RUBY_EXTCONF_H)
bug-14384.o: $(arch_hdrdir)/ruby/config.h
+bug-14384.o: $(hdrdir)/ruby/assert.h
+bug-14384.o: $(hdrdir)/ruby/backward.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/assume.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/attributes.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/bool.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/limits.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/long_long.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bug-14384.o: $(hdrdir)/ruby/backward/2/stdarg.h
+bug-14384.o: $(hdrdir)/ruby/debug.h
+bug-14384.o: $(hdrdir)/ruby/defines.h
+bug-14384.o: $(hdrdir)/ruby/intern.h
bug-14384.o: $(hdrdir)/ruby/internal/anyargs.h
bug-14384.o: $(hdrdir)/ruby/internal/arithmetic.h
bug-14384.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,20 +153,6 @@ bug-14384.o: $(hdrdir)/ruby/internal/value_type.h
bug-14384.o: $(hdrdir)/ruby/internal/variable.h
bug-14384.o: $(hdrdir)/ruby/internal/warning_push.h
bug-14384.o: $(hdrdir)/ruby/internal/xmalloc.h
-bug-14384.o: $(hdrdir)/ruby/assert.h
-bug-14384.o: $(hdrdir)/ruby/backward.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/assume.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/attributes.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/bool.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/inttypes.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/limits.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/long_long.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/stdalign.h
-bug-14384.o: $(hdrdir)/ruby/backward/2/stdarg.h
-bug-14384.o: $(hdrdir)/ruby/debug.h
-bug-14384.o: $(hdrdir)/ruby/defines.h
-bug-14384.o: $(hdrdir)/ruby/intern.h
bug-14384.o: $(hdrdir)/ruby/missing.h
bug-14384.o: $(hdrdir)/ruby/ruby.h
bug-14384.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/bug-3571/depend b/ext/-test-/bug-3571/depend
index 506795a137deb2..73d1fec43516fe 100644
--- a/ext/-test-/bug-3571/depend
+++ b/ext/-test-/bug-3571/depend
@@ -2,6 +2,18 @@
bug.o: $(RUBY_EXTCONF_H)
bug.o: $(arch_hdrdir)/ruby/config.h
bug.o: $(hdrdir)/ruby.h
+bug.o: $(hdrdir)/ruby/assert.h
+bug.o: $(hdrdir)/ruby/backward.h
+bug.o: $(hdrdir)/ruby/backward/2/assume.h
+bug.o: $(hdrdir)/ruby/backward/2/attributes.h
+bug.o: $(hdrdir)/ruby/backward/2/bool.h
+bug.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bug.o: $(hdrdir)/ruby/backward/2/limits.h
+bug.o: $(hdrdir)/ruby/backward/2/long_long.h
+bug.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bug.o: $(hdrdir)/ruby/backward/2/stdarg.h
+bug.o: $(hdrdir)/ruby/defines.h
+bug.o: $(hdrdir)/ruby/intern.h
bug.o: $(hdrdir)/ruby/internal/anyargs.h
bug.o: $(hdrdir)/ruby/internal/arithmetic.h
bug.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ bug.o: $(hdrdir)/ruby/internal/value_type.h
bug.o: $(hdrdir)/ruby/internal/variable.h
bug.o: $(hdrdir)/ruby/internal/warning_push.h
bug.o: $(hdrdir)/ruby/internal/xmalloc.h
-bug.o: $(hdrdir)/ruby/assert.h
-bug.o: $(hdrdir)/ruby/backward.h
-bug.o: $(hdrdir)/ruby/backward/2/assume.h
-bug.o: $(hdrdir)/ruby/backward/2/attributes.h
-bug.o: $(hdrdir)/ruby/backward/2/bool.h
-bug.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-bug.o: $(hdrdir)/ruby/backward/2/inttypes.h
-bug.o: $(hdrdir)/ruby/backward/2/limits.h
-bug.o: $(hdrdir)/ruby/backward/2/long_long.h
-bug.o: $(hdrdir)/ruby/backward/2/stdalign.h
-bug.o: $(hdrdir)/ruby/backward/2/stdarg.h
-bug.o: $(hdrdir)/ruby/defines.h
-bug.o: $(hdrdir)/ruby/intern.h
bug.o: $(hdrdir)/ruby/missing.h
bug.o: $(hdrdir)/ruby/ruby.h
bug.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/bug-5832/depend b/ext/-test-/bug-5832/depend
index 506795a137deb2..73d1fec43516fe 100644
--- a/ext/-test-/bug-5832/depend
+++ b/ext/-test-/bug-5832/depend
@@ -2,6 +2,18 @@
bug.o: $(RUBY_EXTCONF_H)
bug.o: $(arch_hdrdir)/ruby/config.h
bug.o: $(hdrdir)/ruby.h
+bug.o: $(hdrdir)/ruby/assert.h
+bug.o: $(hdrdir)/ruby/backward.h
+bug.o: $(hdrdir)/ruby/backward/2/assume.h
+bug.o: $(hdrdir)/ruby/backward/2/attributes.h
+bug.o: $(hdrdir)/ruby/backward/2/bool.h
+bug.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bug.o: $(hdrdir)/ruby/backward/2/limits.h
+bug.o: $(hdrdir)/ruby/backward/2/long_long.h
+bug.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bug.o: $(hdrdir)/ruby/backward/2/stdarg.h
+bug.o: $(hdrdir)/ruby/defines.h
+bug.o: $(hdrdir)/ruby/intern.h
bug.o: $(hdrdir)/ruby/internal/anyargs.h
bug.o: $(hdrdir)/ruby/internal/arithmetic.h
bug.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ bug.o: $(hdrdir)/ruby/internal/value_type.h
bug.o: $(hdrdir)/ruby/internal/variable.h
bug.o: $(hdrdir)/ruby/internal/warning_push.h
bug.o: $(hdrdir)/ruby/internal/xmalloc.h
-bug.o: $(hdrdir)/ruby/assert.h
-bug.o: $(hdrdir)/ruby/backward.h
-bug.o: $(hdrdir)/ruby/backward/2/assume.h
-bug.o: $(hdrdir)/ruby/backward/2/attributes.h
-bug.o: $(hdrdir)/ruby/backward/2/bool.h
-bug.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-bug.o: $(hdrdir)/ruby/backward/2/inttypes.h
-bug.o: $(hdrdir)/ruby/backward/2/limits.h
-bug.o: $(hdrdir)/ruby/backward/2/long_long.h
-bug.o: $(hdrdir)/ruby/backward/2/stdalign.h
-bug.o: $(hdrdir)/ruby/backward/2/stdarg.h
-bug.o: $(hdrdir)/ruby/defines.h
-bug.o: $(hdrdir)/ruby/intern.h
bug.o: $(hdrdir)/ruby/missing.h
bug.o: $(hdrdir)/ruby/ruby.h
bug.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/bug_reporter/depend b/ext/-test-/bug_reporter/depend
index 0eadef5d8205d9..d36d0fb6c25322 100644
--- a/ext/-test-/bug_reporter/depend
+++ b/ext/-test-/bug_reporter/depend
@@ -2,6 +2,18 @@
bug_reporter.o: $(RUBY_EXTCONF_H)
bug_reporter.o: $(arch_hdrdir)/ruby/config.h
bug_reporter.o: $(hdrdir)/ruby.h
+bug_reporter.o: $(hdrdir)/ruby/assert.h
+bug_reporter.o: $(hdrdir)/ruby/backward.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/assume.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/attributes.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/bool.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/limits.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/long_long.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bug_reporter.o: $(hdrdir)/ruby/backward/2/stdarg.h
+bug_reporter.o: $(hdrdir)/ruby/defines.h
+bug_reporter.o: $(hdrdir)/ruby/intern.h
bug_reporter.o: $(hdrdir)/ruby/internal/anyargs.h
bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic.h
bug_reporter.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ bug_reporter.o: $(hdrdir)/ruby/internal/value_type.h
bug_reporter.o: $(hdrdir)/ruby/internal/variable.h
bug_reporter.o: $(hdrdir)/ruby/internal/warning_push.h
bug_reporter.o: $(hdrdir)/ruby/internal/xmalloc.h
-bug_reporter.o: $(hdrdir)/ruby/assert.h
-bug_reporter.o: $(hdrdir)/ruby/backward.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/assume.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/attributes.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/bool.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/inttypes.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/limits.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/long_long.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/stdalign.h
-bug_reporter.o: $(hdrdir)/ruby/backward/2/stdarg.h
-bug_reporter.o: $(hdrdir)/ruby/defines.h
-bug_reporter.o: $(hdrdir)/ruby/intern.h
bug_reporter.o: $(hdrdir)/ruby/missing.h
bug_reporter.o: $(hdrdir)/ruby/ruby.h
bug_reporter.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/class/depend b/ext/-test-/class/depend
index 69138c6175b537..bb74e1f24d0ef8 100644
--- a/ext/-test-/class/depend
+++ b/ext/-test-/class/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
class2name.o: $(RUBY_EXTCONF_H)
class2name.o: $(arch_hdrdir)/ruby/config.h
+class2name.o: $(hdrdir)/ruby/assert.h
+class2name.o: $(hdrdir)/ruby/backward.h
+class2name.o: $(hdrdir)/ruby/backward/2/assume.h
+class2name.o: $(hdrdir)/ruby/backward/2/attributes.h
+class2name.o: $(hdrdir)/ruby/backward/2/bool.h
+class2name.o: $(hdrdir)/ruby/backward/2/inttypes.h
+class2name.o: $(hdrdir)/ruby/backward/2/limits.h
+class2name.o: $(hdrdir)/ruby/backward/2/long_long.h
+class2name.o: $(hdrdir)/ruby/backward/2/stdalign.h
+class2name.o: $(hdrdir)/ruby/backward/2/stdarg.h
+class2name.o: $(hdrdir)/ruby/defines.h
+class2name.o: $(hdrdir)/ruby/intern.h
class2name.o: $(hdrdir)/ruby/internal/anyargs.h
class2name.o: $(hdrdir)/ruby/internal/arithmetic.h
class2name.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ class2name.o: $(hdrdir)/ruby/internal/value_type.h
class2name.o: $(hdrdir)/ruby/internal/variable.h
class2name.o: $(hdrdir)/ruby/internal/warning_push.h
class2name.o: $(hdrdir)/ruby/internal/xmalloc.h
-class2name.o: $(hdrdir)/ruby/assert.h
-class2name.o: $(hdrdir)/ruby/backward.h
-class2name.o: $(hdrdir)/ruby/backward/2/assume.h
-class2name.o: $(hdrdir)/ruby/backward/2/attributes.h
-class2name.o: $(hdrdir)/ruby/backward/2/bool.h
-class2name.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-class2name.o: $(hdrdir)/ruby/backward/2/inttypes.h
-class2name.o: $(hdrdir)/ruby/backward/2/limits.h
-class2name.o: $(hdrdir)/ruby/backward/2/long_long.h
-class2name.o: $(hdrdir)/ruby/backward/2/stdalign.h
-class2name.o: $(hdrdir)/ruby/backward/2/stdarg.h
-class2name.o: $(hdrdir)/ruby/defines.h
-class2name.o: $(hdrdir)/ruby/intern.h
class2name.o: $(hdrdir)/ruby/missing.h
class2name.o: $(hdrdir)/ruby/ruby.h
class2name.o: $(hdrdir)/ruby/st.h
@@ -161,6 +160,18 @@ class2name.o: class2name.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -300,19 +311,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/cxxanyargs/depend b/ext/-test-/cxxanyargs/depend
index ca821409a2b2b8..fc3d8e45d9e194 100644
--- a/ext/-test-/cxxanyargs/depend
+++ b/ext/-test-/cxxanyargs/depend
@@ -10,16 +10,4 @@ $(TARGET_SO) $(STATIC_LIB): $(FAILURES:.cpp=.failed)
-e "File.write(t, err)" $@ $(MAKE) $(*F).o
# AUTOGENERATED DEPENDENCIES START
-cxxanyargs.o: $(RUBY_EXTCONF_H)
-cxxanyargs.o: $(arch_hdrdir)/ruby/config.h
-cxxanyargs.o: $(hdrdir)/ruby/assert.h
-cxxanyargs.o: $(hdrdir)/ruby/backward.h
-cxxanyargs.o: $(hdrdir)/ruby/backward/cxxanyargs.hpp
-cxxanyargs.o: $(hdrdir)/ruby/defines.h
-cxxanyargs.o: $(hdrdir)/ruby/intern.h
-cxxanyargs.o: $(hdrdir)/ruby/missing.h
-cxxanyargs.o: $(hdrdir)/ruby/ruby.h
-cxxanyargs.o: $(hdrdir)/ruby/st.h
-cxxanyargs.o: $(hdrdir)/ruby/subst.h
-cxxanyargs.o: cxxanyargs.cpp
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/-test-/debug/depend b/ext/-test-/debug/depend
index 6c1c736d61cc0e..20f7be675b47e7 100644
--- a/ext/-test-/debug/depend
+++ b/ext/-test-/debug/depend
@@ -2,6 +2,18 @@
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -161,6 +160,19 @@ init.o: $(hdrdir)/ruby/subst.h
init.o: init.c
inspector.o: $(RUBY_EXTCONF_H)
inspector.o: $(arch_hdrdir)/ruby/config.h
+inspector.o: $(hdrdir)/ruby/assert.h
+inspector.o: $(hdrdir)/ruby/backward.h
+inspector.o: $(hdrdir)/ruby/backward/2/assume.h
+inspector.o: $(hdrdir)/ruby/backward/2/attributes.h
+inspector.o: $(hdrdir)/ruby/backward/2/bool.h
+inspector.o: $(hdrdir)/ruby/backward/2/inttypes.h
+inspector.o: $(hdrdir)/ruby/backward/2/limits.h
+inspector.o: $(hdrdir)/ruby/backward/2/long_long.h
+inspector.o: $(hdrdir)/ruby/backward/2/stdalign.h
+inspector.o: $(hdrdir)/ruby/backward/2/stdarg.h
+inspector.o: $(hdrdir)/ruby/debug.h
+inspector.o: $(hdrdir)/ruby/defines.h
+inspector.o: $(hdrdir)/ruby/intern.h
inspector.o: $(hdrdir)/ruby/internal/anyargs.h
inspector.o: $(hdrdir)/ruby/internal/arithmetic.h
inspector.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -300,20 +312,6 @@ inspector.o: $(hdrdir)/ruby/internal/value_type.h
inspector.o: $(hdrdir)/ruby/internal/variable.h
inspector.o: $(hdrdir)/ruby/internal/warning_push.h
inspector.o: $(hdrdir)/ruby/internal/xmalloc.h
-inspector.o: $(hdrdir)/ruby/assert.h
-inspector.o: $(hdrdir)/ruby/backward.h
-inspector.o: $(hdrdir)/ruby/backward/2/assume.h
-inspector.o: $(hdrdir)/ruby/backward/2/attributes.h
-inspector.o: $(hdrdir)/ruby/backward/2/bool.h
-inspector.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-inspector.o: $(hdrdir)/ruby/backward/2/inttypes.h
-inspector.o: $(hdrdir)/ruby/backward/2/limits.h
-inspector.o: $(hdrdir)/ruby/backward/2/long_long.h
-inspector.o: $(hdrdir)/ruby/backward/2/stdalign.h
-inspector.o: $(hdrdir)/ruby/backward/2/stdarg.h
-inspector.o: $(hdrdir)/ruby/debug.h
-inspector.o: $(hdrdir)/ruby/defines.h
-inspector.o: $(hdrdir)/ruby/intern.h
inspector.o: $(hdrdir)/ruby/missing.h
inspector.o: $(hdrdir)/ruby/ruby.h
inspector.o: $(hdrdir)/ruby/st.h
@@ -321,6 +319,19 @@ inspector.o: $(hdrdir)/ruby/subst.h
inspector.o: inspector.c
profile_frames.o: $(RUBY_EXTCONF_H)
profile_frames.o: $(arch_hdrdir)/ruby/config.h
+profile_frames.o: $(hdrdir)/ruby/assert.h
+profile_frames.o: $(hdrdir)/ruby/backward.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/assume.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/attributes.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/bool.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/inttypes.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/limits.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/long_long.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/stdalign.h
+profile_frames.o: $(hdrdir)/ruby/backward/2/stdarg.h
+profile_frames.o: $(hdrdir)/ruby/debug.h
+profile_frames.o: $(hdrdir)/ruby/defines.h
+profile_frames.o: $(hdrdir)/ruby/intern.h
profile_frames.o: $(hdrdir)/ruby/internal/anyargs.h
profile_frames.o: $(hdrdir)/ruby/internal/arithmetic.h
profile_frames.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -460,20 +471,6 @@ profile_frames.o: $(hdrdir)/ruby/internal/value_type.h
profile_frames.o: $(hdrdir)/ruby/internal/variable.h
profile_frames.o: $(hdrdir)/ruby/internal/warning_push.h
profile_frames.o: $(hdrdir)/ruby/internal/xmalloc.h
-profile_frames.o: $(hdrdir)/ruby/assert.h
-profile_frames.o: $(hdrdir)/ruby/backward.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/assume.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/attributes.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/bool.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/inttypes.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/limits.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/long_long.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/stdalign.h
-profile_frames.o: $(hdrdir)/ruby/backward/2/stdarg.h
-profile_frames.o: $(hdrdir)/ruby/debug.h
-profile_frames.o: $(hdrdir)/ruby/defines.h
-profile_frames.o: $(hdrdir)/ruby/intern.h
profile_frames.o: $(hdrdir)/ruby/missing.h
profile_frames.o: $(hdrdir)/ruby/ruby.h
profile_frames.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/enumerator_kw/depend b/ext/-test-/enumerator_kw/depend
index 482863a2884003..4347538d379867 100644
--- a/ext/-test-/enumerator_kw/depend
+++ b/ext/-test-/enumerator_kw/depend
@@ -2,6 +2,18 @@
enumerator_kw.o: $(RUBY_EXTCONF_H)
enumerator_kw.o: $(arch_hdrdir)/ruby/config.h
enumerator_kw.o: $(hdrdir)/ruby.h
+enumerator_kw.o: $(hdrdir)/ruby/assert.h
+enumerator_kw.o: $(hdrdir)/ruby/backward.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/assume.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/attributes.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/bool.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/inttypes.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/limits.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/long_long.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/stdalign.h
+enumerator_kw.o: $(hdrdir)/ruby/backward/2/stdarg.h
+enumerator_kw.o: $(hdrdir)/ruby/defines.h
+enumerator_kw.o: $(hdrdir)/ruby/intern.h
enumerator_kw.o: $(hdrdir)/ruby/internal/anyargs.h
enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic.h
enumerator_kw.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ enumerator_kw.o: $(hdrdir)/ruby/internal/value_type.h
enumerator_kw.o: $(hdrdir)/ruby/internal/variable.h
enumerator_kw.o: $(hdrdir)/ruby/internal/warning_push.h
enumerator_kw.o: $(hdrdir)/ruby/internal/xmalloc.h
-enumerator_kw.o: $(hdrdir)/ruby/assert.h
-enumerator_kw.o: $(hdrdir)/ruby/backward.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/assume.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/attributes.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/bool.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/inttypes.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/limits.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/long_long.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/stdalign.h
-enumerator_kw.o: $(hdrdir)/ruby/backward/2/stdarg.h
-enumerator_kw.o: $(hdrdir)/ruby/defines.h
-enumerator_kw.o: $(hdrdir)/ruby/intern.h
enumerator_kw.o: $(hdrdir)/ruby/missing.h
enumerator_kw.o: $(hdrdir)/ruby/ruby.h
enumerator_kw.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/exception/depend b/ext/-test-/exception/depend
index 8ecc512841de13..05f6ff6552f047 100644
--- a/ext/-test-/exception/depend
+++ b/ext/-test-/exception/depend
@@ -6,7 +6,6 @@ dataerror.o: $(hdrdir)/ruby/backward.h
dataerror.o: $(hdrdir)/ruby/backward/2/assume.h
dataerror.o: $(hdrdir)/ruby/backward/2/attributes.h
dataerror.o: $(hdrdir)/ruby/backward/2/bool.h
-dataerror.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
dataerror.o: $(hdrdir)/ruby/backward/2/inttypes.h
dataerror.o: $(hdrdir)/ruby/backward/2/limits.h
dataerror.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -166,7 +165,6 @@ enc_raise.o: $(hdrdir)/ruby/backward.h
enc_raise.o: $(hdrdir)/ruby/backward/2/assume.h
enc_raise.o: $(hdrdir)/ruby/backward/2/attributes.h
enc_raise.o: $(hdrdir)/ruby/backward/2/bool.h
-enc_raise.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
enc_raise.o: $(hdrdir)/ruby/backward/2/inttypes.h
enc_raise.o: $(hdrdir)/ruby/backward/2/limits.h
enc_raise.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -338,7 +336,6 @@ ensured.o: $(hdrdir)/ruby/backward.h
ensured.o: $(hdrdir)/ruby/backward/2/assume.h
ensured.o: $(hdrdir)/ruby/backward/2/attributes.h
ensured.o: $(hdrdir)/ruby/backward/2/bool.h
-ensured.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
ensured.o: $(hdrdir)/ruby/backward/2/inttypes.h
ensured.o: $(hdrdir)/ruby/backward/2/limits.h
ensured.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -498,7 +495,6 @@ init.o: $(hdrdir)/ruby/backward.h
init.o: $(hdrdir)/ruby/backward/2/assume.h
init.o: $(hdrdir)/ruby/backward/2/attributes.h
init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
init.o: $(hdrdir)/ruby/backward/2/inttypes.h
init.o: $(hdrdir)/ruby/backward/2/limits.h
init.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/-test-/fatal/depend b/ext/-test-/fatal/depend
index 79ac18fd9fb598..ccb274e8f89424 100644
--- a/ext/-test-/fatal/depend
+++ b/ext/-test-/fatal/depend
@@ -2,6 +2,18 @@
rb_fatal.o: $(RUBY_EXTCONF_H)
rb_fatal.o: $(arch_hdrdir)/ruby/config.h
rb_fatal.o: $(hdrdir)/ruby.h
+rb_fatal.o: $(hdrdir)/ruby/assert.h
+rb_fatal.o: $(hdrdir)/ruby/backward.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/assume.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/attributes.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/bool.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/inttypes.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/limits.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/long_long.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/stdalign.h
+rb_fatal.o: $(hdrdir)/ruby/backward/2/stdarg.h
+rb_fatal.o: $(hdrdir)/ruby/defines.h
+rb_fatal.o: $(hdrdir)/ruby/intern.h
rb_fatal.o: $(hdrdir)/ruby/internal/anyargs.h
rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic.h
rb_fatal.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ rb_fatal.o: $(hdrdir)/ruby/internal/value_type.h
rb_fatal.o: $(hdrdir)/ruby/internal/variable.h
rb_fatal.o: $(hdrdir)/ruby/internal/warning_push.h
rb_fatal.o: $(hdrdir)/ruby/internal/xmalloc.h
-rb_fatal.o: $(hdrdir)/ruby/assert.h
-rb_fatal.o: $(hdrdir)/ruby/backward.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/assume.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/attributes.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/bool.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/inttypes.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/limits.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/long_long.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/stdalign.h
-rb_fatal.o: $(hdrdir)/ruby/backward/2/stdarg.h
-rb_fatal.o: $(hdrdir)/ruby/defines.h
-rb_fatal.o: $(hdrdir)/ruby/intern.h
rb_fatal.o: $(hdrdir)/ruby/missing.h
rb_fatal.o: $(hdrdir)/ruby/ruby.h
rb_fatal.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/file/depend b/ext/-test-/file/depend
index 966cbdfd8ab6d7..a6ac8bb55c080b 100644
--- a/ext/-test-/file/depend
+++ b/ext/-test-/file/depend
@@ -6,7 +6,6 @@ fs.o: $(hdrdir)/ruby/backward.h
fs.o: $(hdrdir)/ruby/backward/2/assume.h
fs.o: $(hdrdir)/ruby/backward/2/attributes.h
fs.o: $(hdrdir)/ruby/backward/2/bool.h
-fs.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
fs.o: $(hdrdir)/ruby/backward/2/inttypes.h
fs.o: $(hdrdir)/ruby/backward/2/limits.h
fs.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -179,7 +178,6 @@ init.o: $(hdrdir)/ruby/backward.h
init.o: $(hdrdir)/ruby/backward/2/assume.h
init.o: $(hdrdir)/ruby/backward/2/attributes.h
init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
init.o: $(hdrdir)/ruby/backward/2/inttypes.h
init.o: $(hdrdir)/ruby/backward/2/limits.h
init.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -338,7 +336,6 @@ stat.o: $(hdrdir)/ruby/backward.h
stat.o: $(hdrdir)/ruby/backward/2/assume.h
stat.o: $(hdrdir)/ruby/backward/2/attributes.h
stat.o: $(hdrdir)/ruby/backward/2/bool.h
-stat.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
stat.o: $(hdrdir)/ruby/backward/2/inttypes.h
stat.o: $(hdrdir)/ruby/backward/2/limits.h
stat.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/-test-/float/depend b/ext/-test-/float/depend
index 55b014e8a0c6b8..661f4876d80ac7 100644
--- a/ext/-test-/float/depend
+++ b/ext/-test-/float/depend
@@ -5,6 +5,18 @@ nextafter.o: nextafter.c $(top_srcdir)/missing/nextafter.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -144,19 +156,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -165,6 +164,18 @@ init.o: init.c
nextafter.o: $(RUBY_EXTCONF_H)
nextafter.o: $(arch_hdrdir)/ruby/config.h
nextafter.o: $(hdrdir)/ruby.h
+nextafter.o: $(hdrdir)/ruby/assert.h
+nextafter.o: $(hdrdir)/ruby/backward.h
+nextafter.o: $(hdrdir)/ruby/backward/2/assume.h
+nextafter.o: $(hdrdir)/ruby/backward/2/attributes.h
+nextafter.o: $(hdrdir)/ruby/backward/2/bool.h
+nextafter.o: $(hdrdir)/ruby/backward/2/inttypes.h
+nextafter.o: $(hdrdir)/ruby/backward/2/limits.h
+nextafter.o: $(hdrdir)/ruby/backward/2/long_long.h
+nextafter.o: $(hdrdir)/ruby/backward/2/stdalign.h
+nextafter.o: $(hdrdir)/ruby/backward/2/stdarg.h
+nextafter.o: $(hdrdir)/ruby/defines.h
+nextafter.o: $(hdrdir)/ruby/intern.h
nextafter.o: $(hdrdir)/ruby/internal/anyargs.h
nextafter.o: $(hdrdir)/ruby/internal/arithmetic.h
nextafter.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -304,19 +315,6 @@ nextafter.o: $(hdrdir)/ruby/internal/value_type.h
nextafter.o: $(hdrdir)/ruby/internal/variable.h
nextafter.o: $(hdrdir)/ruby/internal/warning_push.h
nextafter.o: $(hdrdir)/ruby/internal/xmalloc.h
-nextafter.o: $(hdrdir)/ruby/assert.h
-nextafter.o: $(hdrdir)/ruby/backward.h
-nextafter.o: $(hdrdir)/ruby/backward/2/assume.h
-nextafter.o: $(hdrdir)/ruby/backward/2/attributes.h
-nextafter.o: $(hdrdir)/ruby/backward/2/bool.h
-nextafter.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-nextafter.o: $(hdrdir)/ruby/backward/2/inttypes.h
-nextafter.o: $(hdrdir)/ruby/backward/2/limits.h
-nextafter.o: $(hdrdir)/ruby/backward/2/long_long.h
-nextafter.o: $(hdrdir)/ruby/backward/2/stdalign.h
-nextafter.o: $(hdrdir)/ruby/backward/2/stdarg.h
-nextafter.o: $(hdrdir)/ruby/defines.h
-nextafter.o: $(hdrdir)/ruby/intern.h
nextafter.o: $(hdrdir)/ruby/missing.h
nextafter.o: $(hdrdir)/ruby/ruby.h
nextafter.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/funcall/depend b/ext/-test-/funcall/depend
index 412ad522d5e3fa..adec76f1448d39 100644
--- a/ext/-test-/funcall/depend
+++ b/ext/-test-/funcall/depend
@@ -2,6 +2,18 @@
funcall.o: $(RUBY_EXTCONF_H)
funcall.o: $(arch_hdrdir)/ruby/config.h
funcall.o: $(hdrdir)/ruby.h
+funcall.o: $(hdrdir)/ruby/assert.h
+funcall.o: $(hdrdir)/ruby/backward.h
+funcall.o: $(hdrdir)/ruby/backward/2/assume.h
+funcall.o: $(hdrdir)/ruby/backward/2/attributes.h
+funcall.o: $(hdrdir)/ruby/backward/2/bool.h
+funcall.o: $(hdrdir)/ruby/backward/2/inttypes.h
+funcall.o: $(hdrdir)/ruby/backward/2/limits.h
+funcall.o: $(hdrdir)/ruby/backward/2/long_long.h
+funcall.o: $(hdrdir)/ruby/backward/2/stdalign.h
+funcall.o: $(hdrdir)/ruby/backward/2/stdarg.h
+funcall.o: $(hdrdir)/ruby/defines.h
+funcall.o: $(hdrdir)/ruby/intern.h
funcall.o: $(hdrdir)/ruby/internal/anyargs.h
funcall.o: $(hdrdir)/ruby/internal/arithmetic.h
funcall.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ funcall.o: $(hdrdir)/ruby/internal/value_type.h
funcall.o: $(hdrdir)/ruby/internal/variable.h
funcall.o: $(hdrdir)/ruby/internal/warning_push.h
funcall.o: $(hdrdir)/ruby/internal/xmalloc.h
-funcall.o: $(hdrdir)/ruby/assert.h
-funcall.o: $(hdrdir)/ruby/backward.h
-funcall.o: $(hdrdir)/ruby/backward/2/assume.h
-funcall.o: $(hdrdir)/ruby/backward/2/attributes.h
-funcall.o: $(hdrdir)/ruby/backward/2/bool.h
-funcall.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-funcall.o: $(hdrdir)/ruby/backward/2/inttypes.h
-funcall.o: $(hdrdir)/ruby/backward/2/limits.h
-funcall.o: $(hdrdir)/ruby/backward/2/long_long.h
-funcall.o: $(hdrdir)/ruby/backward/2/stdalign.h
-funcall.o: $(hdrdir)/ruby/backward/2/stdarg.h
-funcall.o: $(hdrdir)/ruby/defines.h
-funcall.o: $(hdrdir)/ruby/intern.h
funcall.o: $(hdrdir)/ruby/missing.h
funcall.o: $(hdrdir)/ruby/ruby.h
funcall.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/gvl/call_without_gvl/depend b/ext/-test-/gvl/call_without_gvl/depend
index e6ecd43ef75de7..d74a525224f668 100644
--- a/ext/-test-/gvl/call_without_gvl/depend
+++ b/ext/-test-/gvl/call_without_gvl/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
call_without_gvl.o: $(RUBY_EXTCONF_H)
call_without_gvl.o: $(arch_hdrdir)/ruby/config.h
+call_without_gvl.o: $(hdrdir)/ruby/assert.h
+call_without_gvl.o: $(hdrdir)/ruby/backward.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/assume.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/attributes.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/bool.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/inttypes.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/limits.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/long_long.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/stdalign.h
+call_without_gvl.o: $(hdrdir)/ruby/backward/2/stdarg.h
+call_without_gvl.o: $(hdrdir)/ruby/defines.h
+call_without_gvl.o: $(hdrdir)/ruby/intern.h
call_without_gvl.o: $(hdrdir)/ruby/internal/anyargs.h
call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic.h
call_without_gvl.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ call_without_gvl.o: $(hdrdir)/ruby/internal/value_type.h
call_without_gvl.o: $(hdrdir)/ruby/internal/variable.h
call_without_gvl.o: $(hdrdir)/ruby/internal/warning_push.h
call_without_gvl.o: $(hdrdir)/ruby/internal/xmalloc.h
-call_without_gvl.o: $(hdrdir)/ruby/assert.h
-call_without_gvl.o: $(hdrdir)/ruby/backward.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/assume.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/attributes.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/bool.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/inttypes.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/limits.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/long_long.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/stdalign.h
-call_without_gvl.o: $(hdrdir)/ruby/backward/2/stdarg.h
-call_without_gvl.o: $(hdrdir)/ruby/defines.h
-call_without_gvl.o: $(hdrdir)/ruby/intern.h
call_without_gvl.o: $(hdrdir)/ruby/missing.h
call_without_gvl.o: $(hdrdir)/ruby/ruby.h
call_without_gvl.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/hash/depend b/ext/-test-/hash/depend
index fe52e9bb1ab911..b8460734cec2ab 100644
--- a/ext/-test-/hash/depend
+++ b/ext/-test-/hash/depend
@@ -2,6 +2,18 @@
delete.o: $(RUBY_EXTCONF_H)
delete.o: $(arch_hdrdir)/ruby/config.h
delete.o: $(hdrdir)/ruby.h
+delete.o: $(hdrdir)/ruby/assert.h
+delete.o: $(hdrdir)/ruby/backward.h
+delete.o: $(hdrdir)/ruby/backward/2/assume.h
+delete.o: $(hdrdir)/ruby/backward/2/attributes.h
+delete.o: $(hdrdir)/ruby/backward/2/bool.h
+delete.o: $(hdrdir)/ruby/backward/2/inttypes.h
+delete.o: $(hdrdir)/ruby/backward/2/limits.h
+delete.o: $(hdrdir)/ruby/backward/2/long_long.h
+delete.o: $(hdrdir)/ruby/backward/2/stdalign.h
+delete.o: $(hdrdir)/ruby/backward/2/stdarg.h
+delete.o: $(hdrdir)/ruby/defines.h
+delete.o: $(hdrdir)/ruby/intern.h
delete.o: $(hdrdir)/ruby/internal/anyargs.h
delete.o: $(hdrdir)/ruby/internal/arithmetic.h
delete.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ delete.o: $(hdrdir)/ruby/internal/value_type.h
delete.o: $(hdrdir)/ruby/internal/variable.h
delete.o: $(hdrdir)/ruby/internal/warning_push.h
delete.o: $(hdrdir)/ruby/internal/xmalloc.h
-delete.o: $(hdrdir)/ruby/assert.h
-delete.o: $(hdrdir)/ruby/backward.h
-delete.o: $(hdrdir)/ruby/backward/2/assume.h
-delete.o: $(hdrdir)/ruby/backward/2/attributes.h
-delete.o: $(hdrdir)/ruby/backward/2/bool.h
-delete.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-delete.o: $(hdrdir)/ruby/backward/2/inttypes.h
-delete.o: $(hdrdir)/ruby/backward/2/limits.h
-delete.o: $(hdrdir)/ruby/backward/2/long_long.h
-delete.o: $(hdrdir)/ruby/backward/2/stdalign.h
-delete.o: $(hdrdir)/ruby/backward/2/stdarg.h
-delete.o: $(hdrdir)/ruby/defines.h
-delete.o: $(hdrdir)/ruby/intern.h
delete.o: $(hdrdir)/ruby/missing.h
delete.o: $(hdrdir)/ruby/ruby.h
delete.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,18 @@ delete.o: delete.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +312,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/integer/depend b/ext/-test-/integer/depend
index 825110658b8a1b..522f6283ac869b 100644
--- a/ext/-test-/integer/depend
+++ b/ext/-test-/integer/depend
@@ -1,7 +1,19 @@
# AUTOGENERATED DEPENDENCIES START
core_ext.o: $(RUBY_EXTCONF_H)
core_ext.o: $(arch_hdrdir)/ruby/config.h
-core_ext.o: $(hdrdir)/ruby.h
+core_ext.o: $(hdrdir)/ruby/assert.h
+core_ext.o: $(hdrdir)/ruby/backward.h
+core_ext.o: $(hdrdir)/ruby/backward/2/assume.h
+core_ext.o: $(hdrdir)/ruby/backward/2/attributes.h
+core_ext.o: $(hdrdir)/ruby/backward/2/bool.h
+core_ext.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+core_ext.o: $(hdrdir)/ruby/backward/2/inttypes.h
+core_ext.o: $(hdrdir)/ruby/backward/2/limits.h
+core_ext.o: $(hdrdir)/ruby/backward/2/long_long.h
+core_ext.o: $(hdrdir)/ruby/backward/2/stdalign.h
+core_ext.o: $(hdrdir)/ruby/backward/2/stdarg.h
+core_ext.o: $(hdrdir)/ruby/defines.h
+core_ext.o: $(hdrdir)/ruby/intern.h
core_ext.o: $(hdrdir)/ruby/internal/anyargs.h
core_ext.o: $(hdrdir)/ruby/internal/arithmetic.h
core_ext.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,24 +153,10 @@ core_ext.o: $(hdrdir)/ruby/internal/value_type.h
core_ext.o: $(hdrdir)/ruby/internal/variable.h
core_ext.o: $(hdrdir)/ruby/internal/warning_push.h
core_ext.o: $(hdrdir)/ruby/internal/xmalloc.h
-core_ext.o: $(hdrdir)/ruby/assert.h
-core_ext.o: $(hdrdir)/ruby/backward.h
-core_ext.o: $(hdrdir)/ruby/backward/2/assume.h
-core_ext.o: $(hdrdir)/ruby/backward/2/attributes.h
-core_ext.o: $(hdrdir)/ruby/backward/2/bool.h
-core_ext.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-core_ext.o: $(hdrdir)/ruby/backward/2/inttypes.h
-core_ext.o: $(hdrdir)/ruby/backward/2/limits.h
-core_ext.o: $(hdrdir)/ruby/backward/2/long_long.h
-core_ext.o: $(hdrdir)/ruby/backward/2/stdalign.h
-core_ext.o: $(hdrdir)/ruby/backward/2/stdarg.h
-core_ext.o: $(hdrdir)/ruby/defines.h
-core_ext.o: $(hdrdir)/ruby/intern.h
core_ext.o: $(hdrdir)/ruby/missing.h
core_ext.o: $(hdrdir)/ruby/ruby.h
core_ext.o: $(hdrdir)/ruby/st.h
core_ext.o: $(hdrdir)/ruby/subst.h
-core_ext.o: $(top_srcdir)/internal.h
core_ext.o: $(top_srcdir)/internal/bignum.h
core_ext.o: $(top_srcdir)/internal/bits.h
core_ext.o: $(top_srcdir)/internal/compilers.h
@@ -171,6 +169,18 @@ core_ext.o: core_ext.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -310,19 +320,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -331,6 +328,18 @@ init.o: init.c
my_integer.o: $(RUBY_EXTCONF_H)
my_integer.o: $(arch_hdrdir)/ruby/config.h
my_integer.o: $(hdrdir)/ruby.h
+my_integer.o: $(hdrdir)/ruby/assert.h
+my_integer.o: $(hdrdir)/ruby/backward.h
+my_integer.o: $(hdrdir)/ruby/backward/2/assume.h
+my_integer.o: $(hdrdir)/ruby/backward/2/attributes.h
+my_integer.o: $(hdrdir)/ruby/backward/2/bool.h
+my_integer.o: $(hdrdir)/ruby/backward/2/inttypes.h
+my_integer.o: $(hdrdir)/ruby/backward/2/limits.h
+my_integer.o: $(hdrdir)/ruby/backward/2/long_long.h
+my_integer.o: $(hdrdir)/ruby/backward/2/stdalign.h
+my_integer.o: $(hdrdir)/ruby/backward/2/stdarg.h
+my_integer.o: $(hdrdir)/ruby/defines.h
+my_integer.o: $(hdrdir)/ruby/intern.h
my_integer.o: $(hdrdir)/ruby/internal/anyargs.h
my_integer.o: $(hdrdir)/ruby/internal/arithmetic.h
my_integer.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -470,19 +479,6 @@ my_integer.o: $(hdrdir)/ruby/internal/value_type.h
my_integer.o: $(hdrdir)/ruby/internal/variable.h
my_integer.o: $(hdrdir)/ruby/internal/warning_push.h
my_integer.o: $(hdrdir)/ruby/internal/xmalloc.h
-my_integer.o: $(hdrdir)/ruby/assert.h
-my_integer.o: $(hdrdir)/ruby/backward.h
-my_integer.o: $(hdrdir)/ruby/backward/2/assume.h
-my_integer.o: $(hdrdir)/ruby/backward/2/attributes.h
-my_integer.o: $(hdrdir)/ruby/backward/2/bool.h
-my_integer.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-my_integer.o: $(hdrdir)/ruby/backward/2/inttypes.h
-my_integer.o: $(hdrdir)/ruby/backward/2/limits.h
-my_integer.o: $(hdrdir)/ruby/backward/2/long_long.h
-my_integer.o: $(hdrdir)/ruby/backward/2/stdalign.h
-my_integer.o: $(hdrdir)/ruby/backward/2/stdarg.h
-my_integer.o: $(hdrdir)/ruby/defines.h
-my_integer.o: $(hdrdir)/ruby/intern.h
my_integer.o: $(hdrdir)/ruby/missing.h
my_integer.o: $(hdrdir)/ruby/ruby.h
my_integer.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/iseq_load/depend b/ext/-test-/iseq_load/depend
index 26d4c01aa2ec12..cffd6313833607 100644
--- a/ext/-test-/iseq_load/depend
+++ b/ext/-test-/iseq_load/depend
@@ -2,6 +2,18 @@
iseq_load.o: $(RUBY_EXTCONF_H)
iseq_load.o: $(arch_hdrdir)/ruby/config.h
iseq_load.o: $(hdrdir)/ruby.h
+iseq_load.o: $(hdrdir)/ruby/assert.h
+iseq_load.o: $(hdrdir)/ruby/backward.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/assume.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/attributes.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/bool.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/inttypes.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/limits.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/long_long.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/stdalign.h
+iseq_load.o: $(hdrdir)/ruby/backward/2/stdarg.h
+iseq_load.o: $(hdrdir)/ruby/defines.h
+iseq_load.o: $(hdrdir)/ruby/intern.h
iseq_load.o: $(hdrdir)/ruby/internal/anyargs.h
iseq_load.o: $(hdrdir)/ruby/internal/arithmetic.h
iseq_load.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ iseq_load.o: $(hdrdir)/ruby/internal/value_type.h
iseq_load.o: $(hdrdir)/ruby/internal/variable.h
iseq_load.o: $(hdrdir)/ruby/internal/warning_push.h
iseq_load.o: $(hdrdir)/ruby/internal/xmalloc.h
-iseq_load.o: $(hdrdir)/ruby/assert.h
-iseq_load.o: $(hdrdir)/ruby/backward.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/assume.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/attributes.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/bool.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/inttypes.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/limits.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/long_long.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/stdalign.h
-iseq_load.o: $(hdrdir)/ruby/backward/2/stdarg.h
-iseq_load.o: $(hdrdir)/ruby/defines.h
-iseq_load.o: $(hdrdir)/ruby/intern.h
iseq_load.o: $(hdrdir)/ruby/missing.h
iseq_load.o: $(hdrdir)/ruby/ruby.h
iseq_load.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/iter/depend b/ext/-test-/iter/depend
index 85ca8be992b138..5bda724d221d5e 100644
--- a/ext/-test-/iter/depend
+++ b/ext/-test-/iter/depend
@@ -2,6 +2,18 @@
break.o: $(RUBY_EXTCONF_H)
break.o: $(arch_hdrdir)/ruby/config.h
break.o: $(hdrdir)/ruby.h
+break.o: $(hdrdir)/ruby/assert.h
+break.o: $(hdrdir)/ruby/backward.h
+break.o: $(hdrdir)/ruby/backward/2/assume.h
+break.o: $(hdrdir)/ruby/backward/2/attributes.h
+break.o: $(hdrdir)/ruby/backward/2/bool.h
+break.o: $(hdrdir)/ruby/backward/2/inttypes.h
+break.o: $(hdrdir)/ruby/backward/2/limits.h
+break.o: $(hdrdir)/ruby/backward/2/long_long.h
+break.o: $(hdrdir)/ruby/backward/2/stdalign.h
+break.o: $(hdrdir)/ruby/backward/2/stdarg.h
+break.o: $(hdrdir)/ruby/defines.h
+break.o: $(hdrdir)/ruby/intern.h
break.o: $(hdrdir)/ruby/internal/anyargs.h
break.o: $(hdrdir)/ruby/internal/arithmetic.h
break.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ break.o: $(hdrdir)/ruby/internal/value_type.h
break.o: $(hdrdir)/ruby/internal/variable.h
break.o: $(hdrdir)/ruby/internal/warning_push.h
break.o: $(hdrdir)/ruby/internal/xmalloc.h
-break.o: $(hdrdir)/ruby/assert.h
-break.o: $(hdrdir)/ruby/backward.h
-break.o: $(hdrdir)/ruby/backward/2/assume.h
-break.o: $(hdrdir)/ruby/backward/2/attributes.h
-break.o: $(hdrdir)/ruby/backward/2/bool.h
-break.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-break.o: $(hdrdir)/ruby/backward/2/inttypes.h
-break.o: $(hdrdir)/ruby/backward/2/limits.h
-break.o: $(hdrdir)/ruby/backward/2/long_long.h
-break.o: $(hdrdir)/ruby/backward/2/stdalign.h
-break.o: $(hdrdir)/ruby/backward/2/stdarg.h
-break.o: $(hdrdir)/ruby/defines.h
-break.o: $(hdrdir)/ruby/intern.h
break.o: $(hdrdir)/ruby/missing.h
break.o: $(hdrdir)/ruby/ruby.h
break.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,18 @@ break.o: break.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +312,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -322,6 +320,18 @@ init.o: init.c
yield.o: $(RUBY_EXTCONF_H)
yield.o: $(arch_hdrdir)/ruby/config.h
yield.o: $(hdrdir)/ruby.h
+yield.o: $(hdrdir)/ruby/assert.h
+yield.o: $(hdrdir)/ruby/backward.h
+yield.o: $(hdrdir)/ruby/backward/2/assume.h
+yield.o: $(hdrdir)/ruby/backward/2/attributes.h
+yield.o: $(hdrdir)/ruby/backward/2/bool.h
+yield.o: $(hdrdir)/ruby/backward/2/inttypes.h
+yield.o: $(hdrdir)/ruby/backward/2/limits.h
+yield.o: $(hdrdir)/ruby/backward/2/long_long.h
+yield.o: $(hdrdir)/ruby/backward/2/stdalign.h
+yield.o: $(hdrdir)/ruby/backward/2/stdarg.h
+yield.o: $(hdrdir)/ruby/defines.h
+yield.o: $(hdrdir)/ruby/intern.h
yield.o: $(hdrdir)/ruby/internal/anyargs.h
yield.o: $(hdrdir)/ruby/internal/arithmetic.h
yield.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -461,19 +471,6 @@ yield.o: $(hdrdir)/ruby/internal/value_type.h
yield.o: $(hdrdir)/ruby/internal/variable.h
yield.o: $(hdrdir)/ruby/internal/warning_push.h
yield.o: $(hdrdir)/ruby/internal/xmalloc.h
-yield.o: $(hdrdir)/ruby/assert.h
-yield.o: $(hdrdir)/ruby/backward.h
-yield.o: $(hdrdir)/ruby/backward/2/assume.h
-yield.o: $(hdrdir)/ruby/backward/2/attributes.h
-yield.o: $(hdrdir)/ruby/backward/2/bool.h
-yield.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-yield.o: $(hdrdir)/ruby/backward/2/inttypes.h
-yield.o: $(hdrdir)/ruby/backward/2/limits.h
-yield.o: $(hdrdir)/ruby/backward/2/long_long.h
-yield.o: $(hdrdir)/ruby/backward/2/stdalign.h
-yield.o: $(hdrdir)/ruby/backward/2/stdarg.h
-yield.o: $(hdrdir)/ruby/defines.h
-yield.o: $(hdrdir)/ruby/intern.h
yield.o: $(hdrdir)/ruby/missing.h
yield.o: $(hdrdir)/ruby/ruby.h
yield.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/load/protect/depend b/ext/-test-/load/protect/depend
index 6eb2ea987b70bd..43413b4e956ea8 100644
--- a/ext/-test-/load/protect/depend
+++ b/ext/-test-/load/protect/depend
@@ -2,6 +2,18 @@
protect.o: $(RUBY_EXTCONF_H)
protect.o: $(arch_hdrdir)/ruby/config.h
protect.o: $(hdrdir)/ruby.h
+protect.o: $(hdrdir)/ruby/assert.h
+protect.o: $(hdrdir)/ruby/backward.h
+protect.o: $(hdrdir)/ruby/backward/2/assume.h
+protect.o: $(hdrdir)/ruby/backward/2/attributes.h
+protect.o: $(hdrdir)/ruby/backward/2/bool.h
+protect.o: $(hdrdir)/ruby/backward/2/inttypes.h
+protect.o: $(hdrdir)/ruby/backward/2/limits.h
+protect.o: $(hdrdir)/ruby/backward/2/long_long.h
+protect.o: $(hdrdir)/ruby/backward/2/stdalign.h
+protect.o: $(hdrdir)/ruby/backward/2/stdarg.h
+protect.o: $(hdrdir)/ruby/defines.h
+protect.o: $(hdrdir)/ruby/intern.h
protect.o: $(hdrdir)/ruby/internal/anyargs.h
protect.o: $(hdrdir)/ruby/internal/arithmetic.h
protect.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ protect.o: $(hdrdir)/ruby/internal/value_type.h
protect.o: $(hdrdir)/ruby/internal/variable.h
protect.o: $(hdrdir)/ruby/internal/warning_push.h
protect.o: $(hdrdir)/ruby/internal/xmalloc.h
-protect.o: $(hdrdir)/ruby/assert.h
-protect.o: $(hdrdir)/ruby/backward.h
-protect.o: $(hdrdir)/ruby/backward/2/assume.h
-protect.o: $(hdrdir)/ruby/backward/2/attributes.h
-protect.o: $(hdrdir)/ruby/backward/2/bool.h
-protect.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-protect.o: $(hdrdir)/ruby/backward/2/inttypes.h
-protect.o: $(hdrdir)/ruby/backward/2/limits.h
-protect.o: $(hdrdir)/ruby/backward/2/long_long.h
-protect.o: $(hdrdir)/ruby/backward/2/stdalign.h
-protect.o: $(hdrdir)/ruby/backward/2/stdarg.h
-protect.o: $(hdrdir)/ruby/defines.h
-protect.o: $(hdrdir)/ruby/intern.h
protect.o: $(hdrdir)/ruby/missing.h
protect.o: $(hdrdir)/ruby/ruby.h
protect.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/marshal/compat/depend b/ext/-test-/marshal/compat/depend
index 1fca7a7baff489..366fb88966e1d4 100644
--- a/ext/-test-/marshal/compat/depend
+++ b/ext/-test-/marshal/compat/depend
@@ -2,6 +2,18 @@
usrcompat.o: $(RUBY_EXTCONF_H)
usrcompat.o: $(arch_hdrdir)/ruby/config.h
usrcompat.o: $(hdrdir)/ruby.h
+usrcompat.o: $(hdrdir)/ruby/assert.h
+usrcompat.o: $(hdrdir)/ruby/backward.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/assume.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/attributes.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/bool.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/inttypes.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/limits.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/long_long.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/stdalign.h
+usrcompat.o: $(hdrdir)/ruby/backward/2/stdarg.h
+usrcompat.o: $(hdrdir)/ruby/defines.h
+usrcompat.o: $(hdrdir)/ruby/intern.h
usrcompat.o: $(hdrdir)/ruby/internal/anyargs.h
usrcompat.o: $(hdrdir)/ruby/internal/arithmetic.h
usrcompat.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ usrcompat.o: $(hdrdir)/ruby/internal/value_type.h
usrcompat.o: $(hdrdir)/ruby/internal/variable.h
usrcompat.o: $(hdrdir)/ruby/internal/warning_push.h
usrcompat.o: $(hdrdir)/ruby/internal/xmalloc.h
-usrcompat.o: $(hdrdir)/ruby/assert.h
-usrcompat.o: $(hdrdir)/ruby/backward.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/assume.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/attributes.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/bool.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/inttypes.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/limits.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/long_long.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/stdalign.h
-usrcompat.o: $(hdrdir)/ruby/backward/2/stdarg.h
-usrcompat.o: $(hdrdir)/ruby/defines.h
-usrcompat.o: $(hdrdir)/ruby/intern.h
usrcompat.o: $(hdrdir)/ruby/missing.h
usrcompat.o: $(hdrdir)/ruby/ruby.h
usrcompat.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/marshal/internal_ivar/depend b/ext/-test-/marshal/internal_ivar/depend
index 2b0f44c0d08535..b90f9b257001ef 100644
--- a/ext/-test-/marshal/internal_ivar/depend
+++ b/ext/-test-/marshal/internal_ivar/depend
@@ -2,6 +2,18 @@
internal_ivar.o: $(RUBY_EXTCONF_H)
internal_ivar.o: $(arch_hdrdir)/ruby/config.h
internal_ivar.o: $(hdrdir)/ruby.h
+internal_ivar.o: $(hdrdir)/ruby/assert.h
+internal_ivar.o: $(hdrdir)/ruby/backward.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/assume.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/attributes.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/bool.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/inttypes.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/limits.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/long_long.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/stdalign.h
+internal_ivar.o: $(hdrdir)/ruby/backward/2/stdarg.h
+internal_ivar.o: $(hdrdir)/ruby/defines.h
+internal_ivar.o: $(hdrdir)/ruby/intern.h
internal_ivar.o: $(hdrdir)/ruby/internal/anyargs.h
internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic.h
internal_ivar.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ internal_ivar.o: $(hdrdir)/ruby/internal/value_type.h
internal_ivar.o: $(hdrdir)/ruby/internal/variable.h
internal_ivar.o: $(hdrdir)/ruby/internal/warning_push.h
internal_ivar.o: $(hdrdir)/ruby/internal/xmalloc.h
-internal_ivar.o: $(hdrdir)/ruby/assert.h
-internal_ivar.o: $(hdrdir)/ruby/backward.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/assume.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/attributes.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/bool.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/inttypes.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/limits.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/long_long.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/stdalign.h
-internal_ivar.o: $(hdrdir)/ruby/backward/2/stdarg.h
-internal_ivar.o: $(hdrdir)/ruby/defines.h
-internal_ivar.o: $(hdrdir)/ruby/intern.h
internal_ivar.o: $(hdrdir)/ruby/missing.h
internal_ivar.o: $(hdrdir)/ruby/ruby.h
internal_ivar.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/marshal/usr/depend b/ext/-test-/marshal/usr/depend
index 239798bacfa777..4a01f2d5e6983f 100644
--- a/ext/-test-/marshal/usr/depend
+++ b/ext/-test-/marshal/usr/depend
@@ -2,6 +2,18 @@
usrmarshal.o: $(RUBY_EXTCONF_H)
usrmarshal.o: $(arch_hdrdir)/ruby/config.h
usrmarshal.o: $(hdrdir)/ruby.h
+usrmarshal.o: $(hdrdir)/ruby/assert.h
+usrmarshal.o: $(hdrdir)/ruby/backward.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/assume.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/attributes.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/bool.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/inttypes.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/limits.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/long_long.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/stdalign.h
+usrmarshal.o: $(hdrdir)/ruby/backward/2/stdarg.h
+usrmarshal.o: $(hdrdir)/ruby/defines.h
+usrmarshal.o: $(hdrdir)/ruby/intern.h
usrmarshal.o: $(hdrdir)/ruby/internal/anyargs.h
usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic.h
usrmarshal.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ usrmarshal.o: $(hdrdir)/ruby/internal/value_type.h
usrmarshal.o: $(hdrdir)/ruby/internal/variable.h
usrmarshal.o: $(hdrdir)/ruby/internal/warning_push.h
usrmarshal.o: $(hdrdir)/ruby/internal/xmalloc.h
-usrmarshal.o: $(hdrdir)/ruby/assert.h
-usrmarshal.o: $(hdrdir)/ruby/backward.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/assume.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/attributes.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/bool.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/inttypes.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/limits.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/long_long.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/stdalign.h
-usrmarshal.o: $(hdrdir)/ruby/backward/2/stdarg.h
-usrmarshal.o: $(hdrdir)/ruby/defines.h
-usrmarshal.o: $(hdrdir)/ruby/intern.h
usrmarshal.o: $(hdrdir)/ruby/missing.h
usrmarshal.o: $(hdrdir)/ruby/ruby.h
usrmarshal.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/memory_status/depend b/ext/-test-/memory_status/depend
index f8652cb316d33d..c9cc903ff67926 100644
--- a/ext/-test-/memory_status/depend
+++ b/ext/-test-/memory_status/depend
@@ -7,7 +7,6 @@ memory_status.o: $(hdrdir)/ruby/backward.h
memory_status.o: $(hdrdir)/ruby/backward/2/assume.h
memory_status.o: $(hdrdir)/ruby/backward/2/attributes.h
memory_status.o: $(hdrdir)/ruby/backward/2/bool.h
-memory_status.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
memory_status.o: $(hdrdir)/ruby/backward/2/inttypes.h
memory_status.o: $(hdrdir)/ruby/backward/2/limits.h
memory_status.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/-test-/memory_view/depend b/ext/-test-/memory_view/depend
index 12198887681d46..c42e9f54a3c1a4 100644
--- a/ext/-test-/memory_view/depend
+++ b/ext/-test-/memory_view/depend
@@ -7,7 +7,6 @@ memory_view.o: $(hdrdir)/ruby/backward.h
memory_view.o: $(hdrdir)/ruby/backward/2/assume.h
memory_view.o: $(hdrdir)/ruby/backward/2/attributes.h
memory_view.o: $(hdrdir)/ruby/backward/2/bool.h
-memory_view.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
memory_view.o: $(hdrdir)/ruby/backward/2/inttypes.h
memory_view.o: $(hdrdir)/ruby/backward/2/limits.h
memory_view.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/-test-/method/depend b/ext/-test-/method/depend
index 1aef2cd1820a9c..f091d3718963bc 100644
--- a/ext/-test-/method/depend
+++ b/ext/-test-/method/depend
@@ -2,6 +2,18 @@
arity.o: $(RUBY_EXTCONF_H)
arity.o: $(arch_hdrdir)/ruby/config.h
arity.o: $(hdrdir)/ruby.h
+arity.o: $(hdrdir)/ruby/assert.h
+arity.o: $(hdrdir)/ruby/backward.h
+arity.o: $(hdrdir)/ruby/backward/2/assume.h
+arity.o: $(hdrdir)/ruby/backward/2/attributes.h
+arity.o: $(hdrdir)/ruby/backward/2/bool.h
+arity.o: $(hdrdir)/ruby/backward/2/inttypes.h
+arity.o: $(hdrdir)/ruby/backward/2/limits.h
+arity.o: $(hdrdir)/ruby/backward/2/long_long.h
+arity.o: $(hdrdir)/ruby/backward/2/stdalign.h
+arity.o: $(hdrdir)/ruby/backward/2/stdarg.h
+arity.o: $(hdrdir)/ruby/defines.h
+arity.o: $(hdrdir)/ruby/intern.h
arity.o: $(hdrdir)/ruby/internal/anyargs.h
arity.o: $(hdrdir)/ruby/internal/arithmetic.h
arity.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ arity.o: $(hdrdir)/ruby/internal/value_type.h
arity.o: $(hdrdir)/ruby/internal/variable.h
arity.o: $(hdrdir)/ruby/internal/warning_push.h
arity.o: $(hdrdir)/ruby/internal/xmalloc.h
-arity.o: $(hdrdir)/ruby/assert.h
-arity.o: $(hdrdir)/ruby/backward.h
-arity.o: $(hdrdir)/ruby/backward/2/assume.h
-arity.o: $(hdrdir)/ruby/backward/2/attributes.h
-arity.o: $(hdrdir)/ruby/backward/2/bool.h
-arity.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-arity.o: $(hdrdir)/ruby/backward/2/inttypes.h
-arity.o: $(hdrdir)/ruby/backward/2/limits.h
-arity.o: $(hdrdir)/ruby/backward/2/long_long.h
-arity.o: $(hdrdir)/ruby/backward/2/stdalign.h
-arity.o: $(hdrdir)/ruby/backward/2/stdarg.h
-arity.o: $(hdrdir)/ruby/defines.h
-arity.o: $(hdrdir)/ruby/intern.h
arity.o: $(hdrdir)/ruby/missing.h
arity.o: $(hdrdir)/ruby/ruby.h
arity.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,18 @@ arity.o: arity.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +312,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/notimplement/depend b/ext/-test-/notimplement/depend
index 506795a137deb2..73d1fec43516fe 100644
--- a/ext/-test-/notimplement/depend
+++ b/ext/-test-/notimplement/depend
@@ -2,6 +2,18 @@
bug.o: $(RUBY_EXTCONF_H)
bug.o: $(arch_hdrdir)/ruby/config.h
bug.o: $(hdrdir)/ruby.h
+bug.o: $(hdrdir)/ruby/assert.h
+bug.o: $(hdrdir)/ruby/backward.h
+bug.o: $(hdrdir)/ruby/backward/2/assume.h
+bug.o: $(hdrdir)/ruby/backward/2/attributes.h
+bug.o: $(hdrdir)/ruby/backward/2/bool.h
+bug.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bug.o: $(hdrdir)/ruby/backward/2/limits.h
+bug.o: $(hdrdir)/ruby/backward/2/long_long.h
+bug.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bug.o: $(hdrdir)/ruby/backward/2/stdarg.h
+bug.o: $(hdrdir)/ruby/defines.h
+bug.o: $(hdrdir)/ruby/intern.h
bug.o: $(hdrdir)/ruby/internal/anyargs.h
bug.o: $(hdrdir)/ruby/internal/arithmetic.h
bug.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ bug.o: $(hdrdir)/ruby/internal/value_type.h
bug.o: $(hdrdir)/ruby/internal/variable.h
bug.o: $(hdrdir)/ruby/internal/warning_push.h
bug.o: $(hdrdir)/ruby/internal/xmalloc.h
-bug.o: $(hdrdir)/ruby/assert.h
-bug.o: $(hdrdir)/ruby/backward.h
-bug.o: $(hdrdir)/ruby/backward/2/assume.h
-bug.o: $(hdrdir)/ruby/backward/2/attributes.h
-bug.o: $(hdrdir)/ruby/backward/2/bool.h
-bug.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-bug.o: $(hdrdir)/ruby/backward/2/inttypes.h
-bug.o: $(hdrdir)/ruby/backward/2/limits.h
-bug.o: $(hdrdir)/ruby/backward/2/long_long.h
-bug.o: $(hdrdir)/ruby/backward/2/stdalign.h
-bug.o: $(hdrdir)/ruby/backward/2/stdarg.h
-bug.o: $(hdrdir)/ruby/defines.h
-bug.o: $(hdrdir)/ruby/intern.h
bug.o: $(hdrdir)/ruby/missing.h
bug.o: $(hdrdir)/ruby/ruby.h
bug.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/num2int/depend b/ext/-test-/num2int/depend
index 692423ac63d40f..77db0bfb83f81d 100644
--- a/ext/-test-/num2int/depend
+++ b/ext/-test-/num2int/depend
@@ -2,6 +2,18 @@
num2int.o: $(RUBY_EXTCONF_H)
num2int.o: $(arch_hdrdir)/ruby/config.h
num2int.o: $(hdrdir)/ruby.h
+num2int.o: $(hdrdir)/ruby/assert.h
+num2int.o: $(hdrdir)/ruby/backward.h
+num2int.o: $(hdrdir)/ruby/backward/2/assume.h
+num2int.o: $(hdrdir)/ruby/backward/2/attributes.h
+num2int.o: $(hdrdir)/ruby/backward/2/bool.h
+num2int.o: $(hdrdir)/ruby/backward/2/inttypes.h
+num2int.o: $(hdrdir)/ruby/backward/2/limits.h
+num2int.o: $(hdrdir)/ruby/backward/2/long_long.h
+num2int.o: $(hdrdir)/ruby/backward/2/stdalign.h
+num2int.o: $(hdrdir)/ruby/backward/2/stdarg.h
+num2int.o: $(hdrdir)/ruby/defines.h
+num2int.o: $(hdrdir)/ruby/intern.h
num2int.o: $(hdrdir)/ruby/internal/anyargs.h
num2int.o: $(hdrdir)/ruby/internal/arithmetic.h
num2int.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ num2int.o: $(hdrdir)/ruby/internal/value_type.h
num2int.o: $(hdrdir)/ruby/internal/variable.h
num2int.o: $(hdrdir)/ruby/internal/warning_push.h
num2int.o: $(hdrdir)/ruby/internal/xmalloc.h
-num2int.o: $(hdrdir)/ruby/assert.h
-num2int.o: $(hdrdir)/ruby/backward.h
-num2int.o: $(hdrdir)/ruby/backward/2/assume.h
-num2int.o: $(hdrdir)/ruby/backward/2/attributes.h
-num2int.o: $(hdrdir)/ruby/backward/2/bool.h
-num2int.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-num2int.o: $(hdrdir)/ruby/backward/2/inttypes.h
-num2int.o: $(hdrdir)/ruby/backward/2/limits.h
-num2int.o: $(hdrdir)/ruby/backward/2/long_long.h
-num2int.o: $(hdrdir)/ruby/backward/2/stdalign.h
-num2int.o: $(hdrdir)/ruby/backward/2/stdarg.h
-num2int.o: $(hdrdir)/ruby/defines.h
-num2int.o: $(hdrdir)/ruby/intern.h
num2int.o: $(hdrdir)/ruby/missing.h
num2int.o: $(hdrdir)/ruby/ruby.h
num2int.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/path_to_class/depend b/ext/-test-/path_to_class/depend
index e2bc971e4ecaee..4911b80adc366a 100644
--- a/ext/-test-/path_to_class/depend
+++ b/ext/-test-/path_to_class/depend
@@ -2,6 +2,18 @@
path_to_class.o: $(RUBY_EXTCONF_H)
path_to_class.o: $(arch_hdrdir)/ruby/config.h
path_to_class.o: $(hdrdir)/ruby.h
+path_to_class.o: $(hdrdir)/ruby/assert.h
+path_to_class.o: $(hdrdir)/ruby/backward.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/assume.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/attributes.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/bool.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/inttypes.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/limits.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/long_long.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/stdalign.h
+path_to_class.o: $(hdrdir)/ruby/backward/2/stdarg.h
+path_to_class.o: $(hdrdir)/ruby/defines.h
+path_to_class.o: $(hdrdir)/ruby/intern.h
path_to_class.o: $(hdrdir)/ruby/internal/anyargs.h
path_to_class.o: $(hdrdir)/ruby/internal/arithmetic.h
path_to_class.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ path_to_class.o: $(hdrdir)/ruby/internal/value_type.h
path_to_class.o: $(hdrdir)/ruby/internal/variable.h
path_to_class.o: $(hdrdir)/ruby/internal/warning_push.h
path_to_class.o: $(hdrdir)/ruby/internal/xmalloc.h
-path_to_class.o: $(hdrdir)/ruby/assert.h
-path_to_class.o: $(hdrdir)/ruby/backward.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/assume.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/attributes.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/bool.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/inttypes.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/limits.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/long_long.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/stdalign.h
-path_to_class.o: $(hdrdir)/ruby/backward/2/stdarg.h
-path_to_class.o: $(hdrdir)/ruby/defines.h
-path_to_class.o: $(hdrdir)/ruby/intern.h
path_to_class.o: $(hdrdir)/ruby/missing.h
path_to_class.o: $(hdrdir)/ruby/ruby.h
path_to_class.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/postponed_job/depend b/ext/-test-/postponed_job/depend
index acabceb0fb684c..36f08b6ebd6647 100644
--- a/ext/-test-/postponed_job/depend
+++ b/ext/-test-/postponed_job/depend
@@ -2,6 +2,19 @@
postponed_job.o: $(RUBY_EXTCONF_H)
postponed_job.o: $(arch_hdrdir)/ruby/config.h
postponed_job.o: $(hdrdir)/ruby.h
+postponed_job.o: $(hdrdir)/ruby/assert.h
+postponed_job.o: $(hdrdir)/ruby/backward.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/assume.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/attributes.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/bool.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/inttypes.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/limits.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/long_long.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/stdalign.h
+postponed_job.o: $(hdrdir)/ruby/backward/2/stdarg.h
+postponed_job.o: $(hdrdir)/ruby/debug.h
+postponed_job.o: $(hdrdir)/ruby/defines.h
+postponed_job.o: $(hdrdir)/ruby/intern.h
postponed_job.o: $(hdrdir)/ruby/internal/anyargs.h
postponed_job.o: $(hdrdir)/ruby/internal/arithmetic.h
postponed_job.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,20 +154,6 @@ postponed_job.o: $(hdrdir)/ruby/internal/value_type.h
postponed_job.o: $(hdrdir)/ruby/internal/variable.h
postponed_job.o: $(hdrdir)/ruby/internal/warning_push.h
postponed_job.o: $(hdrdir)/ruby/internal/xmalloc.h
-postponed_job.o: $(hdrdir)/ruby/assert.h
-postponed_job.o: $(hdrdir)/ruby/backward.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/assume.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/attributes.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/bool.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/inttypes.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/limits.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/long_long.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/stdalign.h
-postponed_job.o: $(hdrdir)/ruby/backward/2/stdarg.h
-postponed_job.o: $(hdrdir)/ruby/debug.h
-postponed_job.o: $(hdrdir)/ruby/defines.h
-postponed_job.o: $(hdrdir)/ruby/intern.h
postponed_job.o: $(hdrdir)/ruby/missing.h
postponed_job.o: $(hdrdir)/ruby/ruby.h
postponed_job.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/postponed_job/postponed_job.c b/ext/-test-/postponed_job/postponed_job.c
index d8684d475a45bd..fa57bef6f5acec 100644
--- a/ext/-test-/postponed_job/postponed_job.c
+++ b/ext/-test-/postponed_job/postponed_job.c
@@ -58,6 +58,34 @@ pjob_call_direct(VALUE self, VALUE obj)
return self;
}
+#ifdef HAVE_PTHREAD_H
+#include
+
+static void *
+pjob_register_in_c_thread_i(void *obj)
+{
+ rb_postponed_job_register_one(0, pjob_one_callback, (void *)obj);
+ rb_postponed_job_register_one(0, pjob_one_callback, (void *)obj);
+ rb_postponed_job_register_one(0, pjob_one_callback, (void *)obj);
+ return NULL;
+}
+
+static VALUE
+pjob_register_in_c_thread(VALUE self, VALUE obj)
+{
+ pthread_t thread;
+ if (pthread_create(&thread, NULL, pjob_register_in_c_thread_i, (void *)obj)) {
+ return Qfalse;
+ }
+
+ if (pthread_join(thread, NULL)) {
+ return Qfalse;
+ }
+
+ return Qtrue;
+}
+#endif
+
void
Init_postponed_job(VALUE self)
{
@@ -65,5 +93,8 @@ Init_postponed_job(VALUE self)
rb_define_module_function(mBug, "postponed_job_register", pjob_register, 1);
rb_define_module_function(mBug, "postponed_job_register_one", pjob_register_one, 1);
rb_define_module_function(mBug, "postponed_job_call_direct", pjob_call_direct, 1);
+#ifdef HAVE_PTHREAD_H
+ rb_define_module_function(mBug, "postponed_job_register_in_c_thread", pjob_register_in_c_thread, 1);
+#endif
}
diff --git a/ext/-test-/printf/depend b/ext/-test-/printf/depend
index 72f3b081be15f7..143317c778a9c8 100644
--- a/ext/-test-/printf/depend
+++ b/ext/-test-/printf/depend
@@ -7,7 +7,6 @@ printf.o: $(hdrdir)/ruby/backward.h
printf.o: $(hdrdir)/ruby/backward/2/assume.h
printf.o: $(hdrdir)/ruby/backward/2/attributes.h
printf.o: $(hdrdir)/ruby/backward/2/bool.h
-printf.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
printf.o: $(hdrdir)/ruby/backward/2/inttypes.h
printf.o: $(hdrdir)/ruby/backward/2/limits.h
printf.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/-test-/proc/depend b/ext/-test-/proc/depend
index 929b4927dc7e4d..a1ce4cdf42be81 100644
--- a/ext/-test-/proc/depend
+++ b/ext/-test-/proc/depend
@@ -2,6 +2,18 @@
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,18 @@ init.o: init.c
receiver.o: $(RUBY_EXTCONF_H)
receiver.o: $(arch_hdrdir)/ruby/config.h
receiver.o: $(hdrdir)/ruby.h
+receiver.o: $(hdrdir)/ruby/assert.h
+receiver.o: $(hdrdir)/ruby/backward.h
+receiver.o: $(hdrdir)/ruby/backward/2/assume.h
+receiver.o: $(hdrdir)/ruby/backward/2/attributes.h
+receiver.o: $(hdrdir)/ruby/backward/2/bool.h
+receiver.o: $(hdrdir)/ruby/backward/2/inttypes.h
+receiver.o: $(hdrdir)/ruby/backward/2/limits.h
+receiver.o: $(hdrdir)/ruby/backward/2/long_long.h
+receiver.o: $(hdrdir)/ruby/backward/2/stdalign.h
+receiver.o: $(hdrdir)/ruby/backward/2/stdarg.h
+receiver.o: $(hdrdir)/ruby/defines.h
+receiver.o: $(hdrdir)/ruby/intern.h
receiver.o: $(hdrdir)/ruby/internal/anyargs.h
receiver.o: $(hdrdir)/ruby/internal/arithmetic.h
receiver.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +312,6 @@ receiver.o: $(hdrdir)/ruby/internal/value_type.h
receiver.o: $(hdrdir)/ruby/internal/variable.h
receiver.o: $(hdrdir)/ruby/internal/warning_push.h
receiver.o: $(hdrdir)/ruby/internal/xmalloc.h
-receiver.o: $(hdrdir)/ruby/assert.h
-receiver.o: $(hdrdir)/ruby/backward.h
-receiver.o: $(hdrdir)/ruby/backward/2/assume.h
-receiver.o: $(hdrdir)/ruby/backward/2/attributes.h
-receiver.o: $(hdrdir)/ruby/backward/2/bool.h
-receiver.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-receiver.o: $(hdrdir)/ruby/backward/2/inttypes.h
-receiver.o: $(hdrdir)/ruby/backward/2/limits.h
-receiver.o: $(hdrdir)/ruby/backward/2/long_long.h
-receiver.o: $(hdrdir)/ruby/backward/2/stdalign.h
-receiver.o: $(hdrdir)/ruby/backward/2/stdarg.h
-receiver.o: $(hdrdir)/ruby/defines.h
-receiver.o: $(hdrdir)/ruby/intern.h
receiver.o: $(hdrdir)/ruby/missing.h
receiver.o: $(hdrdir)/ruby/ruby.h
receiver.o: $(hdrdir)/ruby/st.h
@@ -322,6 +320,18 @@ receiver.o: receiver.c
super.o: $(RUBY_EXTCONF_H)
super.o: $(arch_hdrdir)/ruby/config.h
super.o: $(hdrdir)/ruby.h
+super.o: $(hdrdir)/ruby/assert.h
+super.o: $(hdrdir)/ruby/backward.h
+super.o: $(hdrdir)/ruby/backward/2/assume.h
+super.o: $(hdrdir)/ruby/backward/2/attributes.h
+super.o: $(hdrdir)/ruby/backward/2/bool.h
+super.o: $(hdrdir)/ruby/backward/2/inttypes.h
+super.o: $(hdrdir)/ruby/backward/2/limits.h
+super.o: $(hdrdir)/ruby/backward/2/long_long.h
+super.o: $(hdrdir)/ruby/backward/2/stdalign.h
+super.o: $(hdrdir)/ruby/backward/2/stdarg.h
+super.o: $(hdrdir)/ruby/defines.h
+super.o: $(hdrdir)/ruby/intern.h
super.o: $(hdrdir)/ruby/internal/anyargs.h
super.o: $(hdrdir)/ruby/internal/arithmetic.h
super.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -461,19 +471,6 @@ super.o: $(hdrdir)/ruby/internal/value_type.h
super.o: $(hdrdir)/ruby/internal/variable.h
super.o: $(hdrdir)/ruby/internal/warning_push.h
super.o: $(hdrdir)/ruby/internal/xmalloc.h
-super.o: $(hdrdir)/ruby/assert.h
-super.o: $(hdrdir)/ruby/backward.h
-super.o: $(hdrdir)/ruby/backward/2/assume.h
-super.o: $(hdrdir)/ruby/backward/2/attributes.h
-super.o: $(hdrdir)/ruby/backward/2/bool.h
-super.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-super.o: $(hdrdir)/ruby/backward/2/inttypes.h
-super.o: $(hdrdir)/ruby/backward/2/limits.h
-super.o: $(hdrdir)/ruby/backward/2/long_long.h
-super.o: $(hdrdir)/ruby/backward/2/stdalign.h
-super.o: $(hdrdir)/ruby/backward/2/stdarg.h
-super.o: $(hdrdir)/ruby/defines.h
-super.o: $(hdrdir)/ruby/intern.h
super.o: $(hdrdir)/ruby/missing.h
super.o: $(hdrdir)/ruby/ruby.h
super.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/random/depend b/ext/-test-/random/depend
index 799b563075fc4a..7cef34f1157187 100644
--- a/ext/-test-/random/depend
+++ b/ext/-test-/random/depend
@@ -7,12 +7,9 @@ init.o: $(hdrdir)/ruby/backward.h
init.o: $(hdrdir)/ruby/backward/2/assume.h
init.o: $(hdrdir)/ruby/backward/2/attributes.h
init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
init.o: $(hdrdir)/ruby/backward/2/inttypes.h
init.o: $(hdrdir)/ruby/backward/2/limits.h
init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/r_cast.h
-init.o: $(hdrdir)/ruby/backward/2/rmodule.h
init.o: $(hdrdir)/ruby/backward/2/stdalign.h
init.o: $(hdrdir)/ruby/backward/2/stdarg.h
init.o: $(hdrdir)/ruby/defines.h
@@ -168,12 +165,9 @@ loop.o: $(hdrdir)/ruby/backward.h
loop.o: $(hdrdir)/ruby/backward/2/assume.h
loop.o: $(hdrdir)/ruby/backward/2/attributes.h
loop.o: $(hdrdir)/ruby/backward/2/bool.h
-loop.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
loop.o: $(hdrdir)/ruby/backward/2/inttypes.h
loop.o: $(hdrdir)/ruby/backward/2/limits.h
loop.o: $(hdrdir)/ruby/backward/2/long_long.h
-loop.o: $(hdrdir)/ruby/backward/2/r_cast.h
-loop.o: $(hdrdir)/ruby/backward/2/rmodule.h
loop.o: $(hdrdir)/ruby/backward/2/stdalign.h
loop.o: $(hdrdir)/ruby/backward/2/stdarg.h
loop.o: $(hdrdir)/ruby/defines.h
diff --git a/ext/-test-/rational/depend b/ext/-test-/rational/depend
index 67ac3c6f904c49..3fbe6e0a07757e 100644
--- a/ext/-test-/rational/depend
+++ b/ext/-test-/rational/depend
@@ -5,7 +5,19 @@ rat.o: rat.c $(top_srcdir)/internal.h
# AUTOGENERATED DEPENDENCIES START
rat.o: $(RUBY_EXTCONF_H)
rat.o: $(arch_hdrdir)/ruby/config.h
-rat.o: $(hdrdir)/ruby.h
+rat.o: $(hdrdir)/ruby/assert.h
+rat.o: $(hdrdir)/ruby/backward.h
+rat.o: $(hdrdir)/ruby/backward/2/assume.h
+rat.o: $(hdrdir)/ruby/backward/2/attributes.h
+rat.o: $(hdrdir)/ruby/backward/2/bool.h
+rat.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+rat.o: $(hdrdir)/ruby/backward/2/inttypes.h
+rat.o: $(hdrdir)/ruby/backward/2/limits.h
+rat.o: $(hdrdir)/ruby/backward/2/long_long.h
+rat.o: $(hdrdir)/ruby/backward/2/stdalign.h
+rat.o: $(hdrdir)/ruby/backward/2/stdarg.h
+rat.o: $(hdrdir)/ruby/defines.h
+rat.o: $(hdrdir)/ruby/intern.h
rat.o: $(hdrdir)/ruby/internal/anyargs.h
rat.o: $(hdrdir)/ruby/internal/arithmetic.h
rat.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -145,24 +157,10 @@ rat.o: $(hdrdir)/ruby/internal/value_type.h
rat.o: $(hdrdir)/ruby/internal/variable.h
rat.o: $(hdrdir)/ruby/internal/warning_push.h
rat.o: $(hdrdir)/ruby/internal/xmalloc.h
-rat.o: $(hdrdir)/ruby/assert.h
-rat.o: $(hdrdir)/ruby/backward.h
-rat.o: $(hdrdir)/ruby/backward/2/assume.h
-rat.o: $(hdrdir)/ruby/backward/2/attributes.h
-rat.o: $(hdrdir)/ruby/backward/2/bool.h
-rat.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-rat.o: $(hdrdir)/ruby/backward/2/inttypes.h
-rat.o: $(hdrdir)/ruby/backward/2/limits.h
-rat.o: $(hdrdir)/ruby/backward/2/long_long.h
-rat.o: $(hdrdir)/ruby/backward/2/stdalign.h
-rat.o: $(hdrdir)/ruby/backward/2/stdarg.h
-rat.o: $(hdrdir)/ruby/defines.h
-rat.o: $(hdrdir)/ruby/intern.h
rat.o: $(hdrdir)/ruby/missing.h
rat.o: $(hdrdir)/ruby/ruby.h
rat.o: $(hdrdir)/ruby/st.h
rat.o: $(hdrdir)/ruby/subst.h
-rat.o: $(top_srcdir)/internal.h
rat.o: $(top_srcdir)/internal/bignum.h
rat.o: $(top_srcdir)/internal/bits.h
rat.o: $(top_srcdir)/internal/compilers.h
diff --git a/ext/-test-/rb_call_super_kw/depend b/ext/-test-/rb_call_super_kw/depend
index 25725f9a9a3859..a8126a9efe793d 100644
--- a/ext/-test-/rb_call_super_kw/depend
+++ b/ext/-test-/rb_call_super_kw/depend
@@ -2,6 +2,18 @@
rb_call_super_kw.o: $(RUBY_EXTCONF_H)
rb_call_super_kw.o: $(arch_hdrdir)/ruby/config.h
rb_call_super_kw.o: $(hdrdir)/ruby.h
+rb_call_super_kw.o: $(hdrdir)/ruby/assert.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/assume.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/attributes.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/bool.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/inttypes.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/limits.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/long_long.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/stdalign.h
+rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/stdarg.h
+rb_call_super_kw.o: $(hdrdir)/ruby/defines.h
+rb_call_super_kw.o: $(hdrdir)/ruby/intern.h
rb_call_super_kw.o: $(hdrdir)/ruby/internal/anyargs.h
rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic.h
rb_call_super_kw.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ rb_call_super_kw.o: $(hdrdir)/ruby/internal/value_type.h
rb_call_super_kw.o: $(hdrdir)/ruby/internal/variable.h
rb_call_super_kw.o: $(hdrdir)/ruby/internal/warning_push.h
rb_call_super_kw.o: $(hdrdir)/ruby/internal/xmalloc.h
-rb_call_super_kw.o: $(hdrdir)/ruby/assert.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/assume.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/attributes.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/bool.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/inttypes.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/limits.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/long_long.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/stdalign.h
-rb_call_super_kw.o: $(hdrdir)/ruby/backward/2/stdarg.h
-rb_call_super_kw.o: $(hdrdir)/ruby/defines.h
-rb_call_super_kw.o: $(hdrdir)/ruby/intern.h
rb_call_super_kw.o: $(hdrdir)/ruby/missing.h
rb_call_super_kw.o: $(hdrdir)/ruby/ruby.h
rb_call_super_kw.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/recursion/depend b/ext/-test-/recursion/depend
index 14bfbfca4e1b77..12d7ae60265738 100644
--- a/ext/-test-/recursion/depend
+++ b/ext/-test-/recursion/depend
@@ -2,6 +2,18 @@
recursion.o: $(RUBY_EXTCONF_H)
recursion.o: $(arch_hdrdir)/ruby/config.h
recursion.o: $(hdrdir)/ruby.h
+recursion.o: $(hdrdir)/ruby/assert.h
+recursion.o: $(hdrdir)/ruby/backward.h
+recursion.o: $(hdrdir)/ruby/backward/2/assume.h
+recursion.o: $(hdrdir)/ruby/backward/2/attributes.h
+recursion.o: $(hdrdir)/ruby/backward/2/bool.h
+recursion.o: $(hdrdir)/ruby/backward/2/inttypes.h
+recursion.o: $(hdrdir)/ruby/backward/2/limits.h
+recursion.o: $(hdrdir)/ruby/backward/2/long_long.h
+recursion.o: $(hdrdir)/ruby/backward/2/stdalign.h
+recursion.o: $(hdrdir)/ruby/backward/2/stdarg.h
+recursion.o: $(hdrdir)/ruby/defines.h
+recursion.o: $(hdrdir)/ruby/intern.h
recursion.o: $(hdrdir)/ruby/internal/anyargs.h
recursion.o: $(hdrdir)/ruby/internal/arithmetic.h
recursion.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ recursion.o: $(hdrdir)/ruby/internal/value_type.h
recursion.o: $(hdrdir)/ruby/internal/variable.h
recursion.o: $(hdrdir)/ruby/internal/warning_push.h
recursion.o: $(hdrdir)/ruby/internal/xmalloc.h
-recursion.o: $(hdrdir)/ruby/assert.h
-recursion.o: $(hdrdir)/ruby/backward.h
-recursion.o: $(hdrdir)/ruby/backward/2/assume.h
-recursion.o: $(hdrdir)/ruby/backward/2/attributes.h
-recursion.o: $(hdrdir)/ruby/backward/2/bool.h
-recursion.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-recursion.o: $(hdrdir)/ruby/backward/2/inttypes.h
-recursion.o: $(hdrdir)/ruby/backward/2/limits.h
-recursion.o: $(hdrdir)/ruby/backward/2/long_long.h
-recursion.o: $(hdrdir)/ruby/backward/2/stdalign.h
-recursion.o: $(hdrdir)/ruby/backward/2/stdarg.h
-recursion.o: $(hdrdir)/ruby/defines.h
-recursion.o: $(hdrdir)/ruby/intern.h
recursion.o: $(hdrdir)/ruby/missing.h
recursion.o: $(hdrdir)/ruby/ruby.h
recursion.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/regexp/depend b/ext/-test-/regexp/depend
index 1e2b22531620fd..c46d87624126dd 100644
--- a/ext/-test-/regexp/depend
+++ b/ext/-test-/regexp/depend
@@ -2,6 +2,18 @@
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,18 @@ init.o: init.c
parse_depth_limit.o: $(RUBY_EXTCONF_H)
parse_depth_limit.o: $(arch_hdrdir)/ruby/config.h
parse_depth_limit.o: $(hdrdir)/ruby.h
+parse_depth_limit.o: $(hdrdir)/ruby/assert.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/assume.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/attributes.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/bool.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/inttypes.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/limits.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/long_long.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/stdalign.h
+parse_depth_limit.o: $(hdrdir)/ruby/backward/2/stdarg.h
+parse_depth_limit.o: $(hdrdir)/ruby/defines.h
+parse_depth_limit.o: $(hdrdir)/ruby/intern.h
parse_depth_limit.o: $(hdrdir)/ruby/internal/anyargs.h
parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic.h
parse_depth_limit.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +312,6 @@ parse_depth_limit.o: $(hdrdir)/ruby/internal/value_type.h
parse_depth_limit.o: $(hdrdir)/ruby/internal/variable.h
parse_depth_limit.o: $(hdrdir)/ruby/internal/warning_push.h
parse_depth_limit.o: $(hdrdir)/ruby/internal/xmalloc.h
-parse_depth_limit.o: $(hdrdir)/ruby/assert.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/assume.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/attributes.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/bool.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/inttypes.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/limits.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/long_long.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/stdalign.h
-parse_depth_limit.o: $(hdrdir)/ruby/backward/2/stdarg.h
-parse_depth_limit.o: $(hdrdir)/ruby/defines.h
-parse_depth_limit.o: $(hdrdir)/ruby/intern.h
parse_depth_limit.o: $(hdrdir)/ruby/missing.h
parse_depth_limit.o: $(hdrdir)/ruby/onigmo.h
parse_depth_limit.o: $(hdrdir)/ruby/ruby.h
diff --git a/ext/-test-/scan_args/depend b/ext/-test-/scan_args/depend
index e01de3124e34f2..99fd82ce342358 100644
--- a/ext/-test-/scan_args/depend
+++ b/ext/-test-/scan_args/depend
@@ -2,6 +2,18 @@
scan_args.o: $(RUBY_EXTCONF_H)
scan_args.o: $(arch_hdrdir)/ruby/config.h
scan_args.o: $(hdrdir)/ruby.h
+scan_args.o: $(hdrdir)/ruby/assert.h
+scan_args.o: $(hdrdir)/ruby/backward.h
+scan_args.o: $(hdrdir)/ruby/backward/2/assume.h
+scan_args.o: $(hdrdir)/ruby/backward/2/attributes.h
+scan_args.o: $(hdrdir)/ruby/backward/2/bool.h
+scan_args.o: $(hdrdir)/ruby/backward/2/inttypes.h
+scan_args.o: $(hdrdir)/ruby/backward/2/limits.h
+scan_args.o: $(hdrdir)/ruby/backward/2/long_long.h
+scan_args.o: $(hdrdir)/ruby/backward/2/stdalign.h
+scan_args.o: $(hdrdir)/ruby/backward/2/stdarg.h
+scan_args.o: $(hdrdir)/ruby/defines.h
+scan_args.o: $(hdrdir)/ruby/intern.h
scan_args.o: $(hdrdir)/ruby/internal/anyargs.h
scan_args.o: $(hdrdir)/ruby/internal/arithmetic.h
scan_args.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ scan_args.o: $(hdrdir)/ruby/internal/value_type.h
scan_args.o: $(hdrdir)/ruby/internal/variable.h
scan_args.o: $(hdrdir)/ruby/internal/warning_push.h
scan_args.o: $(hdrdir)/ruby/internal/xmalloc.h
-scan_args.o: $(hdrdir)/ruby/assert.h
-scan_args.o: $(hdrdir)/ruby/backward.h
-scan_args.o: $(hdrdir)/ruby/backward/2/assume.h
-scan_args.o: $(hdrdir)/ruby/backward/2/attributes.h
-scan_args.o: $(hdrdir)/ruby/backward/2/bool.h
-scan_args.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-scan_args.o: $(hdrdir)/ruby/backward/2/inttypes.h
-scan_args.o: $(hdrdir)/ruby/backward/2/limits.h
-scan_args.o: $(hdrdir)/ruby/backward/2/long_long.h
-scan_args.o: $(hdrdir)/ruby/backward/2/stdalign.h
-scan_args.o: $(hdrdir)/ruby/backward/2/stdarg.h
-scan_args.o: $(hdrdir)/ruby/defines.h
-scan_args.o: $(hdrdir)/ruby/intern.h
scan_args.o: $(hdrdir)/ruby/missing.h
scan_args.o: $(hdrdir)/ruby/ruby.h
scan_args.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/st/foreach/depend b/ext/-test-/st/foreach/depend
index d9c0f56d116646..6128230798b604 100644
--- a/ext/-test-/st/foreach/depend
+++ b/ext/-test-/st/foreach/depend
@@ -2,6 +2,18 @@
foreach.o: $(RUBY_EXTCONF_H)
foreach.o: $(arch_hdrdir)/ruby/config.h
foreach.o: $(hdrdir)/ruby.h
+foreach.o: $(hdrdir)/ruby/assert.h
+foreach.o: $(hdrdir)/ruby/backward.h
+foreach.o: $(hdrdir)/ruby/backward/2/assume.h
+foreach.o: $(hdrdir)/ruby/backward/2/attributes.h
+foreach.o: $(hdrdir)/ruby/backward/2/bool.h
+foreach.o: $(hdrdir)/ruby/backward/2/inttypes.h
+foreach.o: $(hdrdir)/ruby/backward/2/limits.h
+foreach.o: $(hdrdir)/ruby/backward/2/long_long.h
+foreach.o: $(hdrdir)/ruby/backward/2/stdalign.h
+foreach.o: $(hdrdir)/ruby/backward/2/stdarg.h
+foreach.o: $(hdrdir)/ruby/defines.h
+foreach.o: $(hdrdir)/ruby/intern.h
foreach.o: $(hdrdir)/ruby/internal/anyargs.h
foreach.o: $(hdrdir)/ruby/internal/arithmetic.h
foreach.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ foreach.o: $(hdrdir)/ruby/internal/value_type.h
foreach.o: $(hdrdir)/ruby/internal/variable.h
foreach.o: $(hdrdir)/ruby/internal/warning_push.h
foreach.o: $(hdrdir)/ruby/internal/xmalloc.h
-foreach.o: $(hdrdir)/ruby/assert.h
-foreach.o: $(hdrdir)/ruby/backward.h
-foreach.o: $(hdrdir)/ruby/backward/2/assume.h
-foreach.o: $(hdrdir)/ruby/backward/2/attributes.h
-foreach.o: $(hdrdir)/ruby/backward/2/bool.h
-foreach.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-foreach.o: $(hdrdir)/ruby/backward/2/inttypes.h
-foreach.o: $(hdrdir)/ruby/backward/2/limits.h
-foreach.o: $(hdrdir)/ruby/backward/2/long_long.h
-foreach.o: $(hdrdir)/ruby/backward/2/stdalign.h
-foreach.o: $(hdrdir)/ruby/backward/2/stdarg.h
-foreach.o: $(hdrdir)/ruby/defines.h
-foreach.o: $(hdrdir)/ruby/intern.h
foreach.o: $(hdrdir)/ruby/missing.h
foreach.o: $(hdrdir)/ruby/ruby.h
foreach.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/st/numhash/depend b/ext/-test-/st/numhash/depend
index 8df4fed3e4fffd..b3475f5fc5908c 100644
--- a/ext/-test-/st/numhash/depend
+++ b/ext/-test-/st/numhash/depend
@@ -2,6 +2,18 @@
numhash.o: $(RUBY_EXTCONF_H)
numhash.o: $(arch_hdrdir)/ruby/config.h
numhash.o: $(hdrdir)/ruby.h
+numhash.o: $(hdrdir)/ruby/assert.h
+numhash.o: $(hdrdir)/ruby/backward.h
+numhash.o: $(hdrdir)/ruby/backward/2/assume.h
+numhash.o: $(hdrdir)/ruby/backward/2/attributes.h
+numhash.o: $(hdrdir)/ruby/backward/2/bool.h
+numhash.o: $(hdrdir)/ruby/backward/2/inttypes.h
+numhash.o: $(hdrdir)/ruby/backward/2/limits.h
+numhash.o: $(hdrdir)/ruby/backward/2/long_long.h
+numhash.o: $(hdrdir)/ruby/backward/2/stdalign.h
+numhash.o: $(hdrdir)/ruby/backward/2/stdarg.h
+numhash.o: $(hdrdir)/ruby/defines.h
+numhash.o: $(hdrdir)/ruby/intern.h
numhash.o: $(hdrdir)/ruby/internal/anyargs.h
numhash.o: $(hdrdir)/ruby/internal/arithmetic.h
numhash.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ numhash.o: $(hdrdir)/ruby/internal/value_type.h
numhash.o: $(hdrdir)/ruby/internal/variable.h
numhash.o: $(hdrdir)/ruby/internal/warning_push.h
numhash.o: $(hdrdir)/ruby/internal/xmalloc.h
-numhash.o: $(hdrdir)/ruby/assert.h
-numhash.o: $(hdrdir)/ruby/backward.h
-numhash.o: $(hdrdir)/ruby/backward/2/assume.h
-numhash.o: $(hdrdir)/ruby/backward/2/attributes.h
-numhash.o: $(hdrdir)/ruby/backward/2/bool.h
-numhash.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-numhash.o: $(hdrdir)/ruby/backward/2/inttypes.h
-numhash.o: $(hdrdir)/ruby/backward/2/limits.h
-numhash.o: $(hdrdir)/ruby/backward/2/long_long.h
-numhash.o: $(hdrdir)/ruby/backward/2/stdalign.h
-numhash.o: $(hdrdir)/ruby/backward/2/stdarg.h
-numhash.o: $(hdrdir)/ruby/defines.h
-numhash.o: $(hdrdir)/ruby/intern.h
numhash.o: $(hdrdir)/ruby/missing.h
numhash.o: $(hdrdir)/ruby/ruby.h
numhash.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/st/update/depend b/ext/-test-/st/update/depend
index b840e67f3b0438..bbf97cbbfb6523 100644
--- a/ext/-test-/st/update/depend
+++ b/ext/-test-/st/update/depend
@@ -2,6 +2,18 @@
update.o: $(RUBY_EXTCONF_H)
update.o: $(arch_hdrdir)/ruby/config.h
update.o: $(hdrdir)/ruby.h
+update.o: $(hdrdir)/ruby/assert.h
+update.o: $(hdrdir)/ruby/backward.h
+update.o: $(hdrdir)/ruby/backward/2/assume.h
+update.o: $(hdrdir)/ruby/backward/2/attributes.h
+update.o: $(hdrdir)/ruby/backward/2/bool.h
+update.o: $(hdrdir)/ruby/backward/2/inttypes.h
+update.o: $(hdrdir)/ruby/backward/2/limits.h
+update.o: $(hdrdir)/ruby/backward/2/long_long.h
+update.o: $(hdrdir)/ruby/backward/2/stdalign.h
+update.o: $(hdrdir)/ruby/backward/2/stdarg.h
+update.o: $(hdrdir)/ruby/defines.h
+update.o: $(hdrdir)/ruby/intern.h
update.o: $(hdrdir)/ruby/internal/anyargs.h
update.o: $(hdrdir)/ruby/internal/arithmetic.h
update.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ update.o: $(hdrdir)/ruby/internal/value_type.h
update.o: $(hdrdir)/ruby/internal/variable.h
update.o: $(hdrdir)/ruby/internal/warning_push.h
update.o: $(hdrdir)/ruby/internal/xmalloc.h
-update.o: $(hdrdir)/ruby/assert.h
-update.o: $(hdrdir)/ruby/backward.h
-update.o: $(hdrdir)/ruby/backward/2/assume.h
-update.o: $(hdrdir)/ruby/backward/2/attributes.h
-update.o: $(hdrdir)/ruby/backward/2/bool.h
-update.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-update.o: $(hdrdir)/ruby/backward/2/inttypes.h
-update.o: $(hdrdir)/ruby/backward/2/limits.h
-update.o: $(hdrdir)/ruby/backward/2/long_long.h
-update.o: $(hdrdir)/ruby/backward/2/stdalign.h
-update.o: $(hdrdir)/ruby/backward/2/stdarg.h
-update.o: $(hdrdir)/ruby/defines.h
-update.o: $(hdrdir)/ruby/intern.h
update.o: $(hdrdir)/ruby/missing.h
update.o: $(hdrdir)/ruby/ruby.h
update.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/string/depend b/ext/-test-/string/depend
index 5eb01205784550..1e2e1231303887 100644
--- a/ext/-test-/string/depend
+++ b/ext/-test-/string/depend
@@ -170,7 +170,6 @@ capacity.o: $(hdrdir)/ruby/oniguruma.h
capacity.o: $(hdrdir)/ruby/ruby.h
capacity.o: $(hdrdir)/ruby/st.h
capacity.o: $(hdrdir)/ruby/subst.h
-capacity.o: $(top_srcdir)/internal.h
capacity.o: $(top_srcdir)/internal/compilers.h
capacity.o: $(top_srcdir)/internal/string.h
capacity.o: capacity.c
@@ -181,7 +180,6 @@ coderange.o: $(hdrdir)/ruby/backward.h
coderange.o: $(hdrdir)/ruby/backward/2/assume.h
coderange.o: $(hdrdir)/ruby/backward/2/attributes.h
coderange.o: $(hdrdir)/ruby/backward/2/bool.h
-coderange.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
coderange.o: $(hdrdir)/ruby/backward/2/inttypes.h
coderange.o: $(hdrdir)/ruby/backward/2/limits.h
coderange.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -347,7 +345,6 @@ coderange.o: $(hdrdir)/ruby/subst.h
coderange.o: coderange.c
cstr.o: $(RUBY_EXTCONF_H)
cstr.o: $(arch_hdrdir)/ruby/config.h
-cstr.o: $(hdrdir)/ruby.h
cstr.o: $(hdrdir)/ruby/assert.h
cstr.o: $(hdrdir)/ruby/backward.h
cstr.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -518,7 +515,6 @@ cstr.o: $(hdrdir)/ruby/st.h
cstr.o: $(hdrdir)/ruby/subst.h
cstr.o: $(top_srcdir)/internal.h
cstr.o: $(top_srcdir)/internal/compilers.h
-cstr.o: $(top_srcdir)/internal/error.h
cstr.o: $(top_srcdir)/internal/string.h
cstr.o: cstr.c
ellipsize.o: $(RUBY_EXTCONF_H)
@@ -529,7 +525,6 @@ ellipsize.o: $(hdrdir)/ruby/backward.h
ellipsize.o: $(hdrdir)/ruby/backward/2/assume.h
ellipsize.o: $(hdrdir)/ruby/backward/2/attributes.h
ellipsize.o: $(hdrdir)/ruby/backward/2/bool.h
-ellipsize.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
ellipsize.o: $(hdrdir)/ruby/backward/2/inttypes.h
ellipsize.o: $(hdrdir)/ruby/backward/2/limits.h
ellipsize.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -689,7 +684,6 @@ enc_associate.o: $(hdrdir)/ruby/backward.h
enc_associate.o: $(hdrdir)/ruby/backward/2/assume.h
enc_associate.o: $(hdrdir)/ruby/backward/2/attributes.h
enc_associate.o: $(hdrdir)/ruby/backward/2/bool.h
-enc_associate.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
enc_associate.o: $(hdrdir)/ruby/backward/2/inttypes.h
enc_associate.o: $(hdrdir)/ruby/backward/2/limits.h
enc_associate.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -860,7 +854,6 @@ enc_str_buf_cat.o: $(hdrdir)/ruby/backward.h
enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/assume.h
enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/attributes.h
enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/bool.h
-enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/inttypes.h
enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/limits.h
enc_str_buf_cat.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1032,7 +1025,6 @@ fstring.o: $(hdrdir)/ruby/backward.h
fstring.o: $(hdrdir)/ruby/backward/2/assume.h
fstring.o: $(hdrdir)/ruby/backward/2/attributes.h
fstring.o: $(hdrdir)/ruby/backward/2/bool.h
-fstring.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
fstring.o: $(hdrdir)/ruby/backward/2/inttypes.h
fstring.o: $(hdrdir)/ruby/backward/2/limits.h
fstring.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1204,7 +1196,6 @@ init.o: $(hdrdir)/ruby/backward.h
init.o: $(hdrdir)/ruby/backward/2/assume.h
init.o: $(hdrdir)/ruby/backward/2/attributes.h
init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
init.o: $(hdrdir)/ruby/backward/2/inttypes.h
init.o: $(hdrdir)/ruby/backward/2/limits.h
init.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1364,7 +1355,6 @@ modify.o: $(hdrdir)/ruby/backward.h
modify.o: $(hdrdir)/ruby/backward/2/assume.h
modify.o: $(hdrdir)/ruby/backward/2/attributes.h
modify.o: $(hdrdir)/ruby/backward/2/bool.h
-modify.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
modify.o: $(hdrdir)/ruby/backward/2/inttypes.h
modify.o: $(hdrdir)/ruby/backward/2/limits.h
modify.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1524,7 +1514,6 @@ new.o: $(hdrdir)/ruby/backward.h
new.o: $(hdrdir)/ruby/backward/2/assume.h
new.o: $(hdrdir)/ruby/backward/2/attributes.h
new.o: $(hdrdir)/ruby/backward/2/bool.h
-new.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
new.o: $(hdrdir)/ruby/backward/2/inttypes.h
new.o: $(hdrdir)/ruby/backward/2/limits.h
new.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1696,7 +1685,6 @@ nofree.o: $(hdrdir)/ruby/backward.h
nofree.o: $(hdrdir)/ruby/backward/2/assume.h
nofree.o: $(hdrdir)/ruby/backward/2/attributes.h
nofree.o: $(hdrdir)/ruby/backward/2/bool.h
-nofree.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
nofree.o: $(hdrdir)/ruby/backward/2/inttypes.h
nofree.o: $(hdrdir)/ruby/backward/2/limits.h
nofree.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1850,13 +1838,11 @@ nofree.o: $(hdrdir)/ruby/subst.h
nofree.o: nofree.c
normalize.o: $(RUBY_EXTCONF_H)
normalize.o: $(arch_hdrdir)/ruby/config.h
-normalize.o: $(hdrdir)/ruby.h
normalize.o: $(hdrdir)/ruby/assert.h
normalize.o: $(hdrdir)/ruby/backward.h
normalize.o: $(hdrdir)/ruby/backward/2/assume.h
normalize.o: $(hdrdir)/ruby/backward/2/attributes.h
normalize.o: $(hdrdir)/ruby/backward/2/bool.h
-normalize.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
normalize.o: $(hdrdir)/ruby/backward/2/inttypes.h
normalize.o: $(hdrdir)/ruby/backward/2/limits.h
normalize.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -2019,7 +2005,6 @@ normalize.o: $(hdrdir)/ruby/oniguruma.h
normalize.o: $(hdrdir)/ruby/ruby.h
normalize.o: $(hdrdir)/ruby/st.h
normalize.o: $(hdrdir)/ruby/subst.h
-normalize.o: $(top_srcdir)/internal.h
normalize.o: $(top_srcdir)/internal/file.h
normalize.o: normalize.c
qsort.o: $(RUBY_EXTCONF_H)
@@ -2030,7 +2015,6 @@ qsort.o: $(hdrdir)/ruby/backward.h
qsort.o: $(hdrdir)/ruby/backward/2/assume.h
qsort.o: $(hdrdir)/ruby/backward/2/attributes.h
qsort.o: $(hdrdir)/ruby/backward/2/bool.h
-qsort.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
qsort.o: $(hdrdir)/ruby/backward/2/inttypes.h
qsort.o: $(hdrdir)/ruby/backward/2/limits.h
qsort.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -2203,7 +2187,6 @@ rb_interned_str.o: $(hdrdir)/ruby/backward.h
rb_interned_str.o: $(hdrdir)/ruby/backward/2/assume.h
rb_interned_str.o: $(hdrdir)/ruby/backward/2/attributes.h
rb_interned_str.o: $(hdrdir)/ruby/backward/2/bool.h
-rb_interned_str.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
rb_interned_str.o: $(hdrdir)/ruby/backward/2/inttypes.h
rb_interned_str.o: $(hdrdir)/ruby/backward/2/limits.h
rb_interned_str.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -2363,7 +2346,6 @@ rb_str_dup.o: $(hdrdir)/ruby/backward.h
rb_str_dup.o: $(hdrdir)/ruby/backward/2/assume.h
rb_str_dup.o: $(hdrdir)/ruby/backward/2/attributes.h
rb_str_dup.o: $(hdrdir)/ruby/backward/2/bool.h
-rb_str_dup.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
rb_str_dup.o: $(hdrdir)/ruby/backward/2/inttypes.h
rb_str_dup.o: $(hdrdir)/ruby/backward/2/limits.h
rb_str_dup.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -2523,7 +2505,6 @@ set_len.o: $(hdrdir)/ruby/backward.h
set_len.o: $(hdrdir)/ruby/backward/2/assume.h
set_len.o: $(hdrdir)/ruby/backward/2/attributes.h
set_len.o: $(hdrdir)/ruby/backward/2/bool.h
-set_len.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
set_len.o: $(hdrdir)/ruby/backward/2/inttypes.h
set_len.o: $(hdrdir)/ruby/backward/2/limits.h
set_len.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/-test-/struct/depend b/ext/-test-/struct/depend
index aebf9a88b7682b..c9dcffd3c44eca 100644
--- a/ext/-test-/struct/depend
+++ b/ext/-test-/struct/depend
@@ -2,6 +2,18 @@
duplicate.o: $(RUBY_EXTCONF_H)
duplicate.o: $(arch_hdrdir)/ruby/config.h
duplicate.o: $(hdrdir)/ruby.h
+duplicate.o: $(hdrdir)/ruby/assert.h
+duplicate.o: $(hdrdir)/ruby/backward.h
+duplicate.o: $(hdrdir)/ruby/backward/2/assume.h
+duplicate.o: $(hdrdir)/ruby/backward/2/attributes.h
+duplicate.o: $(hdrdir)/ruby/backward/2/bool.h
+duplicate.o: $(hdrdir)/ruby/backward/2/inttypes.h
+duplicate.o: $(hdrdir)/ruby/backward/2/limits.h
+duplicate.o: $(hdrdir)/ruby/backward/2/long_long.h
+duplicate.o: $(hdrdir)/ruby/backward/2/stdalign.h
+duplicate.o: $(hdrdir)/ruby/backward/2/stdarg.h
+duplicate.o: $(hdrdir)/ruby/defines.h
+duplicate.o: $(hdrdir)/ruby/intern.h
duplicate.o: $(hdrdir)/ruby/internal/anyargs.h
duplicate.o: $(hdrdir)/ruby/internal/arithmetic.h
duplicate.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ duplicate.o: $(hdrdir)/ruby/internal/value_type.h
duplicate.o: $(hdrdir)/ruby/internal/variable.h
duplicate.o: $(hdrdir)/ruby/internal/warning_push.h
duplicate.o: $(hdrdir)/ruby/internal/xmalloc.h
-duplicate.o: $(hdrdir)/ruby/assert.h
-duplicate.o: $(hdrdir)/ruby/backward.h
-duplicate.o: $(hdrdir)/ruby/backward/2/assume.h
-duplicate.o: $(hdrdir)/ruby/backward/2/attributes.h
-duplicate.o: $(hdrdir)/ruby/backward/2/bool.h
-duplicate.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-duplicate.o: $(hdrdir)/ruby/backward/2/inttypes.h
-duplicate.o: $(hdrdir)/ruby/backward/2/limits.h
-duplicate.o: $(hdrdir)/ruby/backward/2/long_long.h
-duplicate.o: $(hdrdir)/ruby/backward/2/stdalign.h
-duplicate.o: $(hdrdir)/ruby/backward/2/stdarg.h
-duplicate.o: $(hdrdir)/ruby/defines.h
-duplicate.o: $(hdrdir)/ruby/intern.h
duplicate.o: $(hdrdir)/ruby/missing.h
duplicate.o: $(hdrdir)/ruby/ruby.h
duplicate.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,18 @@ duplicate.o: duplicate.c
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +312,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -322,6 +320,18 @@ init.o: init.c
len.o: $(RUBY_EXTCONF_H)
len.o: $(arch_hdrdir)/ruby/config.h
len.o: $(hdrdir)/ruby.h
+len.o: $(hdrdir)/ruby/assert.h
+len.o: $(hdrdir)/ruby/backward.h
+len.o: $(hdrdir)/ruby/backward/2/assume.h
+len.o: $(hdrdir)/ruby/backward/2/attributes.h
+len.o: $(hdrdir)/ruby/backward/2/bool.h
+len.o: $(hdrdir)/ruby/backward/2/inttypes.h
+len.o: $(hdrdir)/ruby/backward/2/limits.h
+len.o: $(hdrdir)/ruby/backward/2/long_long.h
+len.o: $(hdrdir)/ruby/backward/2/stdalign.h
+len.o: $(hdrdir)/ruby/backward/2/stdarg.h
+len.o: $(hdrdir)/ruby/defines.h
+len.o: $(hdrdir)/ruby/intern.h
len.o: $(hdrdir)/ruby/internal/anyargs.h
len.o: $(hdrdir)/ruby/internal/arithmetic.h
len.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -461,19 +471,6 @@ len.o: $(hdrdir)/ruby/internal/value_type.h
len.o: $(hdrdir)/ruby/internal/variable.h
len.o: $(hdrdir)/ruby/internal/warning_push.h
len.o: $(hdrdir)/ruby/internal/xmalloc.h
-len.o: $(hdrdir)/ruby/assert.h
-len.o: $(hdrdir)/ruby/backward.h
-len.o: $(hdrdir)/ruby/backward/2/assume.h
-len.o: $(hdrdir)/ruby/backward/2/attributes.h
-len.o: $(hdrdir)/ruby/backward/2/bool.h
-len.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-len.o: $(hdrdir)/ruby/backward/2/inttypes.h
-len.o: $(hdrdir)/ruby/backward/2/limits.h
-len.o: $(hdrdir)/ruby/backward/2/long_long.h
-len.o: $(hdrdir)/ruby/backward/2/stdalign.h
-len.o: $(hdrdir)/ruby/backward/2/stdarg.h
-len.o: $(hdrdir)/ruby/defines.h
-len.o: $(hdrdir)/ruby/intern.h
len.o: $(hdrdir)/ruby/missing.h
len.o: $(hdrdir)/ruby/ruby.h
len.o: $(hdrdir)/ruby/st.h
@@ -482,6 +479,18 @@ len.o: len.c
member.o: $(RUBY_EXTCONF_H)
member.o: $(arch_hdrdir)/ruby/config.h
member.o: $(hdrdir)/ruby.h
+member.o: $(hdrdir)/ruby/assert.h
+member.o: $(hdrdir)/ruby/backward.h
+member.o: $(hdrdir)/ruby/backward/2/assume.h
+member.o: $(hdrdir)/ruby/backward/2/attributes.h
+member.o: $(hdrdir)/ruby/backward/2/bool.h
+member.o: $(hdrdir)/ruby/backward/2/inttypes.h
+member.o: $(hdrdir)/ruby/backward/2/limits.h
+member.o: $(hdrdir)/ruby/backward/2/long_long.h
+member.o: $(hdrdir)/ruby/backward/2/stdalign.h
+member.o: $(hdrdir)/ruby/backward/2/stdarg.h
+member.o: $(hdrdir)/ruby/defines.h
+member.o: $(hdrdir)/ruby/intern.h
member.o: $(hdrdir)/ruby/internal/anyargs.h
member.o: $(hdrdir)/ruby/internal/arithmetic.h
member.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -621,19 +630,6 @@ member.o: $(hdrdir)/ruby/internal/value_type.h
member.o: $(hdrdir)/ruby/internal/variable.h
member.o: $(hdrdir)/ruby/internal/warning_push.h
member.o: $(hdrdir)/ruby/internal/xmalloc.h
-member.o: $(hdrdir)/ruby/assert.h
-member.o: $(hdrdir)/ruby/backward.h
-member.o: $(hdrdir)/ruby/backward/2/assume.h
-member.o: $(hdrdir)/ruby/backward/2/attributes.h
-member.o: $(hdrdir)/ruby/backward/2/bool.h
-member.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-member.o: $(hdrdir)/ruby/backward/2/inttypes.h
-member.o: $(hdrdir)/ruby/backward/2/limits.h
-member.o: $(hdrdir)/ruby/backward/2/long_long.h
-member.o: $(hdrdir)/ruby/backward/2/stdalign.h
-member.o: $(hdrdir)/ruby/backward/2/stdarg.h
-member.o: $(hdrdir)/ruby/defines.h
-member.o: $(hdrdir)/ruby/intern.h
member.o: $(hdrdir)/ruby/missing.h
member.o: $(hdrdir)/ruby/ruby.h
member.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/symbol/depend b/ext/-test-/symbol/depend
index 9b75e866da3ebc..f462855b409c3a 100644
--- a/ext/-test-/symbol/depend
+++ b/ext/-test-/symbol/depend
@@ -2,6 +2,18 @@
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,18 @@ init.o: init.c
type.o: $(RUBY_EXTCONF_H)
type.o: $(arch_hdrdir)/ruby/config.h
type.o: $(hdrdir)/ruby.h
+type.o: $(hdrdir)/ruby/assert.h
+type.o: $(hdrdir)/ruby/backward.h
+type.o: $(hdrdir)/ruby/backward/2/assume.h
+type.o: $(hdrdir)/ruby/backward/2/attributes.h
+type.o: $(hdrdir)/ruby/backward/2/bool.h
+type.o: $(hdrdir)/ruby/backward/2/inttypes.h
+type.o: $(hdrdir)/ruby/backward/2/limits.h
+type.o: $(hdrdir)/ruby/backward/2/long_long.h
+type.o: $(hdrdir)/ruby/backward/2/stdalign.h
+type.o: $(hdrdir)/ruby/backward/2/stdarg.h
+type.o: $(hdrdir)/ruby/defines.h
+type.o: $(hdrdir)/ruby/intern.h
type.o: $(hdrdir)/ruby/internal/anyargs.h
type.o: $(hdrdir)/ruby/internal/arithmetic.h
type.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +312,6 @@ type.o: $(hdrdir)/ruby/internal/value_type.h
type.o: $(hdrdir)/ruby/internal/variable.h
type.o: $(hdrdir)/ruby/internal/warning_push.h
type.o: $(hdrdir)/ruby/internal/xmalloc.h
-type.o: $(hdrdir)/ruby/assert.h
-type.o: $(hdrdir)/ruby/backward.h
-type.o: $(hdrdir)/ruby/backward/2/assume.h
-type.o: $(hdrdir)/ruby/backward/2/attributes.h
-type.o: $(hdrdir)/ruby/backward/2/bool.h
-type.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-type.o: $(hdrdir)/ruby/backward/2/inttypes.h
-type.o: $(hdrdir)/ruby/backward/2/limits.h
-type.o: $(hdrdir)/ruby/backward/2/long_long.h
-type.o: $(hdrdir)/ruby/backward/2/stdalign.h
-type.o: $(hdrdir)/ruby/backward/2/stdarg.h
-type.o: $(hdrdir)/ruby/defines.h
-type.o: $(hdrdir)/ruby/intern.h
type.o: $(hdrdir)/ruby/missing.h
type.o: $(hdrdir)/ruby/ruby.h
type.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/thread_fd/depend b/ext/-test-/thread_fd/depend
index ad6f66f3123519..0c8c31eac7358a 100644
--- a/ext/-test-/thread_fd/depend
+++ b/ext/-test-/thread_fd/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
thread_fd.o: $(RUBY_EXTCONF_H)
thread_fd.o: $(arch_hdrdir)/ruby/config.h
+thread_fd.o: $(hdrdir)/ruby/assert.h
+thread_fd.o: $(hdrdir)/ruby/backward.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/assume.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/attributes.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/bool.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/inttypes.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/limits.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/long_long.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/stdalign.h
+thread_fd.o: $(hdrdir)/ruby/backward/2/stdarg.h
+thread_fd.o: $(hdrdir)/ruby/defines.h
+thread_fd.o: $(hdrdir)/ruby/intern.h
thread_fd.o: $(hdrdir)/ruby/internal/anyargs.h
thread_fd.o: $(hdrdir)/ruby/internal/arithmetic.h
thread_fd.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ thread_fd.o: $(hdrdir)/ruby/internal/value_type.h
thread_fd.o: $(hdrdir)/ruby/internal/variable.h
thread_fd.o: $(hdrdir)/ruby/internal/warning_push.h
thread_fd.o: $(hdrdir)/ruby/internal/xmalloc.h
-thread_fd.o: $(hdrdir)/ruby/assert.h
-thread_fd.o: $(hdrdir)/ruby/backward.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/assume.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/attributes.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/bool.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/inttypes.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/limits.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/long_long.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/stdalign.h
-thread_fd.o: $(hdrdir)/ruby/backward/2/stdarg.h
-thread_fd.o: $(hdrdir)/ruby/defines.h
-thread_fd.o: $(hdrdir)/ruby/intern.h
thread_fd.o: $(hdrdir)/ruby/missing.h
thread_fd.o: $(hdrdir)/ruby/ruby.h
thread_fd.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/time/depend b/ext/-test-/time/depend
index 48b41dd678cf53..557f65af6bc16c 100644
--- a/ext/-test-/time/depend
+++ b/ext/-test-/time/depend
@@ -2,6 +2,18 @@
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
init.o: $(hdrdir)/ruby.h
+init.o: $(hdrdir)/ruby/assert.h
+init.o: $(hdrdir)/ruby/backward.h
+init.o: $(hdrdir)/ruby/backward/2/assume.h
+init.o: $(hdrdir)/ruby/backward/2/attributes.h
+init.o: $(hdrdir)/ruby/backward/2/bool.h
+init.o: $(hdrdir)/ruby/backward/2/inttypes.h
+init.o: $(hdrdir)/ruby/backward/2/limits.h
+init.o: $(hdrdir)/ruby/backward/2/long_long.h
+init.o: $(hdrdir)/ruby/backward/2/stdalign.h
+init.o: $(hdrdir)/ruby/backward/2/stdarg.h
+init.o: $(hdrdir)/ruby/defines.h
+init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/internal/anyargs.h
init.o: $(hdrdir)/ruby/internal/arithmetic.h
init.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ init.o: $(hdrdir)/ruby/internal/value_type.h
init.o: $(hdrdir)/ruby/internal/variable.h
init.o: $(hdrdir)/ruby/internal/warning_push.h
init.o: $(hdrdir)/ruby/internal/xmalloc.h
-init.o: $(hdrdir)/ruby/assert.h
-init.o: $(hdrdir)/ruby/backward.h
-init.o: $(hdrdir)/ruby/backward/2/assume.h
-init.o: $(hdrdir)/ruby/backward/2/attributes.h
-init.o: $(hdrdir)/ruby/backward/2/bool.h
-init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-init.o: $(hdrdir)/ruby/backward/2/inttypes.h
-init.o: $(hdrdir)/ruby/backward/2/limits.h
-init.o: $(hdrdir)/ruby/backward/2/long_long.h
-init.o: $(hdrdir)/ruby/backward/2/stdalign.h
-init.o: $(hdrdir)/ruby/backward/2/stdarg.h
-init.o: $(hdrdir)/ruby/defines.h
-init.o: $(hdrdir)/ruby/intern.h
init.o: $(hdrdir)/ruby/missing.h
init.o: $(hdrdir)/ruby/ruby.h
init.o: $(hdrdir)/ruby/st.h
@@ -162,6 +161,19 @@ init.o: init.c
leap_second.o: $(RUBY_EXTCONF_H)
leap_second.o: $(arch_hdrdir)/ruby/config.h
leap_second.o: $(hdrdir)/ruby.h
+leap_second.o: $(hdrdir)/ruby/assert.h
+leap_second.o: $(hdrdir)/ruby/backward.h
+leap_second.o: $(hdrdir)/ruby/backward/2/assume.h
+leap_second.o: $(hdrdir)/ruby/backward/2/attributes.h
+leap_second.o: $(hdrdir)/ruby/backward/2/bool.h
+leap_second.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
+leap_second.o: $(hdrdir)/ruby/backward/2/inttypes.h
+leap_second.o: $(hdrdir)/ruby/backward/2/limits.h
+leap_second.o: $(hdrdir)/ruby/backward/2/long_long.h
+leap_second.o: $(hdrdir)/ruby/backward/2/stdalign.h
+leap_second.o: $(hdrdir)/ruby/backward/2/stdarg.h
+leap_second.o: $(hdrdir)/ruby/defines.h
+leap_second.o: $(hdrdir)/ruby/intern.h
leap_second.o: $(hdrdir)/ruby/internal/anyargs.h
leap_second.o: $(hdrdir)/ruby/internal/arithmetic.h
leap_second.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -301,19 +313,6 @@ leap_second.o: $(hdrdir)/ruby/internal/value_type.h
leap_second.o: $(hdrdir)/ruby/internal/variable.h
leap_second.o: $(hdrdir)/ruby/internal/warning_push.h
leap_second.o: $(hdrdir)/ruby/internal/xmalloc.h
-leap_second.o: $(hdrdir)/ruby/assert.h
-leap_second.o: $(hdrdir)/ruby/backward.h
-leap_second.o: $(hdrdir)/ruby/backward/2/assume.h
-leap_second.o: $(hdrdir)/ruby/backward/2/attributes.h
-leap_second.o: $(hdrdir)/ruby/backward/2/bool.h
-leap_second.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-leap_second.o: $(hdrdir)/ruby/backward/2/inttypes.h
-leap_second.o: $(hdrdir)/ruby/backward/2/limits.h
-leap_second.o: $(hdrdir)/ruby/backward/2/long_long.h
-leap_second.o: $(hdrdir)/ruby/backward/2/stdalign.h
-leap_second.o: $(hdrdir)/ruby/backward/2/stdarg.h
-leap_second.o: $(hdrdir)/ruby/defines.h
-leap_second.o: $(hdrdir)/ruby/intern.h
leap_second.o: $(hdrdir)/ruby/missing.h
leap_second.o: $(hdrdir)/ruby/ruby.h
leap_second.o: $(hdrdir)/ruby/st.h
@@ -326,6 +325,18 @@ leap_second.o: leap_second.c
new.o: $(RUBY_EXTCONF_H)
new.o: $(arch_hdrdir)/ruby/config.h
new.o: $(hdrdir)/ruby.h
+new.o: $(hdrdir)/ruby/assert.h
+new.o: $(hdrdir)/ruby/backward.h
+new.o: $(hdrdir)/ruby/backward/2/assume.h
+new.o: $(hdrdir)/ruby/backward/2/attributes.h
+new.o: $(hdrdir)/ruby/backward/2/bool.h
+new.o: $(hdrdir)/ruby/backward/2/inttypes.h
+new.o: $(hdrdir)/ruby/backward/2/limits.h
+new.o: $(hdrdir)/ruby/backward/2/long_long.h
+new.o: $(hdrdir)/ruby/backward/2/stdalign.h
+new.o: $(hdrdir)/ruby/backward/2/stdarg.h
+new.o: $(hdrdir)/ruby/defines.h
+new.o: $(hdrdir)/ruby/intern.h
new.o: $(hdrdir)/ruby/internal/anyargs.h
new.o: $(hdrdir)/ruby/internal/arithmetic.h
new.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -465,19 +476,6 @@ new.o: $(hdrdir)/ruby/internal/value_type.h
new.o: $(hdrdir)/ruby/internal/variable.h
new.o: $(hdrdir)/ruby/internal/warning_push.h
new.o: $(hdrdir)/ruby/internal/xmalloc.h
-new.o: $(hdrdir)/ruby/assert.h
-new.o: $(hdrdir)/ruby/backward.h
-new.o: $(hdrdir)/ruby/backward/2/assume.h
-new.o: $(hdrdir)/ruby/backward/2/attributes.h
-new.o: $(hdrdir)/ruby/backward/2/bool.h
-new.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-new.o: $(hdrdir)/ruby/backward/2/inttypes.h
-new.o: $(hdrdir)/ruby/backward/2/limits.h
-new.o: $(hdrdir)/ruby/backward/2/long_long.h
-new.o: $(hdrdir)/ruby/backward/2/stdalign.h
-new.o: $(hdrdir)/ruby/backward/2/stdarg.h
-new.o: $(hdrdir)/ruby/defines.h
-new.o: $(hdrdir)/ruby/intern.h
new.o: $(hdrdir)/ruby/missing.h
new.o: $(hdrdir)/ruby/ruby.h
new.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/tracepoint/depend b/ext/-test-/tracepoint/depend
index dac1bb278e2f17..f05f13d08dd073 100644
--- a/ext/-test-/tracepoint/depend
+++ b/ext/-test-/tracepoint/depend
@@ -1,6 +1,19 @@
# AUTOGENERATED DEPENDENCIES START
gc_hook.o: $(RUBY_EXTCONF_H)
gc_hook.o: $(arch_hdrdir)/ruby/config.h
+gc_hook.o: $(hdrdir)/ruby/assert.h
+gc_hook.o: $(hdrdir)/ruby/backward.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/assume.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/attributes.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/bool.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/inttypes.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/limits.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/long_long.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/stdalign.h
+gc_hook.o: $(hdrdir)/ruby/backward/2/stdarg.h
+gc_hook.o: $(hdrdir)/ruby/debug.h
+gc_hook.o: $(hdrdir)/ruby/defines.h
+gc_hook.o: $(hdrdir)/ruby/intern.h
gc_hook.o: $(hdrdir)/ruby/internal/anyargs.h
gc_hook.o: $(hdrdir)/ruby/internal/arithmetic.h
gc_hook.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,20 +153,6 @@ gc_hook.o: $(hdrdir)/ruby/internal/value_type.h
gc_hook.o: $(hdrdir)/ruby/internal/variable.h
gc_hook.o: $(hdrdir)/ruby/internal/warning_push.h
gc_hook.o: $(hdrdir)/ruby/internal/xmalloc.h
-gc_hook.o: $(hdrdir)/ruby/assert.h
-gc_hook.o: $(hdrdir)/ruby/backward.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/assume.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/attributes.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/bool.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/inttypes.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/limits.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/long_long.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/stdalign.h
-gc_hook.o: $(hdrdir)/ruby/backward/2/stdarg.h
-gc_hook.o: $(hdrdir)/ruby/debug.h
-gc_hook.o: $(hdrdir)/ruby/defines.h
-gc_hook.o: $(hdrdir)/ruby/intern.h
gc_hook.o: $(hdrdir)/ruby/missing.h
gc_hook.o: $(hdrdir)/ruby/ruby.h
gc_hook.o: $(hdrdir)/ruby/st.h
@@ -161,6 +160,19 @@ gc_hook.o: $(hdrdir)/ruby/subst.h
gc_hook.o: gc_hook.c
tracepoint.o: $(RUBY_EXTCONF_H)
tracepoint.o: $(arch_hdrdir)/ruby/config.h
+tracepoint.o: $(hdrdir)/ruby/assert.h
+tracepoint.o: $(hdrdir)/ruby/backward.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/assume.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/attributes.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/bool.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/inttypes.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/limits.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/long_long.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/stdalign.h
+tracepoint.o: $(hdrdir)/ruby/backward/2/stdarg.h
+tracepoint.o: $(hdrdir)/ruby/debug.h
+tracepoint.o: $(hdrdir)/ruby/defines.h
+tracepoint.o: $(hdrdir)/ruby/intern.h
tracepoint.o: $(hdrdir)/ruby/internal/anyargs.h
tracepoint.o: $(hdrdir)/ruby/internal/arithmetic.h
tracepoint.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -300,20 +312,6 @@ tracepoint.o: $(hdrdir)/ruby/internal/value_type.h
tracepoint.o: $(hdrdir)/ruby/internal/variable.h
tracepoint.o: $(hdrdir)/ruby/internal/warning_push.h
tracepoint.o: $(hdrdir)/ruby/internal/xmalloc.h
-tracepoint.o: $(hdrdir)/ruby/assert.h
-tracepoint.o: $(hdrdir)/ruby/backward.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/assume.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/attributes.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/bool.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/inttypes.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/limits.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/long_long.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/stdalign.h
-tracepoint.o: $(hdrdir)/ruby/backward/2/stdarg.h
-tracepoint.o: $(hdrdir)/ruby/debug.h
-tracepoint.o: $(hdrdir)/ruby/defines.h
-tracepoint.o: $(hdrdir)/ruby/intern.h
tracepoint.o: $(hdrdir)/ruby/missing.h
tracepoint.o: $(hdrdir)/ruby/ruby.h
tracepoint.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/typeddata/depend b/ext/-test-/typeddata/depend
index 6204fb05241d22..9eb0666c70c6fa 100644
--- a/ext/-test-/typeddata/depend
+++ b/ext/-test-/typeddata/depend
@@ -2,6 +2,18 @@
typeddata.o: $(RUBY_EXTCONF_H)
typeddata.o: $(arch_hdrdir)/ruby/config.h
typeddata.o: $(hdrdir)/ruby.h
+typeddata.o: $(hdrdir)/ruby/assert.h
+typeddata.o: $(hdrdir)/ruby/backward.h
+typeddata.o: $(hdrdir)/ruby/backward/2/assume.h
+typeddata.o: $(hdrdir)/ruby/backward/2/attributes.h
+typeddata.o: $(hdrdir)/ruby/backward/2/bool.h
+typeddata.o: $(hdrdir)/ruby/backward/2/inttypes.h
+typeddata.o: $(hdrdir)/ruby/backward/2/limits.h
+typeddata.o: $(hdrdir)/ruby/backward/2/long_long.h
+typeddata.o: $(hdrdir)/ruby/backward/2/stdalign.h
+typeddata.o: $(hdrdir)/ruby/backward/2/stdarg.h
+typeddata.o: $(hdrdir)/ruby/defines.h
+typeddata.o: $(hdrdir)/ruby/intern.h
typeddata.o: $(hdrdir)/ruby/internal/anyargs.h
typeddata.o: $(hdrdir)/ruby/internal/arithmetic.h
typeddata.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ typeddata.o: $(hdrdir)/ruby/internal/value_type.h
typeddata.o: $(hdrdir)/ruby/internal/variable.h
typeddata.o: $(hdrdir)/ruby/internal/warning_push.h
typeddata.o: $(hdrdir)/ruby/internal/xmalloc.h
-typeddata.o: $(hdrdir)/ruby/assert.h
-typeddata.o: $(hdrdir)/ruby/backward.h
-typeddata.o: $(hdrdir)/ruby/backward/2/assume.h
-typeddata.o: $(hdrdir)/ruby/backward/2/attributes.h
-typeddata.o: $(hdrdir)/ruby/backward/2/bool.h
-typeddata.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-typeddata.o: $(hdrdir)/ruby/backward/2/inttypes.h
-typeddata.o: $(hdrdir)/ruby/backward/2/limits.h
-typeddata.o: $(hdrdir)/ruby/backward/2/long_long.h
-typeddata.o: $(hdrdir)/ruby/backward/2/stdalign.h
-typeddata.o: $(hdrdir)/ruby/backward/2/stdarg.h
-typeddata.o: $(hdrdir)/ruby/defines.h
-typeddata.o: $(hdrdir)/ruby/intern.h
typeddata.o: $(hdrdir)/ruby/missing.h
typeddata.o: $(hdrdir)/ruby/ruby.h
typeddata.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/vm/depend b/ext/-test-/vm/depend
index 6669e52d4c6353..a01669802d5a4e 100644
--- a/ext/-test-/vm/depend
+++ b/ext/-test-/vm/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
at_exit.o: $(RUBY_EXTCONF_H)
at_exit.o: $(arch_hdrdir)/ruby/config.h
+at_exit.o: $(hdrdir)/ruby/assert.h
+at_exit.o: $(hdrdir)/ruby/backward.h
+at_exit.o: $(hdrdir)/ruby/backward/2/assume.h
+at_exit.o: $(hdrdir)/ruby/backward/2/attributes.h
+at_exit.o: $(hdrdir)/ruby/backward/2/bool.h
+at_exit.o: $(hdrdir)/ruby/backward/2/inttypes.h
+at_exit.o: $(hdrdir)/ruby/backward/2/limits.h
+at_exit.o: $(hdrdir)/ruby/backward/2/long_long.h
+at_exit.o: $(hdrdir)/ruby/backward/2/stdalign.h
+at_exit.o: $(hdrdir)/ruby/backward/2/stdarg.h
+at_exit.o: $(hdrdir)/ruby/defines.h
+at_exit.o: $(hdrdir)/ruby/intern.h
at_exit.o: $(hdrdir)/ruby/internal/anyargs.h
at_exit.o: $(hdrdir)/ruby/internal/arithmetic.h
at_exit.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ at_exit.o: $(hdrdir)/ruby/internal/value_type.h
at_exit.o: $(hdrdir)/ruby/internal/variable.h
at_exit.o: $(hdrdir)/ruby/internal/warning_push.h
at_exit.o: $(hdrdir)/ruby/internal/xmalloc.h
-at_exit.o: $(hdrdir)/ruby/assert.h
-at_exit.o: $(hdrdir)/ruby/backward.h
-at_exit.o: $(hdrdir)/ruby/backward/2/assume.h
-at_exit.o: $(hdrdir)/ruby/backward/2/attributes.h
-at_exit.o: $(hdrdir)/ruby/backward/2/bool.h
-at_exit.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-at_exit.o: $(hdrdir)/ruby/backward/2/inttypes.h
-at_exit.o: $(hdrdir)/ruby/backward/2/limits.h
-at_exit.o: $(hdrdir)/ruby/backward/2/long_long.h
-at_exit.o: $(hdrdir)/ruby/backward/2/stdalign.h
-at_exit.o: $(hdrdir)/ruby/backward/2/stdarg.h
-at_exit.o: $(hdrdir)/ruby/defines.h
-at_exit.o: $(hdrdir)/ruby/intern.h
at_exit.o: $(hdrdir)/ruby/missing.h
at_exit.o: $(hdrdir)/ruby/ruby.h
at_exit.o: $(hdrdir)/ruby/st.h
diff --git a/ext/-test-/wait/depend b/ext/-test-/wait/depend
index f2999f3c51d7ec..b5cdd128366d4a 100644
--- a/ext/-test-/wait/depend
+++ b/ext/-test-/wait/depend
@@ -6,7 +6,6 @@ wait.o: $(hdrdir)/ruby/backward.h
wait.o: $(hdrdir)/ruby/backward/2/assume.h
wait.o: $(hdrdir)/ruby/backward/2/attributes.h
wait.o: $(hdrdir)/ruby/backward/2/bool.h
-wait.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
wait.o: $(hdrdir)/ruby/backward/2/inttypes.h
wait.o: $(hdrdir)/ruby/backward/2/limits.h
wait.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -171,167 +170,4 @@ wait.o: $(hdrdir)/ruby/ruby.h
wait.o: $(hdrdir)/ruby/st.h
wait.o: $(hdrdir)/ruby/subst.h
wait.o: wait.c
-wait_for_single_fd.o: $(RUBY_EXTCONF_H)
-wait_for_single_fd.o: $(arch_hdrdir)/ruby/config.h
-wait_for_single_fd.o: $(hdrdir)/ruby/assert.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/assume.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/attributes.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/bool.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/inttypes.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/limits.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/long_long.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/stdalign.h
-wait_for_single_fd.o: $(hdrdir)/ruby/backward/2/stdarg.h
-wait_for_single_fd.o: $(hdrdir)/ruby/defines.h
-wait_for_single_fd.o: $(hdrdir)/ruby/encoding.h
-wait_for_single_fd.o: $(hdrdir)/ruby/intern.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/anyargs.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/char.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/double.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/fixnum.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/gid_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/int.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/intptr_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/long.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/long_long.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/mode_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/off_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/pid_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/short.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/size_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/st_data_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/arithmetic/uid_t.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/assume.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/alloc_size.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/artificial.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/cold.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/const.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/constexpr.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/deprecated.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/diagnose_if.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/enum_extensibility.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/error.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/flag_enum.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/forceinline.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/format.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/maybe_unused.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/noalias.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/nodiscard.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/noexcept.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/noinline.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/nonnull.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/noreturn.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/pure.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/restrict.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/returns_nonnull.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/warning.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/attr/weakref.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/cast.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_is.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_is/apple.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_is/clang.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_is/gcc.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_is/intel.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_is/msvc.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_is/sunpro.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/compiler_since.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/config.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/constant_p.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rarray.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rbasic.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rbignum.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rclass.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rdata.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rfile.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rhash.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/robject.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rregexp.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rstring.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rstruct.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/core/rtypeddata.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/ctype.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/dllexport.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/dosish.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/error.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/eval.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/event.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/fl_type.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/gc.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/glob.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/globals.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/attribute.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/builtin.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/c_attribute.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/cpp_attribute.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/declspec_attribute.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/extension.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/feature.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/has/warning.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/array.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/bignum.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/class.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/compar.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/complex.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/cont.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/dir.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/enum.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/enumerator.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/error.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/eval.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/file.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/gc.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/hash.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/io.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/load.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/marshal.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/numeric.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/object.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/parse.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/proc.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/process.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/random.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/range.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/rational.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/re.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/ruby.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/select.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/select/largesize.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/signal.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/sprintf.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/string.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/struct.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/thread.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/time.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/variable.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/intern/vm.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/interpreter.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/iterator.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/memory.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/method.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/module.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/newobj.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/rgengc.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/scan_args.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/special_consts.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/static_assert.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/stdalign.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/stdbool.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/symbol.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/value.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/value_type.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/variable.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/warning_push.h
-wait_for_single_fd.o: $(hdrdir)/ruby/internal/xmalloc.h
-wait_for_single_fd.o: $(hdrdir)/ruby/io.h
-wait_for_single_fd.o: $(hdrdir)/ruby/missing.h
-wait_for_single_fd.o: $(hdrdir)/ruby/onigmo.h
-wait_for_single_fd.o: $(hdrdir)/ruby/oniguruma.h
-wait_for_single_fd.o: $(hdrdir)/ruby/ruby.h
-wait_for_single_fd.o: $(hdrdir)/ruby/st.h
-wait_for_single_fd.o: $(hdrdir)/ruby/subst.h
-wait_for_single_fd.o: wait_for_single_fd.c
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/bigdecimal/depend b/ext/bigdecimal/depend
index d54de7c3c71a1e..d6f40714b31127 100644
--- a/ext/bigdecimal/depend
+++ b/ext/bigdecimal/depend
@@ -8,7 +8,6 @@ bigdecimal.o: $(hdrdir)/ruby/assert.h
bigdecimal.o: $(hdrdir)/ruby/backward/2/assume.h
bigdecimal.o: $(hdrdir)/ruby/backward/2/attributes.h
bigdecimal.o: $(hdrdir)/ruby/backward/2/bool.h
-bigdecimal.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
bigdecimal.o: $(hdrdir)/ruby/backward/2/inttypes.h
bigdecimal.o: $(hdrdir)/ruby/backward/2/limits.h
bigdecimal.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -174,7 +173,6 @@ missing.o: $(hdrdir)/ruby/backward.h
missing.o: $(hdrdir)/ruby/backward/2/assume.h
missing.o: $(hdrdir)/ruby/backward/2/attributes.h
missing.o: $(hdrdir)/ruby/backward/2/bool.h
-missing.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
missing.o: $(hdrdir)/ruby/backward/2/inttypes.h
missing.o: $(hdrdir)/ruby/backward/2/limits.h
missing.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/cgi/escape/depend b/ext/cgi/escape/depend
index a965ccfca7ac9d..e726e579d888dd 100644
--- a/ext/cgi/escape/depend
+++ b/ext/cgi/escape/depend
@@ -7,7 +7,6 @@ escape.o: $(hdrdir)/ruby/backward.h
escape.o: $(hdrdir)/ruby/backward/2/assume.h
escape.o: $(hdrdir)/ruby/backward/2/attributes.h
escape.o: $(hdrdir)/ruby/backward/2/bool.h
-escape.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
escape.o: $(hdrdir)/ruby/backward/2/inttypes.h
escape.o: $(hdrdir)/ruby/backward/2/limits.h
escape.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/cgi/escape/escape.c b/ext/cgi/escape/escape.c
index 3a7837e4df963c..809f95ef4ccabe 100644
--- a/ext/cgi/escape/escape.c
+++ b/ext/cgi/escape/escape.c
@@ -36,7 +36,8 @@ static VALUE
optimized_escape_html(VALUE str)
{
VALUE vbuf;
- char *buf = ALLOCV_N(char, vbuf, RSTRING_LEN(str) * HTML_ESCAPE_MAX_LEN);
+ typedef char escape_buf[HTML_ESCAPE_MAX_LEN];
+ char *buf = *ALLOCV_N(escape_buf, vbuf, RSTRING_LEN(str));
const char *cstr = RSTRING_PTR(str);
const char *end = cstr + RSTRING_LEN(str);
diff --git a/ext/continuation/depend b/ext/continuation/depend
index c8e55b0b1c6883..14ecac144361df 100644
--- a/ext/continuation/depend
+++ b/ext/continuation/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
continuation.o: $(RUBY_EXTCONF_H)
continuation.o: $(arch_hdrdir)/ruby/config.h
+continuation.o: $(hdrdir)/ruby/assert.h
+continuation.o: $(hdrdir)/ruby/backward.h
+continuation.o: $(hdrdir)/ruby/backward/2/assume.h
+continuation.o: $(hdrdir)/ruby/backward/2/attributes.h
+continuation.o: $(hdrdir)/ruby/backward/2/bool.h
+continuation.o: $(hdrdir)/ruby/backward/2/inttypes.h
+continuation.o: $(hdrdir)/ruby/backward/2/limits.h
+continuation.o: $(hdrdir)/ruby/backward/2/long_long.h
+continuation.o: $(hdrdir)/ruby/backward/2/stdalign.h
+continuation.o: $(hdrdir)/ruby/backward/2/stdarg.h
+continuation.o: $(hdrdir)/ruby/defines.h
+continuation.o: $(hdrdir)/ruby/intern.h
continuation.o: $(hdrdir)/ruby/internal/anyargs.h
continuation.o: $(hdrdir)/ruby/internal/arithmetic.h
continuation.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ continuation.o: $(hdrdir)/ruby/internal/value_type.h
continuation.o: $(hdrdir)/ruby/internal/variable.h
continuation.o: $(hdrdir)/ruby/internal/warning_push.h
continuation.o: $(hdrdir)/ruby/internal/xmalloc.h
-continuation.o: $(hdrdir)/ruby/assert.h
-continuation.o: $(hdrdir)/ruby/backward.h
-continuation.o: $(hdrdir)/ruby/backward/2/assume.h
-continuation.o: $(hdrdir)/ruby/backward/2/attributes.h
-continuation.o: $(hdrdir)/ruby/backward/2/bool.h
-continuation.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-continuation.o: $(hdrdir)/ruby/backward/2/inttypes.h
-continuation.o: $(hdrdir)/ruby/backward/2/limits.h
-continuation.o: $(hdrdir)/ruby/backward/2/long_long.h
-continuation.o: $(hdrdir)/ruby/backward/2/stdalign.h
-continuation.o: $(hdrdir)/ruby/backward/2/stdarg.h
-continuation.o: $(hdrdir)/ruby/defines.h
-continuation.o: $(hdrdir)/ruby/intern.h
continuation.o: $(hdrdir)/ruby/missing.h
continuation.o: $(hdrdir)/ruby/ruby.h
continuation.o: $(hdrdir)/ruby/st.h
diff --git a/ext/date/depend b/ext/date/depend
index 9c893745b95506..6841df724d4ebd 100644
--- a/ext/date/depend
+++ b/ext/date/depend
@@ -7,7 +7,6 @@ date_core.o: $(hdrdir)/ruby/backward.h
date_core.o: $(hdrdir)/ruby/backward/2/assume.h
date_core.o: $(hdrdir)/ruby/backward/2/attributes.h
date_core.o: $(hdrdir)/ruby/backward/2/bool.h
-date_core.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
date_core.o: $(hdrdir)/ruby/backward/2/inttypes.h
date_core.o: $(hdrdir)/ruby/backward/2/limits.h
date_core.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -181,7 +180,6 @@ date_parse.o: $(hdrdir)/ruby/backward.h
date_parse.o: $(hdrdir)/ruby/backward/2/assume.h
date_parse.o: $(hdrdir)/ruby/backward/2/attributes.h
date_parse.o: $(hdrdir)/ruby/backward/2/bool.h
-date_parse.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
date_parse.o: $(hdrdir)/ruby/backward/2/inttypes.h
date_parse.o: $(hdrdir)/ruby/backward/2/limits.h
date_parse.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -357,7 +355,6 @@ date_strftime.o: $(hdrdir)/ruby/backward.h
date_strftime.o: $(hdrdir)/ruby/backward/2/assume.h
date_strftime.o: $(hdrdir)/ruby/backward/2/attributes.h
date_strftime.o: $(hdrdir)/ruby/backward/2/bool.h
-date_strftime.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
date_strftime.o: $(hdrdir)/ruby/backward/2/inttypes.h
date_strftime.o: $(hdrdir)/ruby/backward/2/limits.h
date_strftime.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -518,7 +515,6 @@ date_strptime.o: $(hdrdir)/ruby/backward.h
date_strptime.o: $(hdrdir)/ruby/backward/2/assume.h
date_strptime.o: $(hdrdir)/ruby/backward/2/attributes.h
date_strptime.o: $(hdrdir)/ruby/backward/2/bool.h
-date_strptime.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
date_strptime.o: $(hdrdir)/ruby/backward/2/inttypes.h
date_strptime.o: $(hdrdir)/ruby/backward/2/limits.h
date_strptime.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/digest/bubblebabble/depend b/ext/digest/bubblebabble/depend
index b995438236b0e5..28d4f472a97e52 100644
--- a/ext/digest/bubblebabble/depend
+++ b/ext/digest/bubblebabble/depend
@@ -2,6 +2,18 @@
bubblebabble.o: $(RUBY_EXTCONF_H)
bubblebabble.o: $(arch_hdrdir)/ruby/config.h
bubblebabble.o: $(hdrdir)/ruby.h
+bubblebabble.o: $(hdrdir)/ruby/assert.h
+bubblebabble.o: $(hdrdir)/ruby/backward.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/assume.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/attributes.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/bool.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/inttypes.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/limits.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/long_long.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/stdalign.h
+bubblebabble.o: $(hdrdir)/ruby/backward/2/stdarg.h
+bubblebabble.o: $(hdrdir)/ruby/defines.h
+bubblebabble.o: $(hdrdir)/ruby/intern.h
bubblebabble.o: $(hdrdir)/ruby/internal/anyargs.h
bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic.h
bubblebabble.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ bubblebabble.o: $(hdrdir)/ruby/internal/value_type.h
bubblebabble.o: $(hdrdir)/ruby/internal/variable.h
bubblebabble.o: $(hdrdir)/ruby/internal/warning_push.h
bubblebabble.o: $(hdrdir)/ruby/internal/xmalloc.h
-bubblebabble.o: $(hdrdir)/ruby/assert.h
-bubblebabble.o: $(hdrdir)/ruby/backward.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/assume.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/attributes.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/bool.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/inttypes.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/limits.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/long_long.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/stdalign.h
-bubblebabble.o: $(hdrdir)/ruby/backward/2/stdarg.h
-bubblebabble.o: $(hdrdir)/ruby/defines.h
-bubblebabble.o: $(hdrdir)/ruby/intern.h
bubblebabble.o: $(hdrdir)/ruby/missing.h
bubblebabble.o: $(hdrdir)/ruby/ruby.h
bubblebabble.o: $(hdrdir)/ruby/st.h
diff --git a/ext/digest/depend b/ext/digest/depend
index 856f9caa681665..041ba8be51895e 100644
--- a/ext/digest/depend
+++ b/ext/digest/depend
@@ -2,6 +2,18 @@
digest.o: $(RUBY_EXTCONF_H)
digest.o: $(arch_hdrdir)/ruby/config.h
digest.o: $(hdrdir)/ruby.h
+digest.o: $(hdrdir)/ruby/assert.h
+digest.o: $(hdrdir)/ruby/backward.h
+digest.o: $(hdrdir)/ruby/backward/2/assume.h
+digest.o: $(hdrdir)/ruby/backward/2/attributes.h
+digest.o: $(hdrdir)/ruby/backward/2/bool.h
+digest.o: $(hdrdir)/ruby/backward/2/inttypes.h
+digest.o: $(hdrdir)/ruby/backward/2/limits.h
+digest.o: $(hdrdir)/ruby/backward/2/long_long.h
+digest.o: $(hdrdir)/ruby/backward/2/stdalign.h
+digest.o: $(hdrdir)/ruby/backward/2/stdarg.h
+digest.o: $(hdrdir)/ruby/defines.h
+digest.o: $(hdrdir)/ruby/intern.h
digest.o: $(hdrdir)/ruby/internal/anyargs.h
digest.o: $(hdrdir)/ruby/internal/arithmetic.h
digest.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ digest.o: $(hdrdir)/ruby/internal/value_type.h
digest.o: $(hdrdir)/ruby/internal/variable.h
digest.o: $(hdrdir)/ruby/internal/warning_push.h
digest.o: $(hdrdir)/ruby/internal/xmalloc.h
-digest.o: $(hdrdir)/ruby/assert.h
-digest.o: $(hdrdir)/ruby/backward.h
-digest.o: $(hdrdir)/ruby/backward/2/assume.h
-digest.o: $(hdrdir)/ruby/backward/2/attributes.h
-digest.o: $(hdrdir)/ruby/backward/2/bool.h
-digest.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-digest.o: $(hdrdir)/ruby/backward/2/inttypes.h
-digest.o: $(hdrdir)/ruby/backward/2/limits.h
-digest.o: $(hdrdir)/ruby/backward/2/long_long.h
-digest.o: $(hdrdir)/ruby/backward/2/stdalign.h
-digest.o: $(hdrdir)/ruby/backward/2/stdarg.h
-digest.o: $(hdrdir)/ruby/defines.h
-digest.o: $(hdrdir)/ruby/intern.h
digest.o: $(hdrdir)/ruby/missing.h
digest.o: $(hdrdir)/ruby/ruby.h
digest.o: $(hdrdir)/ruby/st.h
diff --git a/ext/digest/md5/depend b/ext/digest/md5/depend
index 258ec88e54d597..2e07652cc52628 100644
--- a/ext/digest/md5/depend
+++ b/ext/digest/md5/depend
@@ -10,7 +10,6 @@ md5.o: $(hdrdir)/ruby/backward.h
md5.o: $(hdrdir)/ruby/backward/2/assume.h
md5.o: $(hdrdir)/ruby/backward/2/attributes.h
md5.o: $(hdrdir)/ruby/backward/2/bool.h
-md5.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
md5.o: $(hdrdir)/ruby/backward/2/inttypes.h
md5.o: $(hdrdir)/ruby/backward/2/limits.h
md5.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -172,7 +171,6 @@ md5init.o: $(hdrdir)/ruby/backward.h
md5init.o: $(hdrdir)/ruby/backward/2/assume.h
md5init.o: $(hdrdir)/ruby/backward/2/attributes.h
md5init.o: $(hdrdir)/ruby/backward/2/bool.h
-md5init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
md5init.o: $(hdrdir)/ruby/backward/2/inttypes.h
md5init.o: $(hdrdir)/ruby/backward/2/limits.h
md5init.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/digest/rmd160/depend b/ext/digest/rmd160/depend
index 8a7f555754487b..fe3652a2f624f7 100644
--- a/ext/digest/rmd160/depend
+++ b/ext/digest/rmd160/depend
@@ -10,7 +10,6 @@ rmd160.o: $(hdrdir)/ruby/backward.h
rmd160.o: $(hdrdir)/ruby/backward/2/assume.h
rmd160.o: $(hdrdir)/ruby/backward/2/attributes.h
rmd160.o: $(hdrdir)/ruby/backward/2/bool.h
-rmd160.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
rmd160.o: $(hdrdir)/ruby/backward/2/inttypes.h
rmd160.o: $(hdrdir)/ruby/backward/2/limits.h
rmd160.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -172,7 +171,6 @@ rmd160init.o: $(hdrdir)/ruby/backward.h
rmd160init.o: $(hdrdir)/ruby/backward/2/assume.h
rmd160init.o: $(hdrdir)/ruby/backward/2/attributes.h
rmd160init.o: $(hdrdir)/ruby/backward/2/bool.h
-rmd160init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
rmd160init.o: $(hdrdir)/ruby/backward/2/inttypes.h
rmd160init.o: $(hdrdir)/ruby/backward/2/limits.h
rmd160init.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/digest/sha1/depend b/ext/digest/sha1/depend
index 055e1fbaa082af..2b73455c035238 100644
--- a/ext/digest/sha1/depend
+++ b/ext/digest/sha1/depend
@@ -10,7 +10,6 @@ sha1.o: $(hdrdir)/ruby/backward.h
sha1.o: $(hdrdir)/ruby/backward/2/assume.h
sha1.o: $(hdrdir)/ruby/backward/2/attributes.h
sha1.o: $(hdrdir)/ruby/backward/2/bool.h
-sha1.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
sha1.o: $(hdrdir)/ruby/backward/2/inttypes.h
sha1.o: $(hdrdir)/ruby/backward/2/limits.h
sha1.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -172,7 +171,6 @@ sha1init.o: $(hdrdir)/ruby/backward.h
sha1init.o: $(hdrdir)/ruby/backward/2/assume.h
sha1init.o: $(hdrdir)/ruby/backward/2/attributes.h
sha1init.o: $(hdrdir)/ruby/backward/2/bool.h
-sha1init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
sha1init.o: $(hdrdir)/ruby/backward/2/inttypes.h
sha1init.o: $(hdrdir)/ruby/backward/2/limits.h
sha1init.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/digest/sha2/depend b/ext/digest/sha2/depend
index c3399e76f56569..b3e52c644edffe 100644
--- a/ext/digest/sha2/depend
+++ b/ext/digest/sha2/depend
@@ -10,7 +10,6 @@ sha2.o: $(hdrdir)/ruby/backward.h
sha2.o: $(hdrdir)/ruby/backward/2/assume.h
sha2.o: $(hdrdir)/ruby/backward/2/attributes.h
sha2.o: $(hdrdir)/ruby/backward/2/bool.h
-sha2.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
sha2.o: $(hdrdir)/ruby/backward/2/inttypes.h
sha2.o: $(hdrdir)/ruby/backward/2/limits.h
sha2.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -172,7 +171,6 @@ sha2init.o: $(hdrdir)/ruby/backward.h
sha2init.o: $(hdrdir)/ruby/backward/2/assume.h
sha2init.o: $(hdrdir)/ruby/backward/2/attributes.h
sha2init.o: $(hdrdir)/ruby/backward/2/bool.h
-sha2init.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
sha2init.o: $(hdrdir)/ruby/backward/2/inttypes.h
sha2init.o: $(hdrdir)/ruby/backward/2/limits.h
sha2init.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/etc/depend b/ext/etc/depend
index 2ecd521ef994c3..9c2de2ba964151 100644
--- a/ext/etc/depend
+++ b/ext/etc/depend
@@ -12,7 +12,6 @@ etc.o: $(hdrdir)/ruby/backward.h
etc.o: $(hdrdir)/ruby/backward/2/assume.h
etc.o: $(hdrdir)/ruby/backward/2/attributes.h
etc.o: $(hdrdir)/ruby/backward/2/bool.h
-etc.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
etc.o: $(hdrdir)/ruby/backward/2/inttypes.h
etc.o: $(hdrdir)/ruby/backward/2/limits.h
etc.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/fcntl/depend b/ext/fcntl/depend
index 720b67d9bf939f..46a9e781722cfc 100644
--- a/ext/fcntl/depend
+++ b/ext/fcntl/depend
@@ -2,6 +2,18 @@
fcntl.o: $(RUBY_EXTCONF_H)
fcntl.o: $(arch_hdrdir)/ruby/config.h
fcntl.o: $(hdrdir)/ruby.h
+fcntl.o: $(hdrdir)/ruby/assert.h
+fcntl.o: $(hdrdir)/ruby/backward.h
+fcntl.o: $(hdrdir)/ruby/backward/2/assume.h
+fcntl.o: $(hdrdir)/ruby/backward/2/attributes.h
+fcntl.o: $(hdrdir)/ruby/backward/2/bool.h
+fcntl.o: $(hdrdir)/ruby/backward/2/inttypes.h
+fcntl.o: $(hdrdir)/ruby/backward/2/limits.h
+fcntl.o: $(hdrdir)/ruby/backward/2/long_long.h
+fcntl.o: $(hdrdir)/ruby/backward/2/stdalign.h
+fcntl.o: $(hdrdir)/ruby/backward/2/stdarg.h
+fcntl.o: $(hdrdir)/ruby/defines.h
+fcntl.o: $(hdrdir)/ruby/intern.h
fcntl.o: $(hdrdir)/ruby/internal/anyargs.h
fcntl.o: $(hdrdir)/ruby/internal/arithmetic.h
fcntl.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ fcntl.o: $(hdrdir)/ruby/internal/value_type.h
fcntl.o: $(hdrdir)/ruby/internal/variable.h
fcntl.o: $(hdrdir)/ruby/internal/warning_push.h
fcntl.o: $(hdrdir)/ruby/internal/xmalloc.h
-fcntl.o: $(hdrdir)/ruby/assert.h
-fcntl.o: $(hdrdir)/ruby/backward.h
-fcntl.o: $(hdrdir)/ruby/backward/2/assume.h
-fcntl.o: $(hdrdir)/ruby/backward/2/attributes.h
-fcntl.o: $(hdrdir)/ruby/backward/2/bool.h
-fcntl.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-fcntl.o: $(hdrdir)/ruby/backward/2/inttypes.h
-fcntl.o: $(hdrdir)/ruby/backward/2/limits.h
-fcntl.o: $(hdrdir)/ruby/backward/2/long_long.h
-fcntl.o: $(hdrdir)/ruby/backward/2/stdalign.h
-fcntl.o: $(hdrdir)/ruby/backward/2/stdarg.h
-fcntl.o: $(hdrdir)/ruby/defines.h
-fcntl.o: $(hdrdir)/ruby/intern.h
fcntl.o: $(hdrdir)/ruby/missing.h
fcntl.o: $(hdrdir)/ruby/ruby.h
fcntl.o: $(hdrdir)/ruby/st.h
diff --git a/ext/fiddle/depend b/ext/fiddle/depend
index f16320db363a20..4d33d46d33fb29 100644
--- a/ext/fiddle/depend
+++ b/ext/fiddle/depend
@@ -60,7 +60,6 @@ closure.o: $(hdrdir)/ruby/backward.h
closure.o: $(hdrdir)/ruby/backward/2/assume.h
closure.o: $(hdrdir)/ruby/backward/2/attributes.h
closure.o: $(hdrdir)/ruby/backward/2/bool.h
-closure.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
closure.o: $(hdrdir)/ruby/backward/2/inttypes.h
closure.o: $(hdrdir)/ruby/backward/2/limits.h
closure.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -225,7 +224,6 @@ conversions.o: $(hdrdir)/ruby/backward.h
conversions.o: $(hdrdir)/ruby/backward/2/assume.h
conversions.o: $(hdrdir)/ruby/backward/2/attributes.h
conversions.o: $(hdrdir)/ruby/backward/2/bool.h
-conversions.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
conversions.o: $(hdrdir)/ruby/backward/2/inttypes.h
conversions.o: $(hdrdir)/ruby/backward/2/limits.h
conversions.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -389,7 +387,6 @@ fiddle.o: $(hdrdir)/ruby/backward.h
fiddle.o: $(hdrdir)/ruby/backward/2/assume.h
fiddle.o: $(hdrdir)/ruby/backward/2/attributes.h
fiddle.o: $(hdrdir)/ruby/backward/2/bool.h
-fiddle.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
fiddle.o: $(hdrdir)/ruby/backward/2/inttypes.h
fiddle.o: $(hdrdir)/ruby/backward/2/limits.h
fiddle.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -553,7 +550,6 @@ function.o: $(hdrdir)/ruby/backward.h
function.o: $(hdrdir)/ruby/backward/2/assume.h
function.o: $(hdrdir)/ruby/backward/2/attributes.h
function.o: $(hdrdir)/ruby/backward/2/bool.h
-function.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
function.o: $(hdrdir)/ruby/backward/2/inttypes.h
function.o: $(hdrdir)/ruby/backward/2/limits.h
function.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -718,7 +714,6 @@ handle.o: $(hdrdir)/ruby/backward.h
handle.o: $(hdrdir)/ruby/backward/2/assume.h
handle.o: $(hdrdir)/ruby/backward/2/attributes.h
handle.o: $(hdrdir)/ruby/backward/2/bool.h
-handle.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
handle.o: $(hdrdir)/ruby/backward/2/inttypes.h
handle.o: $(hdrdir)/ruby/backward/2/limits.h
handle.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -882,7 +877,6 @@ memory_view.o: $(hdrdir)/ruby/backward.h
memory_view.o: $(hdrdir)/ruby/backward/2/assume.h
memory_view.o: $(hdrdir)/ruby/backward/2/attributes.h
memory_view.o: $(hdrdir)/ruby/backward/2/bool.h
-memory_view.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
memory_view.o: $(hdrdir)/ruby/backward/2/inttypes.h
memory_view.o: $(hdrdir)/ruby/backward/2/limits.h
memory_view.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1059,7 +1053,6 @@ pinned.o: $(hdrdir)/ruby/backward.h
pinned.o: $(hdrdir)/ruby/backward/2/assume.h
pinned.o: $(hdrdir)/ruby/backward/2/attributes.h
pinned.o: $(hdrdir)/ruby/backward/2/bool.h
-pinned.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
pinned.o: $(hdrdir)/ruby/backward/2/inttypes.h
pinned.o: $(hdrdir)/ruby/backward/2/limits.h
pinned.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -1223,7 +1216,6 @@ pointer.o: $(hdrdir)/ruby/backward.h
pointer.o: $(hdrdir)/ruby/backward/2/assume.h
pointer.o: $(hdrdir)/ruby/backward/2/attributes.h
pointer.o: $(hdrdir)/ruby/backward/2/bool.h
-pointer.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
pointer.o: $(hdrdir)/ruby/backward/2/inttypes.h
pointer.o: $(hdrdir)/ruby/backward/2/limits.h
pointer.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/io/console/depend b/ext/io/console/depend
index b28df55fe78175..e6014dcc59f140 100644
--- a/ext/io/console/depend
+++ b/ext/io/console/depend
@@ -7,7 +7,6 @@ console.o: $(hdrdir)/ruby/backward.h
console.o: $(hdrdir)/ruby/backward/2/assume.h
console.o: $(hdrdir)/ruby/backward/2/attributes.h
console.o: $(hdrdir)/ruby/backward/2/bool.h
-console.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
console.o: $(hdrdir)/ruby/backward/2/inttypes.h
console.o: $(hdrdir)/ruby/backward/2/limits.h
console.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/io/nonblock/depend b/ext/io/nonblock/depend
index 95948937ee0de4..664c262e352155 100644
--- a/ext/io/nonblock/depend
+++ b/ext/io/nonblock/depend
@@ -7,7 +7,6 @@ nonblock.o: $(hdrdir)/ruby/backward.h
nonblock.o: $(hdrdir)/ruby/backward/2/assume.h
nonblock.o: $(hdrdir)/ruby/backward/2/attributes.h
nonblock.o: $(hdrdir)/ruby/backward/2/bool.h
-nonblock.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
nonblock.o: $(hdrdir)/ruby/backward/2/inttypes.h
nonblock.o: $(hdrdir)/ruby/backward/2/limits.h
nonblock.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/io/wait/depend b/ext/io/wait/depend
index 449e9fee520254..0426a6a1ede872 100644
--- a/ext/io/wait/depend
+++ b/ext/io/wait/depend
@@ -8,7 +8,6 @@ wait.o: $(hdrdir)/ruby/backward.h
wait.o: $(hdrdir)/ruby/backward/2/assume.h
wait.o: $(hdrdir)/ruby/backward/2/attributes.h
wait.o: $(hdrdir)/ruby/backward/2/bool.h
-wait.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
wait.o: $(hdrdir)/ruby/backward/2/inttypes.h
wait.o: $(hdrdir)/ruby/backward/2/limits.h
wait.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/json/generator/depend b/ext/json/generator/depend
index 855e876cdbf8bd..1de5fb0b93cc43 100644
--- a/ext/json/generator/depend
+++ b/ext/json/generator/depend
@@ -10,7 +10,6 @@ generator.o: $(hdrdir)/ruby/backward.h
generator.o: $(hdrdir)/ruby/backward/2/assume.h
generator.o: $(hdrdir)/ruby/backward/2/attributes.h
generator.o: $(hdrdir)/ruby/backward/2/bool.h
-generator.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
generator.o: $(hdrdir)/ruby/backward/2/inttypes.h
generator.o: $(hdrdir)/ruby/backward/2/limits.h
generator.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/json/parser/depend b/ext/json/parser/depend
index 1a75df405ddfde..df261fdfbb2d5e 100644
--- a/ext/json/parser/depend
+++ b/ext/json/parser/depend
@@ -10,7 +10,6 @@ parser.o: $(hdrdir)/ruby/backward.h
parser.o: $(hdrdir)/ruby/backward/2/assume.h
parser.o: $(hdrdir)/ruby/backward/2/attributes.h
parser.o: $(hdrdir)/ruby/backward/2/bool.h
-parser.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
parser.o: $(hdrdir)/ruby/backward/2/inttypes.h
parser.o: $(hdrdir)/ruby/backward/2/limits.h
parser.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/monitor/depend b/ext/monitor/depend
index 2e3ba40928cad7..a8fca7f0b7ee99 100644
--- a/ext/monitor/depend
+++ b/ext/monitor/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
monitor.o: $(RUBY_EXTCONF_H)
monitor.o: $(arch_hdrdir)/ruby/config.h
+monitor.o: $(hdrdir)/ruby/assert.h
+monitor.o: $(hdrdir)/ruby/backward.h
+monitor.o: $(hdrdir)/ruby/backward/2/assume.h
+monitor.o: $(hdrdir)/ruby/backward/2/attributes.h
+monitor.o: $(hdrdir)/ruby/backward/2/bool.h
+monitor.o: $(hdrdir)/ruby/backward/2/inttypes.h
+monitor.o: $(hdrdir)/ruby/backward/2/limits.h
+monitor.o: $(hdrdir)/ruby/backward/2/long_long.h
+monitor.o: $(hdrdir)/ruby/backward/2/stdalign.h
+monitor.o: $(hdrdir)/ruby/backward/2/stdarg.h
+monitor.o: $(hdrdir)/ruby/defines.h
+monitor.o: $(hdrdir)/ruby/intern.h
monitor.o: $(hdrdir)/ruby/internal/anyargs.h
monitor.o: $(hdrdir)/ruby/internal/arithmetic.h
monitor.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ monitor.o: $(hdrdir)/ruby/internal/value_type.h
monitor.o: $(hdrdir)/ruby/internal/variable.h
monitor.o: $(hdrdir)/ruby/internal/warning_push.h
monitor.o: $(hdrdir)/ruby/internal/xmalloc.h
-monitor.o: $(hdrdir)/ruby/assert.h
-monitor.o: $(hdrdir)/ruby/backward.h
-monitor.o: $(hdrdir)/ruby/backward/2/assume.h
-monitor.o: $(hdrdir)/ruby/backward/2/attributes.h
-monitor.o: $(hdrdir)/ruby/backward/2/bool.h
-monitor.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-monitor.o: $(hdrdir)/ruby/backward/2/inttypes.h
-monitor.o: $(hdrdir)/ruby/backward/2/limits.h
-monitor.o: $(hdrdir)/ruby/backward/2/long_long.h
-monitor.o: $(hdrdir)/ruby/backward/2/stdalign.h
-monitor.o: $(hdrdir)/ruby/backward/2/stdarg.h
-monitor.o: $(hdrdir)/ruby/defines.h
-monitor.o: $(hdrdir)/ruby/intern.h
monitor.o: $(hdrdir)/ruby/missing.h
monitor.o: $(hdrdir)/ruby/ruby.h
monitor.o: $(hdrdir)/ruby/st.h
diff --git a/ext/nkf/depend b/ext/nkf/depend
index b66458cd1900cb..8951e0b3d4caa2 100644
--- a/ext/nkf/depend
+++ b/ext/nkf/depend
@@ -10,7 +10,6 @@ nkf.o: $(hdrdir)/ruby/backward.h
nkf.o: $(hdrdir)/ruby/backward/2/assume.h
nkf.o: $(hdrdir)/ruby/backward/2/attributes.h
nkf.o: $(hdrdir)/ruby/backward/2/bool.h
-nkf.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
nkf.o: $(hdrdir)/ruby/backward/2/inttypes.h
nkf.o: $(hdrdir)/ruby/backward/2/limits.h
nkf.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/objspace/depend b/ext/objspace/depend
index 364d6faba6e2e5..bea8ba2315d8b2 100644
--- a/ext/objspace/depend
+++ b/ext/objspace/depend
@@ -1,18 +1,14 @@
# AUTOGENERATED DEPENDENCIES START
object_tracing.o: $(RUBY_EXTCONF_H)
object_tracing.o: $(arch_hdrdir)/ruby/config.h
-object_tracing.o: $(hdrdir)/ruby.h
object_tracing.o: $(hdrdir)/ruby/assert.h
object_tracing.o: $(hdrdir)/ruby/backward.h
object_tracing.o: $(hdrdir)/ruby/backward/2/assume.h
object_tracing.o: $(hdrdir)/ruby/backward/2/attributes.h
object_tracing.o: $(hdrdir)/ruby/backward/2/bool.h
-object_tracing.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
object_tracing.o: $(hdrdir)/ruby/backward/2/inttypes.h
object_tracing.o: $(hdrdir)/ruby/backward/2/limits.h
object_tracing.o: $(hdrdir)/ruby/backward/2/long_long.h
-object_tracing.o: $(hdrdir)/ruby/backward/2/r_cast.h
-object_tracing.o: $(hdrdir)/ruby/backward/2/rmodule.h
object_tracing.o: $(hdrdir)/ruby/backward/2/stdalign.h
object_tracing.o: $(hdrdir)/ruby/backward/2/stdarg.h
object_tracing.o: $(hdrdir)/ruby/debug.h
@@ -166,7 +162,6 @@ object_tracing.o: object_tracing.c
object_tracing.o: objspace.h
objspace.o: $(RUBY_EXTCONF_H)
objspace.o: $(arch_hdrdir)/ruby/config.h
-objspace.o: $(hdrdir)/ruby.h
objspace.o: $(hdrdir)/ruby/assert.h
objspace.o: $(hdrdir)/ruby/backward.h
objspace.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -176,8 +171,6 @@ objspace.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
objspace.o: $(hdrdir)/ruby/backward/2/inttypes.h
objspace.o: $(hdrdir)/ruby/backward/2/limits.h
objspace.o: $(hdrdir)/ruby/backward/2/long_long.h
-objspace.o: $(hdrdir)/ruby/backward/2/r_cast.h
-objspace.o: $(hdrdir)/ruby/backward/2/rmodule.h
objspace.o: $(hdrdir)/ruby/backward/2/stdalign.h
objspace.o: $(hdrdir)/ruby/backward/2/stdarg.h
objspace.o: $(hdrdir)/ruby/defines.h
@@ -360,7 +353,6 @@ objspace.o: objspace.c
objspace.o: {$(VPATH)}id.h
objspace_dump.o: $(RUBY_EXTCONF_H)
objspace_dump.o: $(arch_hdrdir)/ruby/config.h
-objspace_dump.o: $(hdrdir)/ruby.h
objspace_dump.o: $(hdrdir)/ruby/assert.h
objspace_dump.o: $(hdrdir)/ruby/atomic.h
objspace_dump.o: $(hdrdir)/ruby/backward.h
@@ -371,8 +363,6 @@ objspace_dump.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
objspace_dump.o: $(hdrdir)/ruby/backward/2/inttypes.h
objspace_dump.o: $(hdrdir)/ruby/backward/2/limits.h
objspace_dump.o: $(hdrdir)/ruby/backward/2/long_long.h
-objspace_dump.o: $(hdrdir)/ruby/backward/2/r_cast.h
-objspace_dump.o: $(hdrdir)/ruby/backward/2/rmodule.h
objspace_dump.o: $(hdrdir)/ruby/backward/2/stdalign.h
objspace_dump.o: $(hdrdir)/ruby/backward/2/stdarg.h
objspace_dump.o: $(hdrdir)/ruby/debug.h
diff --git a/ext/objspace/object_tracing.c b/ext/objspace/object_tracing.c
index 4973a7535ba402..66d6baa49112ee 100644
--- a/ext/objspace/object_tracing.c
+++ b/ext/objspace/object_tracing.c
@@ -208,7 +208,8 @@ allocation_info_tracer_compact(void *ptr)
{
struct traceobj_arg *trace_arg = (struct traceobj_arg *)ptr;
- if (st_foreach_with_replace(trace_arg->object_table, hash_foreach_should_replace_key, hash_replace_key, 0)) {
+ if (trace_arg->object_table &&
+ st_foreach_with_replace(trace_arg->object_table, hash_foreach_should_replace_key, hash_replace_key, 0)) {
rb_raise(rb_eRuntimeError, "hash modified during iteration");
}
}
diff --git a/ext/pathname/depend b/ext/pathname/depend
index 0860334b7f196e..53041d2ef8603e 100644
--- a/ext/pathname/depend
+++ b/ext/pathname/depend
@@ -7,7 +7,6 @@ pathname.o: $(hdrdir)/ruby/backward.h
pathname.o: $(hdrdir)/ruby/backward/2/assume.h
pathname.o: $(hdrdir)/ruby/backward/2/attributes.h
pathname.o: $(hdrdir)/ruby/backward/2/bool.h
-pathname.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
pathname.o: $(hdrdir)/ruby/backward/2/inttypes.h
pathname.o: $(hdrdir)/ruby/backward/2/limits.h
pathname.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/psych/depend b/ext/psych/depend
index ef55b78c33c0e4..444866353124d6 100644
--- a/ext/psych/depend
+++ b/ext/psych/depend
@@ -1,31 +1,6 @@
$(OBJS): $(YAML_H)
# AUTOGENERATED DEPENDENCIES START
-api.o: $(RUBY_EXTCONF_H)
-api.o: yaml/api.c
-api.o: yaml/config.h
-api.o: yaml/yaml.h
-api.o: yaml/yaml_private.h
-dumper.o: $(RUBY_EXTCONF_H)
-dumper.o: yaml/config.h
-dumper.o: yaml/dumper.c
-dumper.o: yaml/yaml.h
-dumper.o: yaml/yaml_private.h
-emitter.o: $(RUBY_EXTCONF_H)
-emitter.o: yaml/config.h
-emitter.o: yaml/emitter.c
-emitter.o: yaml/yaml.h
-emitter.o: yaml/yaml_private.h
-loader.o: $(RUBY_EXTCONF_H)
-loader.o: yaml/config.h
-loader.o: yaml/loader.c
-loader.o: yaml/yaml.h
-loader.o: yaml/yaml_private.h
-parser.o: $(RUBY_EXTCONF_H)
-parser.o: yaml/config.h
-parser.o: yaml/parser.c
-parser.o: yaml/yaml.h
-parser.o: yaml/yaml_private.h
psych.o: $(RUBY_EXTCONF_H)
psych.o: $(arch_hdrdir)/ruby/config.h
psych.o: $(hdrdir)/ruby.h
@@ -34,7 +9,6 @@ psych.o: $(hdrdir)/ruby/backward.h
psych.o: $(hdrdir)/ruby/backward/2/assume.h
psych.o: $(hdrdir)/ruby/backward/2/attributes.h
psych.o: $(hdrdir)/ruby/backward/2/bool.h
-psych.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
psych.o: $(hdrdir)/ruby/backward/2/inttypes.h
psych.o: $(hdrdir)/ruby/backward/2/limits.h
psych.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -203,7 +177,6 @@ psych.o: psych_emitter.h
psych.o: psych_parser.h
psych.o: psych_to_ruby.h
psych.o: psych_yaml_tree.h
-psych.o: yaml/yaml.h
psych_emitter.o: $(RUBY_EXTCONF_H)
psych_emitter.o: $(arch_hdrdir)/ruby/config.h
psych_emitter.o: $(hdrdir)/ruby.h
@@ -212,7 +185,6 @@ psych_emitter.o: $(hdrdir)/ruby/backward.h
psych_emitter.o: $(hdrdir)/ruby/backward/2/assume.h
psych_emitter.o: $(hdrdir)/ruby/backward/2/attributes.h
psych_emitter.o: $(hdrdir)/ruby/backward/2/bool.h
-psych_emitter.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
psych_emitter.o: $(hdrdir)/ruby/backward/2/inttypes.h
psych_emitter.o: $(hdrdir)/ruby/backward/2/limits.h
psych_emitter.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -381,7 +353,6 @@ psych_emitter.o: psych_emitter.h
psych_emitter.o: psych_parser.h
psych_emitter.o: psych_to_ruby.h
psych_emitter.o: psych_yaml_tree.h
-psych_emitter.o: yaml/yaml.h
psych_parser.o: $(RUBY_EXTCONF_H)
psych_parser.o: $(arch_hdrdir)/ruby/config.h
psych_parser.o: $(hdrdir)/ruby.h
@@ -390,7 +361,6 @@ psych_parser.o: $(hdrdir)/ruby/backward.h
psych_parser.o: $(hdrdir)/ruby/backward/2/assume.h
psych_parser.o: $(hdrdir)/ruby/backward/2/attributes.h
psych_parser.o: $(hdrdir)/ruby/backward/2/bool.h
-psych_parser.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
psych_parser.o: $(hdrdir)/ruby/backward/2/inttypes.h
psych_parser.o: $(hdrdir)/ruby/backward/2/limits.h
psych_parser.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -559,7 +529,6 @@ psych_parser.o: psych_parser.c
psych_parser.o: psych_parser.h
psych_parser.o: psych_to_ruby.h
psych_parser.o: psych_yaml_tree.h
-psych_parser.o: yaml/yaml.h
psych_to_ruby.o: $(RUBY_EXTCONF_H)
psych_to_ruby.o: $(arch_hdrdir)/ruby/config.h
psych_to_ruby.o: $(hdrdir)/ruby.h
@@ -568,7 +537,6 @@ psych_to_ruby.o: $(hdrdir)/ruby/backward.h
psych_to_ruby.o: $(hdrdir)/ruby/backward/2/assume.h
psych_to_ruby.o: $(hdrdir)/ruby/backward/2/attributes.h
psych_to_ruby.o: $(hdrdir)/ruby/backward/2/bool.h
-psych_to_ruby.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
psych_to_ruby.o: $(hdrdir)/ruby/backward/2/inttypes.h
psych_to_ruby.o: $(hdrdir)/ruby/backward/2/limits.h
psych_to_ruby.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -737,7 +705,6 @@ psych_to_ruby.o: psych_parser.h
psych_to_ruby.o: psych_to_ruby.c
psych_to_ruby.o: psych_to_ruby.h
psych_to_ruby.o: psych_yaml_tree.h
-psych_to_ruby.o: yaml/yaml.h
psych_yaml_tree.o: $(RUBY_EXTCONF_H)
psych_yaml_tree.o: $(arch_hdrdir)/ruby/config.h
psych_yaml_tree.o: $(hdrdir)/ruby.h
@@ -746,7 +713,6 @@ psych_yaml_tree.o: $(hdrdir)/ruby/backward.h
psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/assume.h
psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/attributes.h
psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/bool.h
-psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/inttypes.h
psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/limits.h
psych_yaml_tree.o: $(hdrdir)/ruby/backward/2/long_long.h
@@ -915,20 +881,4 @@ psych_yaml_tree.o: psych_parser.h
psych_yaml_tree.o: psych_to_ruby.h
psych_yaml_tree.o: psych_yaml_tree.c
psych_yaml_tree.o: psych_yaml_tree.h
-psych_yaml_tree.o: yaml/yaml.h
-reader.o: $(RUBY_EXTCONF_H)
-reader.o: yaml/config.h
-reader.o: yaml/reader.c
-reader.o: yaml/yaml.h
-reader.o: yaml/yaml_private.h
-scanner.o: $(RUBY_EXTCONF_H)
-scanner.o: yaml/config.h
-scanner.o: yaml/scanner.c
-scanner.o: yaml/yaml.h
-scanner.o: yaml/yaml_private.h
-writer.o: $(RUBY_EXTCONF_H)
-writer.o: yaml/config.h
-writer.o: yaml/writer.c
-writer.o: yaml/yaml.h
-writer.o: yaml/yaml_private.h
# AUTOGENERATED DEPENDENCIES END
diff --git a/ext/pty/depend b/ext/pty/depend
index 984314c8705573..7baded100cfc43 100644
--- a/ext/pty/depend
+++ b/ext/pty/depend
@@ -1,7 +1,6 @@
# AUTOGENERATED DEPENDENCIES START
pty.o: $(RUBY_EXTCONF_H)
pty.o: $(arch_hdrdir)/ruby/config.h
-pty.o: $(hdrdir)/ruby.h
pty.o: $(hdrdir)/ruby/assert.h
pty.o: $(hdrdir)/ruby/backward.h
pty.o: $(hdrdir)/ruby/backward/2/assume.h
diff --git a/ext/racc/cparse/depend b/ext/racc/cparse/depend
index 556c47fbd5234e..cb2a1b6bd698f6 100644
--- a/ext/racc/cparse/depend
+++ b/ext/racc/cparse/depend
@@ -2,6 +2,18 @@
cparse.o: $(RUBY_EXTCONF_H)
cparse.o: $(arch_hdrdir)/ruby/config.h
cparse.o: $(hdrdir)/ruby.h
+cparse.o: $(hdrdir)/ruby/assert.h
+cparse.o: $(hdrdir)/ruby/backward.h
+cparse.o: $(hdrdir)/ruby/backward/2/assume.h
+cparse.o: $(hdrdir)/ruby/backward/2/attributes.h
+cparse.o: $(hdrdir)/ruby/backward/2/bool.h
+cparse.o: $(hdrdir)/ruby/backward/2/inttypes.h
+cparse.o: $(hdrdir)/ruby/backward/2/limits.h
+cparse.o: $(hdrdir)/ruby/backward/2/long_long.h
+cparse.o: $(hdrdir)/ruby/backward/2/stdalign.h
+cparse.o: $(hdrdir)/ruby/backward/2/stdarg.h
+cparse.o: $(hdrdir)/ruby/defines.h
+cparse.o: $(hdrdir)/ruby/intern.h
cparse.o: $(hdrdir)/ruby/internal/anyargs.h
cparse.o: $(hdrdir)/ruby/internal/arithmetic.h
cparse.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -141,19 +153,6 @@ cparse.o: $(hdrdir)/ruby/internal/value_type.h
cparse.o: $(hdrdir)/ruby/internal/variable.h
cparse.o: $(hdrdir)/ruby/internal/warning_push.h
cparse.o: $(hdrdir)/ruby/internal/xmalloc.h
-cparse.o: $(hdrdir)/ruby/assert.h
-cparse.o: $(hdrdir)/ruby/backward.h
-cparse.o: $(hdrdir)/ruby/backward/2/assume.h
-cparse.o: $(hdrdir)/ruby/backward/2/attributes.h
-cparse.o: $(hdrdir)/ruby/backward/2/bool.h
-cparse.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-cparse.o: $(hdrdir)/ruby/backward/2/inttypes.h
-cparse.o: $(hdrdir)/ruby/backward/2/limits.h
-cparse.o: $(hdrdir)/ruby/backward/2/long_long.h
-cparse.o: $(hdrdir)/ruby/backward/2/stdalign.h
-cparse.o: $(hdrdir)/ruby/backward/2/stdarg.h
-cparse.o: $(hdrdir)/ruby/defines.h
-cparse.o: $(hdrdir)/ruby/intern.h
cparse.o: $(hdrdir)/ruby/missing.h
cparse.o: $(hdrdir)/ruby/ruby.h
cparse.o: $(hdrdir)/ruby/st.h
diff --git a/ext/rbconfig/sizeof/depend b/ext/rbconfig/sizeof/depend
index b1774d6c627c29..c4100266f7061c 100644
--- a/ext/rbconfig/sizeof/depend
+++ b/ext/rbconfig/sizeof/depend
@@ -16,6 +16,18 @@ sizes.c: $(top_srcdir)/tool/generic_erb.rb \
# AUTOGENERATED DEPENDENCIES START
limits.o: $(RUBY_EXTCONF_H)
limits.o: $(arch_hdrdir)/ruby/config.h
+limits.o: $(hdrdir)/ruby/assert.h
+limits.o: $(hdrdir)/ruby/backward.h
+limits.o: $(hdrdir)/ruby/backward/2/assume.h
+limits.o: $(hdrdir)/ruby/backward/2/attributes.h
+limits.o: $(hdrdir)/ruby/backward/2/bool.h
+limits.o: $(hdrdir)/ruby/backward/2/inttypes.h
+limits.o: $(hdrdir)/ruby/backward/2/limits.h
+limits.o: $(hdrdir)/ruby/backward/2/long_long.h
+limits.o: $(hdrdir)/ruby/backward/2/stdalign.h
+limits.o: $(hdrdir)/ruby/backward/2/stdarg.h
+limits.o: $(hdrdir)/ruby/defines.h
+limits.o: $(hdrdir)/ruby/intern.h
limits.o: $(hdrdir)/ruby/internal/anyargs.h
limits.o: $(hdrdir)/ruby/internal/arithmetic.h
limits.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -155,19 +167,6 @@ limits.o: $(hdrdir)/ruby/internal/value_type.h
limits.o: $(hdrdir)/ruby/internal/variable.h
limits.o: $(hdrdir)/ruby/internal/warning_push.h
limits.o: $(hdrdir)/ruby/internal/xmalloc.h
-limits.o: $(hdrdir)/ruby/assert.h
-limits.o: $(hdrdir)/ruby/backward.h
-limits.o: $(hdrdir)/ruby/backward/2/assume.h
-limits.o: $(hdrdir)/ruby/backward/2/attributes.h
-limits.o: $(hdrdir)/ruby/backward/2/bool.h
-limits.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-limits.o: $(hdrdir)/ruby/backward/2/inttypes.h
-limits.o: $(hdrdir)/ruby/backward/2/limits.h
-limits.o: $(hdrdir)/ruby/backward/2/long_long.h
-limits.o: $(hdrdir)/ruby/backward/2/stdalign.h
-limits.o: $(hdrdir)/ruby/backward/2/stdarg.h
-limits.o: $(hdrdir)/ruby/defines.h
-limits.o: $(hdrdir)/ruby/intern.h
limits.o: $(hdrdir)/ruby/missing.h
limits.o: $(hdrdir)/ruby/ruby.h
limits.o: $(hdrdir)/ruby/st.h
@@ -175,6 +174,18 @@ limits.o: $(hdrdir)/ruby/subst.h
limits.o: limits.c
sizes.o: $(RUBY_EXTCONF_H)
sizes.o: $(arch_hdrdir)/ruby/config.h
+sizes.o: $(hdrdir)/ruby/assert.h
+sizes.o: $(hdrdir)/ruby/backward.h
+sizes.o: $(hdrdir)/ruby/backward/2/assume.h
+sizes.o: $(hdrdir)/ruby/backward/2/attributes.h
+sizes.o: $(hdrdir)/ruby/backward/2/bool.h
+sizes.o: $(hdrdir)/ruby/backward/2/inttypes.h
+sizes.o: $(hdrdir)/ruby/backward/2/limits.h
+sizes.o: $(hdrdir)/ruby/backward/2/long_long.h
+sizes.o: $(hdrdir)/ruby/backward/2/stdalign.h
+sizes.o: $(hdrdir)/ruby/backward/2/stdarg.h
+sizes.o: $(hdrdir)/ruby/defines.h
+sizes.o: $(hdrdir)/ruby/intern.h
sizes.o: $(hdrdir)/ruby/internal/anyargs.h
sizes.o: $(hdrdir)/ruby/internal/arithmetic.h
sizes.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -314,19 +325,6 @@ sizes.o: $(hdrdir)/ruby/internal/value_type.h
sizes.o: $(hdrdir)/ruby/internal/variable.h
sizes.o: $(hdrdir)/ruby/internal/warning_push.h
sizes.o: $(hdrdir)/ruby/internal/xmalloc.h
-sizes.o: $(hdrdir)/ruby/assert.h
-sizes.o: $(hdrdir)/ruby/backward.h
-sizes.o: $(hdrdir)/ruby/backward/2/assume.h
-sizes.o: $(hdrdir)/ruby/backward/2/attributes.h
-sizes.o: $(hdrdir)/ruby/backward/2/bool.h
-sizes.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-sizes.o: $(hdrdir)/ruby/backward/2/inttypes.h
-sizes.o: $(hdrdir)/ruby/backward/2/limits.h
-sizes.o: $(hdrdir)/ruby/backward/2/long_long.h
-sizes.o: $(hdrdir)/ruby/backward/2/stdalign.h
-sizes.o: $(hdrdir)/ruby/backward/2/stdarg.h
-sizes.o: $(hdrdir)/ruby/defines.h
-sizes.o: $(hdrdir)/ruby/intern.h
sizes.o: $(hdrdir)/ruby/missing.h
sizes.o: $(hdrdir)/ruby/ruby.h
sizes.o: $(hdrdir)/ruby/st.h
diff --git a/ext/readline/depend b/ext/readline/depend
index a95a9dc8bb1134..818770b8036cf2 100644
--- a/ext/readline/depend
+++ b/ext/readline/depend
@@ -6,7 +6,6 @@ readline.o: $(hdrdir)/ruby/backward.h
readline.o: $(hdrdir)/ruby/backward/2/assume.h
readline.o: $(hdrdir)/ruby/backward/2/attributes.h
readline.o: $(hdrdir)/ruby/backward/2/bool.h
-readline.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
readline.o: $(hdrdir)/ruby/backward/2/inttypes.h
readline.o: $(hdrdir)/ruby/backward/2/limits.h
readline.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/ripper/depend b/ext/ripper/depend
index 6513ab107f16db..9f4b1b53b4f7b4 100644
--- a/ext/ripper/depend
+++ b/ext/ripper/depend
@@ -51,7 +51,6 @@ ripper.E: ripper.c
# AUTOGENERATED DEPENDENCIES START
ripper.o: $(RUBY_EXTCONF_H)
ripper.o: $(arch_hdrdir)/ruby/config.h
-ripper.o: $(hdrdir)/ruby.h
ripper.o: $(hdrdir)/ruby/assert.h
ripper.o: $(hdrdir)/ruby/backward.h
ripper.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -248,7 +247,6 @@ ripper.o: $(top_srcdir)/internal/static_assert.h
ripper.o: $(top_srcdir)/internal/string.h
ripper.o: $(top_srcdir)/internal/symbol.h
ripper.o: $(top_srcdir)/internal/thread.h
-ripper.o: $(top_srcdir)/internal/util.h
ripper.o: $(top_srcdir)/internal/variable.h
ripper.o: $(top_srcdir)/internal/vm.h
ripper.o: $(top_srcdir)/internal/warnings.h
diff --git a/ext/ripper/extconf.rb b/ext/ripper/extconf.rb
index 2dde565bd978d7..65cb5030d3dd42 100644
--- a/ext/ripper/extconf.rb
+++ b/ext/ripper/extconf.rb
@@ -13,7 +13,8 @@ def main
end
end
$objs = %w(ripper.o)
- $cleanfiles.concat %w(ripper.y ripper.c ripper.E ripper.output y.output eventids1.c eventids2table.c .eventids2-check)
+ $distcleanfiles.concat %w(ripper.y ripper.c eventids1.c eventids2table.c)
+ $cleanfiles.concat %w(ripper.E ripper.output y.output .eventids2-check)
$defs << '-DRIPPER'
$defs << '-DRIPPER_DEBUG' if $debug
$VPATH << '$(topdir)' << '$(top_srcdir)'
diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb
index f6051c6341642c..cc1f74f1e3559d 100644
--- a/ext/ripper/lib/ripper/lexer.rb
+++ b/ext/ripper/lib/ripper/lexer.rb
@@ -53,10 +53,27 @@ def Ripper.lex(src, filename = '-', lineno = 1, **kw)
end
class Lexer < ::Ripper #:nodoc: internal use only
- State = Struct.new(:to_int, :to_s) do
+ class State
+ attr_reader :to_int, :to_s
+
+ def initialize(i)
+ @to_int = i
+ @to_s = Ripper.lex_state_name(i)
+ freeze
+ end
+
+ def [](index)
+ case index
+ when 0
+ warn "Calling `Lexer::State#[0]` is deprecated, please use `Lexer::State#to_int` instead"
+ @to_int
+ when 1
+ warn "Calling `Lexer::State#[1]` is deprecated, please use `Lexer::State#to_s` instead"
+ @event
+ end
+ end
+
alias to_i to_int
- def initialize(i) super(i, Ripper.lex_state_name(i)).freeze end
- # def inspect; "#<#{self.class}: #{self}>" end
alias inspect to_s
def pretty_print(q) q.text(to_s) end
def ==(i) super or to_int == i end
@@ -67,15 +84,43 @@ def anybits?(i) to_int.anybits?(i) end
def nobits?(i) to_int.nobits?(i) end
end
- Elem = Struct.new(:pos, :event, :tok, :state, :message) do
+ class Elem
+ attr_accessor :pos, :event, :tok, :state, :message
+
def initialize(pos, event, tok, state, message = nil)
- super(pos, event, tok, State.new(state), message)
+ @pos = pos
+ @event = event
+ @tok = tok
+ @state = State.new(state)
+ @message = message
+ end
+
+ def [](index)
+ case index
+ when 0
+ warn "Calling `Lexer::Elem#[0]` is deprecated, please use `Lexer::Elem#pos` instead"
+ @pos
+ when 1
+ warn "Calling `Lexer::Elem#[1]` is deprecated, please use `Lexer::Elem#event` instead"
+ @event
+ when 2
+ warn "Calling `Lexer::Elem#[2]` is deprecated, please use `Lexer::Elem#tok` instead"
+ @tok
+ when 3
+ warn "Calling `Lexer::Elem#[3]` is deprecated, please use `Lexer::Elem#state` instead"
+ @state
+ when 4
+ warn "Calling `Lexer::Elem#[4]` is deprecated, please use `Lexer::Elem#message` instead"
+ @message
+ end
end
def inspect
"#<#{self.class}: #{event}@#{pos[0]}:#{pos[1]}:#{state}: #{tok.inspect}#{": " if message}#{message}>"
end
+ alias to_s inspect
+
def pretty_print(q)
q.group(2, "#<#{self.class}:", ">") {
q.breakable
@@ -94,9 +139,11 @@ def pretty_print(q)
end
def to_a
- a = super
- a.pop unless a.last
- a
+ if @message
+ [@pos, @event, @tok, @state, @message]
+ else
+ [@pos, @event, @tok, @state]
+ end
end
end
@@ -152,17 +199,19 @@ def parse(raise_errors: false)
def on_heredoc_dedent(v, w)
ignored_sp = []
heredoc = @buf.last
- heredoc.each_with_index do |e, i|
- if Elem === e and e.event == :on_tstring_content and e.pos[1].zero?
- tok = e.tok.dup if w > 0 and /\A\s/ =~ e.tok
- if (n = dedent_string(e.tok, w)) > 0
- if e.tok.empty?
- e.tok = tok[0, n]
- e.event = :on_ignored_sp
- next
+ if Array === heredoc
+ heredoc.each_with_index do |e, i|
+ if Elem === e and e.event == :on_tstring_content and e.pos[1].zero?
+ tok = e.tok.dup if w > 0 and /\A\s/ =~ e.tok
+ if (n = dedent_string(e.tok, w)) > 0
+ if e.tok.empty?
+ e.tok = tok[0, n]
+ e.event = :on_ignored_sp
+ next
+ end
+ ignored_sp << [i, Elem.new(e.pos.dup, :on_ignored_sp, tok[0, n], e.state)]
+ e.pos[1] += n
end
- ignored_sp << [i, Elem.new(e.pos.dup, :on_ignored_sp, tok[0, n], e.state)]
- e.pos[1] += n
end
end
end
diff --git a/ext/socket/depend b/ext/socket/depend
index f2d7a67bcb821f..99617e2532eb4a 100644
--- a/ext/socket/depend
+++ b/ext/socket/depend
@@ -12,7 +12,6 @@ constdefs.c: constdefs.h
# AUTOGENERATED DEPENDENCIES START
ancdata.o: $(RUBY_EXTCONF_H)
ancdata.o: $(arch_hdrdir)/ruby/config.h
-ancdata.o: $(hdrdir)/ruby.h
ancdata.o: $(hdrdir)/ruby/assert.h
ancdata.o: $(hdrdir)/ruby/backward.h
ancdata.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -203,7 +202,6 @@ ancdata.o: rubysocket.h
ancdata.o: sockport.h
basicsocket.o: $(RUBY_EXTCONF_H)
basicsocket.o: $(arch_hdrdir)/ruby/config.h
-basicsocket.o: $(hdrdir)/ruby.h
basicsocket.o: $(hdrdir)/ruby/assert.h
basicsocket.o: $(hdrdir)/ruby/backward.h
basicsocket.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -394,7 +392,6 @@ basicsocket.o: rubysocket.h
basicsocket.o: sockport.h
constants.o: $(RUBY_EXTCONF_H)
constants.o: $(arch_hdrdir)/ruby/config.h
-constants.o: $(hdrdir)/ruby.h
constants.o: $(hdrdir)/ruby/assert.h
constants.o: $(hdrdir)/ruby/backward.h
constants.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -586,7 +583,6 @@ constants.o: rubysocket.h
constants.o: sockport.h
ifaddr.o: $(RUBY_EXTCONF_H)
ifaddr.o: $(arch_hdrdir)/ruby/config.h
-ifaddr.o: $(hdrdir)/ruby.h
ifaddr.o: $(hdrdir)/ruby/assert.h
ifaddr.o: $(hdrdir)/ruby/backward.h
ifaddr.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -777,7 +773,6 @@ ifaddr.o: rubysocket.h
ifaddr.o: sockport.h
init.o: $(RUBY_EXTCONF_H)
init.o: $(arch_hdrdir)/ruby/config.h
-init.o: $(hdrdir)/ruby.h
init.o: $(hdrdir)/ruby/assert.h
init.o: $(hdrdir)/ruby/backward.h
init.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -968,7 +963,6 @@ init.o: rubysocket.h
init.o: sockport.h
ipsocket.o: $(RUBY_EXTCONF_H)
ipsocket.o: $(arch_hdrdir)/ruby/config.h
-ipsocket.o: $(hdrdir)/ruby.h
ipsocket.o: $(hdrdir)/ruby/assert.h
ipsocket.o: $(hdrdir)/ruby/backward.h
ipsocket.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -1159,7 +1153,6 @@ ipsocket.o: rubysocket.h
ipsocket.o: sockport.h
option.o: $(RUBY_EXTCONF_H)
option.o: $(arch_hdrdir)/ruby/config.h
-option.o: $(hdrdir)/ruby.h
option.o: $(hdrdir)/ruby/assert.h
option.o: $(hdrdir)/ruby/backward.h
option.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -1350,7 +1343,6 @@ option.o: rubysocket.h
option.o: sockport.h
raddrinfo.o: $(RUBY_EXTCONF_H)
raddrinfo.o: $(arch_hdrdir)/ruby/config.h
-raddrinfo.o: $(hdrdir)/ruby.h
raddrinfo.o: $(hdrdir)/ruby/assert.h
raddrinfo.o: $(hdrdir)/ruby/backward.h
raddrinfo.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -1541,7 +1533,6 @@ raddrinfo.o: rubysocket.h
raddrinfo.o: sockport.h
socket.o: $(RUBY_EXTCONF_H)
socket.o: $(arch_hdrdir)/ruby/config.h
-socket.o: $(hdrdir)/ruby.h
socket.o: $(hdrdir)/ruby/assert.h
socket.o: $(hdrdir)/ruby/backward.h
socket.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -1732,7 +1723,6 @@ socket.o: socket.c
socket.o: sockport.h
sockssocket.o: $(RUBY_EXTCONF_H)
sockssocket.o: $(arch_hdrdir)/ruby/config.h
-sockssocket.o: $(hdrdir)/ruby.h
sockssocket.o: $(hdrdir)/ruby/assert.h
sockssocket.o: $(hdrdir)/ruby/backward.h
sockssocket.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -1923,7 +1913,6 @@ sockssocket.o: sockport.h
sockssocket.o: sockssocket.c
tcpserver.o: $(RUBY_EXTCONF_H)
tcpserver.o: $(arch_hdrdir)/ruby/config.h
-tcpserver.o: $(hdrdir)/ruby.h
tcpserver.o: $(hdrdir)/ruby/assert.h
tcpserver.o: $(hdrdir)/ruby/backward.h
tcpserver.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -2114,7 +2103,6 @@ tcpserver.o: sockport.h
tcpserver.o: tcpserver.c
tcpsocket.o: $(RUBY_EXTCONF_H)
tcpsocket.o: $(arch_hdrdir)/ruby/config.h
-tcpsocket.o: $(hdrdir)/ruby.h
tcpsocket.o: $(hdrdir)/ruby/assert.h
tcpsocket.o: $(hdrdir)/ruby/backward.h
tcpsocket.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -2305,7 +2293,6 @@ tcpsocket.o: sockport.h
tcpsocket.o: tcpsocket.c
udpsocket.o: $(RUBY_EXTCONF_H)
udpsocket.o: $(arch_hdrdir)/ruby/config.h
-udpsocket.o: $(hdrdir)/ruby.h
udpsocket.o: $(hdrdir)/ruby/assert.h
udpsocket.o: $(hdrdir)/ruby/backward.h
udpsocket.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -2496,7 +2483,6 @@ udpsocket.o: sockport.h
udpsocket.o: udpsocket.c
unixserver.o: $(RUBY_EXTCONF_H)
unixserver.o: $(arch_hdrdir)/ruby/config.h
-unixserver.o: $(hdrdir)/ruby.h
unixserver.o: $(hdrdir)/ruby/assert.h
unixserver.o: $(hdrdir)/ruby/backward.h
unixserver.o: $(hdrdir)/ruby/backward/2/assume.h
@@ -2687,7 +2673,6 @@ unixserver.o: sockport.h
unixserver.o: unixserver.c
unixsocket.o: $(RUBY_EXTCONF_H)
unixsocket.o: $(arch_hdrdir)/ruby/config.h
-unixsocket.o: $(hdrdir)/ruby.h
unixsocket.o: $(hdrdir)/ruby/assert.h
unixsocket.o: $(hdrdir)/ruby/backward.h
unixsocket.o: $(hdrdir)/ruby/backward/2/assume.h
diff --git a/ext/stringio/depend b/ext/stringio/depend
index da20efe1315f4a..7b70a77d2020ea 100644
--- a/ext/stringio/depend
+++ b/ext/stringio/depend
@@ -7,7 +7,6 @@ stringio.o: $(hdrdir)/ruby/backward.h
stringio.o: $(hdrdir)/ruby/backward/2/assume.h
stringio.o: $(hdrdir)/ruby/backward/2/attributes.h
stringio.o: $(hdrdir)/ruby/backward/2/bool.h
-stringio.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
stringio.o: $(hdrdir)/ruby/backward/2/inttypes.h
stringio.o: $(hdrdir)/ruby/backward/2/limits.h
stringio.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/strscan/depend b/ext/strscan/depend
index 5605a72359ca0d..7024f8bfaa625f 100644
--- a/ext/strscan/depend
+++ b/ext/strscan/depend
@@ -6,7 +6,6 @@ strscan.o: $(hdrdir)/ruby/backward.h
strscan.o: $(hdrdir)/ruby/backward/2/assume.h
strscan.o: $(hdrdir)/ruby/backward/2/attributes.h
strscan.o: $(hdrdir)/ruby/backward/2/bool.h
-strscan.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
strscan.o: $(hdrdir)/ruby/backward/2/inttypes.h
strscan.o: $(hdrdir)/ruby/backward/2/limits.h
strscan.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/syslog/depend b/ext/syslog/depend
index fb98401e525fdd..0752bed04d1920 100644
--- a/ext/syslog/depend
+++ b/ext/syslog/depend
@@ -1,6 +1,18 @@
# AUTOGENERATED DEPENDENCIES START
syslog.o: $(RUBY_EXTCONF_H)
syslog.o: $(arch_hdrdir)/ruby/config.h
+syslog.o: $(hdrdir)/ruby/assert.h
+syslog.o: $(hdrdir)/ruby/backward.h
+syslog.o: $(hdrdir)/ruby/backward/2/assume.h
+syslog.o: $(hdrdir)/ruby/backward/2/attributes.h
+syslog.o: $(hdrdir)/ruby/backward/2/bool.h
+syslog.o: $(hdrdir)/ruby/backward/2/inttypes.h
+syslog.o: $(hdrdir)/ruby/backward/2/limits.h
+syslog.o: $(hdrdir)/ruby/backward/2/long_long.h
+syslog.o: $(hdrdir)/ruby/backward/2/stdalign.h
+syslog.o: $(hdrdir)/ruby/backward/2/stdarg.h
+syslog.o: $(hdrdir)/ruby/defines.h
+syslog.o: $(hdrdir)/ruby/intern.h
syslog.o: $(hdrdir)/ruby/internal/anyargs.h
syslog.o: $(hdrdir)/ruby/internal/arithmetic.h
syslog.o: $(hdrdir)/ruby/internal/arithmetic/char.h
@@ -140,19 +152,6 @@ syslog.o: $(hdrdir)/ruby/internal/value_type.h
syslog.o: $(hdrdir)/ruby/internal/variable.h
syslog.o: $(hdrdir)/ruby/internal/warning_push.h
syslog.o: $(hdrdir)/ruby/internal/xmalloc.h
-syslog.o: $(hdrdir)/ruby/assert.h
-syslog.o: $(hdrdir)/ruby/backward.h
-syslog.o: $(hdrdir)/ruby/backward/2/assume.h
-syslog.o: $(hdrdir)/ruby/backward/2/attributes.h
-syslog.o: $(hdrdir)/ruby/backward/2/bool.h
-syslog.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
-syslog.o: $(hdrdir)/ruby/backward/2/inttypes.h
-syslog.o: $(hdrdir)/ruby/backward/2/limits.h
-syslog.o: $(hdrdir)/ruby/backward/2/long_long.h
-syslog.o: $(hdrdir)/ruby/backward/2/stdalign.h
-syslog.o: $(hdrdir)/ruby/backward/2/stdarg.h
-syslog.o: $(hdrdir)/ruby/defines.h
-syslog.o: $(hdrdir)/ruby/intern.h
syslog.o: $(hdrdir)/ruby/missing.h
syslog.o: $(hdrdir)/ruby/ruby.h
syslog.o: $(hdrdir)/ruby/st.h
diff --git a/ext/win32ole/win32ole.gemspec b/ext/win32ole/win32ole.gemspec
index 021625e44e91ce..977555c98df20b 100644
--- a/ext/win32ole/win32ole.gemspec
+++ b/ext/win32ole/win32ole.gemspec
@@ -8,6 +8,7 @@ Gem::Specification.new do |spec|
spec.description = spec.summary
spec.homepage = "https://github.com/ruby/win32ole"
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
+ spec.licenses = ["Ruby", "BSD-2-Clause"]
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
diff --git a/ext/win32ole/win32ole_method.c b/ext/win32ole/win32ole_method.c
index bf668300c246d5..6ed5def6d7710d 100644
--- a/ext/win32ole/win32ole_method.c
+++ b/ext/win32ole/win32ole_method.c
@@ -437,7 +437,7 @@ ole_method_invoke_kind(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_MTHOD#invkind
+ * WIN32OLE_METHOD#invkind
*
* Returns the method invoke kind.
* tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
diff --git a/ext/zlib/depend b/ext/zlib/depend
index d63d388c9e7d31..68c1efde04d653 100644
--- a/ext/zlib/depend
+++ b/ext/zlib/depend
@@ -7,7 +7,6 @@ zlib.o: $(hdrdir)/ruby/backward.h
zlib.o: $(hdrdir)/ruby/backward/2/assume.h
zlib.o: $(hdrdir)/ruby/backward/2/attributes.h
zlib.o: $(hdrdir)/ruby/backward/2/bool.h
-zlib.o: $(hdrdir)/ruby/backward/2/gcc_version_since.h
zlib.o: $(hdrdir)/ruby/backward/2/inttypes.h
zlib.o: $(hdrdir)/ruby/backward/2/limits.h
zlib.o: $(hdrdir)/ruby/backward/2/long_long.h
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 9bf71ce80e7b82..be5f148bcd9f14 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -288,6 +288,7 @@ static VALUE rb_gzreader_readlines(int, VALUE*, VALUE);
* - Zlib::MemError
* - Zlib::BufError
* - Zlib::VersionError
+ * - Zlib::InProgressError
*
* (if you have GZIP_SUPPORT)
* - Zlib::GzipReader
@@ -304,7 +305,7 @@ void Init_zlib(void);
/*--------- Exceptions --------*/
static VALUE cZError, cStreamEnd, cNeedDict;
-static VALUE cStreamError, cDataError, cMemError, cBufError, cVersionError;
+static VALUE cStreamError, cDataError, cMemError, cBufError, cVersionError, cInProgressError;
static void
raise_zlib_error(int err, const char *msg)
@@ -557,14 +558,15 @@ struct zstream {
} *func;
};
-#define ZSTREAM_FLAG_READY 0x1
-#define ZSTREAM_FLAG_IN_STREAM 0x2
-#define ZSTREAM_FLAG_FINISHED 0x4
-#define ZSTREAM_FLAG_CLOSING 0x8
-#define ZSTREAM_FLAG_GZFILE 0x10 /* disallows yield from expand_buffer for
+#define ZSTREAM_FLAG_READY (1 << 0)
+#define ZSTREAM_FLAG_IN_STREAM (1 << 1)
+#define ZSTREAM_FLAG_FINISHED (1 << 2)
+#define ZSTREAM_FLAG_CLOSING (1 << 3)
+#define ZSTREAM_FLAG_GZFILE (1 << 4) /* disallows yield from expand_buffer for
gzip*/
-#define ZSTREAM_REUSE_BUFFER 0x20
-#define ZSTREAM_FLAG_UNUSED 0x40
+#define ZSTREAM_REUSE_BUFFER (1 << 5)
+#define ZSTREAM_IN_PROGRESS (1 << 6)
+#define ZSTREAM_FLAG_UNUSED (1 << 7)
#define ZSTREAM_READY(z) ((z)->flags |= ZSTREAM_FLAG_READY)
#define ZSTREAM_IS_READY(z) ((z)->flags & ZSTREAM_FLAG_READY)
@@ -593,7 +595,9 @@ static const struct zstream_funcs inflate_funcs = {
};
struct zstream_run_args {
- struct zstream * z;
+ struct zstream *const z;
+ Bytef *src;
+ long len;
int flush; /* stream flush value for inflate() or deflate() */
int interrupt; /* stop processing the stream and return to ruby */
int jump_state; /* for buffer expansion block break or exception */
@@ -1058,19 +1062,18 @@ zstream_unblock_func(void *ptr)
args->interrupt = 1;
}
-static void
-zstream_run0(struct zstream *z, Bytef *src, long len, int flush)
+static VALUE
+zstream_run_try(VALUE value_arg)
{
- struct zstream_run_args args;
+ struct zstream_run_args *args = (struct zstream_run_args *)value_arg;
+ struct zstream *z = args->z;
+ Bytef *src = args->src;
+ long len = args->len;
+ int flush = args->flush;
+
int err;
VALUE old_input = Qnil;
- args.z = z;
- args.flush = flush;
- args.interrupt = 0;
- args.jump_state = 0;
- args.stream_output = !ZSTREAM_IS_GZFILE(z) && rb_block_given_p();
-
if (NIL_P(z->input) && len == 0) {
z->stream.next_in = (Bytef*)"";
z->stream.avail_in = 0;
@@ -1092,17 +1095,17 @@ zstream_run0(struct zstream *z, Bytef *src, long len, int flush)
loop:
#ifndef RB_NOGVL_UBF_ASYNC_SAFE
- err = (int)(VALUE)rb_thread_call_without_gvl(zstream_run_func, (void *)&args,
- zstream_unblock_func, (void *)&args);
+ err = (int)(VALUE)rb_thread_call_without_gvl(zstream_run_func, (void *)args,
+ zstream_unblock_func, (void *)args);
#else
- err = (int)(VALUE)rb_nogvl(zstream_run_func, (void *)&args,
- zstream_unblock_func, (void *)&args,
+ err = (int)(VALUE)rb_nogvl(zstream_run_func, (void *)args,
+ zstream_unblock_func, (void *)args,
RB_NOGVL_UBF_ASYNC_SAFE);
#endif
/* retry if no exception is thrown */
- if (err == Z_OK && args.interrupt) {
- args.interrupt = 0;
+ if (err == Z_OK && args->interrupt) {
+ args->interrupt = 0;
goto loop;
}
@@ -1138,34 +1141,52 @@ zstream_run0(struct zstream *z, Bytef *src, long len, int flush)
rb_str_resize(old_input, 0);
}
- if (args.jump_state)
- rb_jump_tag(args.jump_state);
+ if (args->jump_state)
+ rb_jump_tag(args->jump_state);
+
+ return Qnil;
}
-struct zstream_run_synchronized_args {
- struct zstream *z;
- Bytef *src;
- long len;
- int flush;
-};
+static VALUE
+zstream_run_ensure(VALUE value_arg)
+{
+ struct zstream_run_args *args = (struct zstream_run_args *)value_arg;
+
+ /* Remove ZSTREAM_IN_PROGRESS flag to signal that this zstream is not in use. */
+ args->z->flags &= ~ZSTREAM_IN_PROGRESS;
+
+ return Qnil;
+}
static VALUE
zstream_run_synchronized(VALUE value_arg)
{
- struct zstream_run_synchronized_args *run_args = (struct zstream_run_synchronized_args *)value_arg;
- zstream_run0(run_args->z, run_args->src, run_args->len, run_args->flush);
+ struct zstream_run_args *args = (struct zstream_run_args *)value_arg;
+
+ /* Cannot start zstream while it is in progress. */
+ if (args->z->flags & ZSTREAM_IN_PROGRESS) {
+ rb_raise(cInProgressError, "zlib stream is in progress");
+ }
+ args->z->flags |= ZSTREAM_IN_PROGRESS;
+
+ rb_ensure(zstream_run_try, value_arg, zstream_run_ensure, value_arg);
+
return Qnil;
}
static void
zstream_run(struct zstream *z, Bytef *src, long len, int flush)
{
- struct zstream_run_synchronized_args run_args;
- run_args.z = z;
- run_args.src = src;
- run_args.len = len;
- run_args.flush = flush;
- rb_mutex_synchronize(z->mutex, zstream_run_synchronized, (VALUE)&run_args);
+ struct zstream_run_args args = {
+ .z = z,
+ .src = src,
+ .len = len,
+ .flush = flush,
+ .interrupt = 0,
+ .jump_state = 0,
+ .stream_output = !ZSTREAM_IS_GZFILE(z) && rb_block_given_p(),
+ };
+ rb_mutex_synchronize(z->mutex, zstream_run_synchronized, (VALUE)&args);
}
static VALUE
@@ -4615,6 +4636,7 @@ Init_zlib(void)
cMemError = rb_define_class_under(mZlib, "MemError", cZError);
cBufError = rb_define_class_under(mZlib, "BufError", cZError);
cVersionError = rb_define_class_under(mZlib, "VersionError", cZError);
+ cInProgressError = rb_define_class_under(mZlib, "InProgressError", cZError);
rb_define_module_function(mZlib, "zlib_version", rb_zlib_version, 0);
rb_define_module_function(mZlib, "adler32", rb_zlib_adler32, -1);
@@ -4922,6 +4944,7 @@ Init_zlib(void)
* - Zlib::MemError
* - Zlib::BufError
* - Zlib::VersionError
+ * - Zlib::InProgressError
*
*/
@@ -4996,6 +5019,20 @@ Init_zlib(void)
*
*/
+/*
+ * Document-class: Zlib::InProgressError
+ *
+ * Subclass of Zlib::Error. This error is raised when the zlib
+ * stream is currently in progress.
+ *
+ * For example:
+ *
+ * inflater = Zlib::Inflate.new
+ * inflater.inflate(compressed) do
+ * inflater.inflate(compressed) # Raises Zlib::InProgressError
+ * end
+ */
+
/*
* Document-class: Zlib::GzipFile::Error
*
diff --git a/gc.c b/gc.c
index 60387d2ab3bc24..38f0fd2ce18c26 100644
--- a/gc.c
+++ b/gc.c
@@ -659,11 +659,6 @@ typedef struct mark_stack {
size_t unused_cache_size;
} mark_stack_t;
-#if USE_RVARGC
-#define SIZE_POOL_COUNT 4
-#else
-#define SIZE_POOL_COUNT 1
-#endif
#define SIZE_POOL_EDEN_HEAP(size_pool) (&(size_pool)->eden_heap)
#define SIZE_POOL_TOMB_HEAP(size_pool) (&(size_pool)->tomb_heap)
@@ -681,11 +676,6 @@ typedef struct rb_heap_struct {
} rb_heap_t;
typedef struct rb_size_pool_struct {
-#if USE_RVARGC
- RVALUE *freelist;
- struct heap_page *using_page;
-#endif
-
short slot_size;
size_t allocatable_pages;
@@ -867,7 +857,6 @@ enum {
HEAP_PAGE_OBJ_LIMIT = (unsigned int)((HEAP_PAGE_SIZE - sizeof(struct heap_page_header))/sizeof(struct RVALUE)),
HEAP_PAGE_BITMAP_LIMIT = CEILDIV(CEILDIV(HEAP_PAGE_SIZE, sizeof(struct RVALUE)), BITS_BITLENGTH),
HEAP_PAGE_BITMAP_SIZE = (BITS_SIZE * HEAP_PAGE_BITMAP_LIMIT),
- HEAP_PAGE_BITMAP_PLANES = 4 /* RGENGC: mark, unprotected, uncollectible, marking */
};
#define HEAP_PAGE_ALIGN (1 << HEAP_PAGE_ALIGN_LOG)
#define HEAP_PAGE_SIZE HEAP_PAGE_ALIGN
@@ -2326,7 +2315,7 @@ newobj_init(VALUE klass, VALUE flags, int wb_protected, rb_objspace_t *objspace,
static inline void heap_add_freepage(rb_heap_t *heap, struct heap_page *page);
static struct heap_page *heap_next_freepage(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap);
-static inline void ractor_set_cache(rb_ractor_t *cr, struct heap_page *page);
+static inline void ractor_set_cache(rb_ractor_t *cr, struct heap_page *page, size_t size_pool_idx);
size_t
rb_gc_obj_slot_size(VALUE obj)
@@ -2356,18 +2345,19 @@ rb_gc_size_allocatable_p(size_t size)
}
static inline VALUE
-ractor_cached_free_region(rb_objspace_t *objspace, rb_ractor_t *cr, size_t size)
+ractor_cached_free_region(rb_objspace_t *objspace, rb_ractor_t *cr, size_t size_pool_idx)
{
- if (size > sizeof(RVALUE)) {
- return Qfalse;
- }
-
- RVALUE *p = cr->newobj_cache.freelist;
+ rb_ractor_newobj_size_pool_cache_t *cache = &cr->newobj_cache.size_pool_caches[size_pool_idx];
+ RVALUE *p = cache->freelist;
if (p) {
VALUE obj = (VALUE)p;
- cr->newobj_cache.freelist = p->as.free.next;
+ cache->freelist = p->as.free.next;
asan_unpoison_object(obj, true);
+#if RGENGC_CHECK_MODE
+ // zero clear
+ MEMZERO((char *)obj, char, size_pool_slot_size(size_pool_idx));
+#endif
return obj;
}
else {
@@ -2397,28 +2387,31 @@ heap_next_freepage(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t
}
static inline void
-ractor_set_cache(rb_ractor_t *cr, struct heap_page *page)
+ractor_set_cache(rb_ractor_t *cr, struct heap_page *page, size_t size_pool_idx)
{
gc_report(3, &rb_objspace, "ractor_set_cache: Using page %p\n", (void *)GET_PAGE_BODY(page->start));
- cr->newobj_cache.using_page = page;
- cr->newobj_cache.freelist = page->freelist;
+
+ rb_ractor_newobj_size_pool_cache_t *cache = &cr->newobj_cache.size_pool_caches[size_pool_idx];
+
+ cache->using_page = page;
+ cache->freelist = page->freelist;
page->free_slots = 0;
page->freelist = NULL;
- asan_unpoison_object((VALUE)cr->newobj_cache.freelist, false);
- GC_ASSERT(RB_TYPE_P((VALUE)cr->newobj_cache.freelist, T_NONE));
- asan_poison_object((VALUE)cr->newobj_cache.freelist);
+ asan_unpoison_object((VALUE)cache->freelist, false);
+ GC_ASSERT(RB_TYPE_P((VALUE)cache->freelist, T_NONE));
+ asan_poison_object((VALUE)cache->freelist);
}
static inline void
-ractor_cache_slots(rb_objspace_t *objspace, rb_ractor_t *cr)
+ractor_cache_slots(rb_objspace_t *objspace, rb_ractor_t *cr, size_t size_pool_idx)
{
ASSERT_vm_locking();
- rb_size_pool_t *size_pool = &size_pools[0];
+ rb_size_pool_t *size_pool = &size_pools[size_pool_idx];
struct heap_page *page = heap_next_freepage(objspace, size_pool, SIZE_POOL_EDEN_HEAP(size_pool));
- ractor_set_cache(cr, page);
+ ractor_set_cache(cr, page, size_pool_idx);
}
static inline VALUE
@@ -2431,53 +2424,29 @@ newobj_fill(VALUE obj, VALUE v1, VALUE v2, VALUE v3)
return obj;
}
-#if USE_RVARGC
-static inline rb_size_pool_t *
-size_pool_for_size(rb_objspace_t *objspace, size_t size)
+static inline size_t
+size_pool_idx_for_size(size_t size)
{
+#if USE_RVARGC
size_t slot_count = CEILDIV(size, sizeof(RVALUE));
/* size_pool_idx is ceil(log2(slot_count)) */
size_t size_pool_idx = 64 - nlz_int64(slot_count - 1);
if (size_pool_idx >= SIZE_POOL_COUNT) {
- rb_bug("size_pool_for_size: allocation size too large");
+ rb_bug("size_pool_idx_for_size: allocation size too large");
}
- rb_size_pool_t *size_pool = &size_pools[size_pool_idx];
- GC_ASSERT(size_pool->slot_size >= (short)size);
- GC_ASSERT(size_pool_idx == 0 || size_pools[size_pool_idx - 1].slot_size < (short)size);
-
- return size_pool;
-}
-
-
-static inline VALUE
-heap_get_freeobj(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap)
-{
- RVALUE *p = size_pool->freelist;
-
- if (UNLIKELY(p == NULL)) {
- struct heap_page *page = heap_next_freepage(objspace, size_pool, heap);
- size_pool->using_page = page;
-
- asan_unpoison_memory_region(&page->freelist, sizeof(RVALUE*), false);
- p = page->freelist;
- page->freelist = NULL;
- asan_poison_memory_region(&page->freelist, sizeof(RVALUE*));
- page->free_slots = 0;
- }
-
- asan_unpoison_object((VALUE)p, true);
- size_pool->freelist = p->as.free.next;
-
- return (VALUE)p;
-}
+ return size_pool_idx;
+#else
+ GC_ASSERT(size <= sizeof(RVALUE));
+ return 0;
#endif
+}
-ALWAYS_INLINE(static VALUE newobj_slowpath(VALUE klass, VALUE flags, rb_objspace_t *objspace, rb_ractor_t *cr, int wb_protected, size_t alloc_size));
+ALWAYS_INLINE(static VALUE newobj_slowpath(VALUE klass, VALUE flags, rb_objspace_t *objspace, rb_ractor_t *cr, int wb_protected, size_t size_pool_idx));
static inline VALUE
-newobj_slowpath(VALUE klass, VALUE flags, rb_objspace_t *objspace, rb_ractor_t *cr, int wb_protected, size_t alloc_size)
+newobj_slowpath(VALUE klass, VALUE flags, rb_objspace_t *objspace, rb_ractor_t *cr, int wb_protected, size_t size_pool_idx)
{
VALUE obj;
unsigned int lev;
@@ -2498,22 +2467,9 @@ newobj_slowpath(VALUE klass, VALUE flags, rb_objspace_t *objspace, rb_ractor_t *
}
}
- if (alloc_size <= sizeof(RVALUE)) {
- // allocate new slot
- while ((obj = ractor_cached_free_region(objspace, cr, alloc_size)) == Qfalse) {
- ractor_cache_slots(objspace, cr);
- }
- }
- else {
-#if USE_RVARGC
- rb_size_pool_t *size_pool = size_pool_for_size(objspace, alloc_size);
-
- obj = heap_get_freeobj(objspace, size_pool, SIZE_POOL_EDEN_HEAP(size_pool));
-
- memset((void *)obj, 0, size_pool->slot_size);
-#else
- rb_bug("unreachable when not using rvargc");
-#endif
+ // allocate new slot
+ while ((obj = ractor_cached_free_region(objspace, cr, size_pool_idx)) == Qfalse) {
+ ractor_cache_slots(objspace, cr, size_pool_idx);
}
GC_ASSERT(obj != 0);
newobj_init(klass, flags, wb_protected, objspace, obj);
@@ -2526,20 +2482,20 @@ newobj_slowpath(VALUE klass, VALUE flags, rb_objspace_t *objspace, rb_ractor_t *
}
NOINLINE(static VALUE newobj_slowpath_wb_protected(VALUE klass, VALUE flags,
- rb_objspace_t *objspace, rb_ractor_t *cr, size_t alloc_size));
+ rb_objspace_t *objspace, rb_ractor_t *cr, size_t size_pool_idx));
NOINLINE(static VALUE newobj_slowpath_wb_unprotected(VALUE klass, VALUE flags,
- rb_objspace_t *objspace, rb_ractor_t *cr, size_t alloc_size));
+ rb_objspace_t *objspace, rb_ractor_t *cr, size_t size_pool_idx));
static VALUE
-newobj_slowpath_wb_protected(VALUE klass, VALUE flags, rb_objspace_t *objspace, rb_ractor_t *cr, size_t alloc_size)
+newobj_slowpath_wb_protected(VALUE klass, VALUE flags, rb_objspace_t *objspace, rb_ractor_t *cr, size_t size_pool_idx)
{
- return newobj_slowpath(klass, flags, objspace, cr, TRUE, alloc_size);
+ return newobj_slowpath(klass, flags, objspace, cr, TRUE, size_pool_idx);
}
static VALUE
-newobj_slowpath_wb_unprotected(VALUE klass, VALUE flags, rb_objspace_t *objspace, rb_ractor_t *cr, size_t alloc_size)
+newobj_slowpath_wb_unprotected(VALUE klass, VALUE flags, rb_objspace_t *objspace, rb_ractor_t *cr, size_t size_pool_idx)
{
- return newobj_slowpath(klass, flags, objspace, cr, FALSE, alloc_size);
+ return newobj_slowpath(klass, flags, objspace, cr, FALSE, size_pool_idx);
}
static inline VALUE
@@ -2560,11 +2516,13 @@ newobj_of0(VALUE klass, VALUE flags, int wb_protected, rb_ractor_t *cr, size_t a
}
#endif
+ size_t size_pool_idx = size_pool_idx_for_size(alloc_size);
+
if ((!UNLIKELY(during_gc ||
ruby_gc_stressful ||
gc_event_hook_available_p(objspace)) &&
wb_protected &&
- (obj = ractor_cached_free_region(objspace, cr, alloc_size)) != Qfalse)) {
+ (obj = ractor_cached_free_region(objspace, cr, size_pool_idx)) != Qfalse)) {
newobj_init(klass, flags, wb_protected, objspace, obj);
}
@@ -2572,8 +2530,8 @@ newobj_of0(VALUE klass, VALUE flags, int wb_protected, rb_ractor_t *cr, size_t a
RB_DEBUG_COUNTER_INC(obj_newobj_slowpath);
obj = wb_protected ?
- newobj_slowpath_wb_protected(klass, flags, objspace, cr, alloc_size) :
- newobj_slowpath_wb_unprotected(klass, flags, objspace, cr, alloc_size);
+ newobj_slowpath_wb_protected(klass, flags, objspace, cr, size_pool_idx) :
+ newobj_slowpath_wb_unprotected(klass, flags, objspace, cr, size_pool_idx);
}
return obj;
@@ -3134,15 +3092,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
rb_id_table_foreach_values(RCLASS_CVC_TBL(obj), cvar_table_free_i, NULL);
rb_id_table_free(RCLASS_CVC_TBL(obj));
}
- if (RCLASS_SUBCLASSES(obj)) {
- if (BUILTIN_TYPE(obj) == T_MODULE) {
- rb_class_detach_module_subclasses(obj);
- }
- else {
- rb_class_detach_subclasses(obj);
- }
- RCLASS_SUBCLASSES(obj) = NULL;
- }
+ rb_class_remove_subclass_head(obj);
rb_class_remove_from_module_subclasses(obj);
rb_class_remove_from_super_subclasses(obj);
#if !USE_RVARGC
@@ -3307,10 +3257,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
if (RCLASS_CALLABLE_M_TBL(obj) != NULL) {
rb_id_table_free(RCLASS_CALLABLE_M_TBL(obj));
}
- if (RCLASS_SUBCLASSES(obj)) {
- rb_class_detach_subclasses(obj);
- RCLASS_SUBCLASSES(obj) = NULL;
- }
+ rb_class_remove_subclass_head(obj);
cc_table_free(objspace, obj, FALSE);
rb_class_remove_from_module_subclasses(obj);
rb_class_remove_from_super_subclasses(obj);
@@ -4921,7 +4868,7 @@ unlock_page_body(rb_objspace_t *objspace, struct heap_page_body *body)
}
static inline bool
-try_move_in_plane(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *page, uintptr_t p, bits_t bits, VALUE dest)
+try_move_plane(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *page, uintptr_t p, bits_t bits, VALUE dest)
{
if (bits) {
do {
@@ -4989,7 +4936,7 @@ try_move(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *sweep_page,
bits_t bits = mark_bits[index] & ~pin_bits[index];
bits >>= NUM_IN_PAGE(p);
- if (try_move_in_plane(objspace, heap, sweep_page, (uintptr_t)p, bits, dest)) return 1;
+ if (try_move_plane(objspace, heap, sweep_page, (uintptr_t)p, bits, dest)) return 1;
if (index == 0) {
p = cursor->start + (BITS_BITLENGTH - NUM_IN_PAGE(cursor->start));
@@ -5002,7 +4949,7 @@ try_move(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *sweep_page,
* marked, so we iterate using the marking bitmap */
for (size_t i = index + 1; i < HEAP_PAGE_BITMAP_LIMIT; i++) {
bits_t bits = mark_bits[i] & ~pin_bits[i];
- if (try_move_in_plane(objspace, heap, sweep_page, (uintptr_t)p, bits, dest)) return 1;
+ if (try_move_plane(objspace, heap, sweep_page, (uintptr_t)p, bits, dest)) return 1;
p += BITS_BITLENGTH;
}
@@ -5223,7 +5170,6 @@ gc_compact_finish(rb_objspace_t *objspace, rb_size_pool_t *pool, rb_heap_t *heap
gc_profile_record *record = gc_prof_record(objspace);
record->moved_objects = objspace->rcompactor.total_moved - record->moved_objects;
}
- rb_clear_constant_cache();
objspace->flags.during_compacting = FALSE;
}
@@ -5235,7 +5181,7 @@ struct gc_sweep_context {
};
static inline void
-gc_fill_swept_page_plane(rb_objspace_t *objspace, rb_heap_t *heap, uintptr_t p, bits_t bitset, bool *finished_compacting, struct gc_sweep_context *ctx)
+gc_fill_swept_plane(rb_objspace_t *objspace, rb_heap_t *heap, uintptr_t p, bits_t bitset, bool *finished_compacting, struct gc_sweep_context *ctx)
{
struct heap_page * sweep_page = ctx->page;
@@ -5312,13 +5258,13 @@ gc_fill_swept_page(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *s
/* *Want to move* objects are pinned but not marked. */
bitset = pin_bits[0] & ~mark_bits[0];
bitset >>= NUM_IN_PAGE(p); // Skip header / dead space bits
- gc_fill_swept_page_plane(objspace, heap, (uintptr_t)p, bitset, &finished_compacting, ctx);
+ gc_fill_swept_plane(objspace, heap, (uintptr_t)p, bitset, &finished_compacting, ctx);
p += ((BITS_BITLENGTH - NUM_IN_PAGE(p)) * sizeof(RVALUE));
for (int i = 1; i < HEAP_PAGE_BITMAP_LIMIT; i++) {
/* *Want to move* objects are pinned but not marked. */
bitset = pin_bits[i] & ~mark_bits[i];
- gc_fill_swept_page_plane(objspace, heap, (uintptr_t)p, bitset, &finished_compacting, ctx);
+ gc_fill_swept_plane(objspace, heap, (uintptr_t)p, bitset, &finished_compacting, ctx);
p += ((BITS_BITLENGTH) * sizeof(RVALUE));
}
@@ -5328,7 +5274,7 @@ gc_fill_swept_page(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *s
}
static inline void
-gc_plane_sweep(rb_objspace_t *objspace, rb_heap_t *heap, uintptr_t p, bits_t bitset, struct gc_sweep_context *ctx)
+gc_sweep_plane(rb_objspace_t *objspace, rb_heap_t *heap, uintptr_t p, bits_t bitset, struct gc_sweep_context *ctx)
{
struct heap_page * sweep_page = ctx->page;
short slot_size = sweep_page->slot_size;
@@ -5405,7 +5351,7 @@ gc_plane_sweep(rb_objspace_t *objspace, rb_heap_t *heap, uintptr_t p, bits_t bit
}
static inline void
-gc_page_sweep(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap, struct gc_sweep_context *ctx)
+gc_sweep_page(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap, struct gc_sweep_context *ctx)
{
struct heap_page *sweep_page = ctx->page;
@@ -5446,14 +5392,14 @@ gc_page_sweep(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *hea
bitset = ~bits[0];
bitset >>= NUM_IN_PAGE(p);
if (bitset) {
- gc_plane_sweep(objspace, heap, (uintptr_t)p, bitset, ctx);
+ gc_sweep_plane(objspace, heap, (uintptr_t)p, bitset, ctx);
}
p += (BITS_BITLENGTH - NUM_IN_PAGE(p));
for (i=1; i < HEAP_PAGE_BITMAP_LIMIT; i++) {
bitset = ~bits[i];
if (bitset) {
- gc_plane_sweep(objspace, heap, (uintptr_t)p, bitset, ctx);
+ gc_sweep_plane(objspace, heap, (uintptr_t)p, bitset, ctx);
}
p += BITS_BITLENGTH;
}
@@ -5475,7 +5421,7 @@ gc_page_sweep(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *hea
record->empty_objects += ctx->empty_slots;
}
#endif
- if (0) fprintf(stderr, "gc_page_sweep(%"PRIdSIZE"): total_slots: %d, freed_slots: %d, empty_slots: %d, final_slots: %d\n",
+ if (0) fprintf(stderr, "gc_sweep_page(%"PRIdSIZE"): total_slots: %d, freed_slots: %d, empty_slots: %d, final_slots: %d\n",
rb_gc_count(),
sweep_page->total_slots,
ctx->freed_slots, ctx->empty_slots, ctx->final_slots);
@@ -5597,13 +5543,6 @@ gc_sweep_start(rb_objspace_t *objspace)
for (int i = 0; i < SIZE_POOL_COUNT; i++) {
rb_size_pool_t *size_pool = &size_pools[i];
-#if USE_RVARGC
- heap_page_freelist_append(size_pool->using_page, size_pool->freelist);
-
- size_pool->using_page = NULL;
- size_pool->freelist = NULL;
-#endif
-
gc_sweep_start_heap(objspace, SIZE_POOL_EDEN_HEAP(size_pool));
}
@@ -5736,7 +5675,7 @@ gc_sweep_step(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *hea
.freed_slots = 0,
.empty_slots = 0,
};
- gc_page_sweep(objspace, size_pool, heap, &ctx);
+ gc_sweep_page(objspace, size_pool, heap, &ctx);
int free_slots = ctx.freed_slots + ctx.empty_slots;
heap->sweeping_page = list_next(&heap->pages, sweep_page, page_node);
@@ -6869,7 +6808,7 @@ gc_mark_imemo(rb_objspace_t *objspace, VALUE obj)
}
return;
case imemo_cref:
- gc_mark(objspace, RANY(obj)->as.imemo.cref.klass);
+ gc_mark(objspace, RANY(obj)->as.imemo.cref.klass_or_self);
gc_mark(objspace, (VALUE)RANY(obj)->as.imemo.cref.next);
gc_mark(objspace, RANY(obj)->as.imemo.cref.refinements);
return;
@@ -7926,7 +7865,7 @@ gc_marks_start(rb_objspace_t *objspace, int full_mark)
#if GC_ENABLE_INCREMENTAL_MARK
static inline void
-gc_marks_wb_unprotected_objects_in_plane(rb_objspace_t *objspace, uintptr_t p, bits_t bits)
+gc_marks_wb_unprotected_objects_plane(rb_objspace_t *objspace, uintptr_t p, bits_t bits)
{
if (bits) {
do {
@@ -7955,13 +7894,13 @@ gc_marks_wb_unprotected_objects(rb_objspace_t *objspace, rb_heap_t *heap)
bits_t bits = mark_bits[0] & wbun_bits[0];
bits >>= NUM_IN_PAGE(p);
- gc_marks_wb_unprotected_objects_in_plane(objspace, (uintptr_t)p, bits);
+ gc_marks_wb_unprotected_objects_plane(objspace, (uintptr_t)p, bits);
p += (BITS_BITLENGTH - NUM_IN_PAGE(p));
for (j=1; j>= NUM_IN_PAGE(p);
- rgengc_rememberset_mark_in_plane(objspace, (uintptr_t)p, bitset);
+ rgengc_rememberset_mark_plane(objspace, (uintptr_t)p, bitset);
p += (BITS_BITLENGTH - NUM_IN_PAGE(p));
for (j=1; j < HEAP_PAGE_BITMAP_LIMIT; j++) {
bitset = bits[j];
- rgengc_rememberset_mark_in_plane(objspace, (uintptr_t)p, bitset);
+ rgengc_rememberset_mark_plane(objspace, (uintptr_t)p, bitset);
p += BITS_BITLENGTH;
}
}
@@ -8710,14 +8649,18 @@ rb_obj_gc_flags(VALUE obj, ID* flags, size_t max)
void
rb_gc_ractor_newobj_cache_clear(rb_ractor_newobj_cache_t *newobj_cache)
{
- struct heap_page *page = newobj_cache->using_page;
- RVALUE *freelist = newobj_cache->freelist;
- RUBY_DEBUG_LOG("ractor using_page:%p freelist:%p", (void *)page, (void *)freelist);
+ for (size_t size_pool_idx = 0; size_pool_idx < SIZE_POOL_COUNT; size_pool_idx++) {
+ rb_ractor_newobj_size_pool_cache_t *cache = &newobj_cache->size_pool_caches[size_pool_idx];
+
+ struct heap_page *page = cache->using_page;
+ RVALUE *freelist = cache->freelist;
+ RUBY_DEBUG_LOG("ractor using_page:%p freelist:%p", (void *)page, (void *)freelist);
- heap_page_freelist_append(page, freelist);
+ heap_page_freelist_append(page, freelist);
- newobj_cache->using_page = NULL;
- newobj_cache->freelist = NULL;
+ cache->using_page = NULL;
+ cache->freelist = NULL;
+ }
}
void
@@ -9734,7 +9677,7 @@ gc_ref_update_imemo(rb_objspace_t *objspace, VALUE obj)
}
break;
case imemo_cref:
- UPDATE_IF_MOVED(objspace, RANY(obj)->as.imemo.cref.klass);
+ UPDATE_IF_MOVED(objspace, RANY(obj)->as.imemo.cref.klass_or_self);
TYPED_UPDATE_IF_MOVED(objspace, struct rb_cref_struct *, RANY(obj)->as.imemo.cref.next);
UPDATE_IF_MOVED(objspace, RANY(obj)->as.imemo.cref.refinements);
break;
@@ -12451,7 +12394,7 @@ current_process_time(struct timespec *ts)
if (getrusage(RUSAGE_SELF, &usage) == 0) {
time = usage.ru_utime;
ts->tv_sec = time.tv_sec;
- ts->tv_nsec = time.tv_usec * 1000;
+ ts->tv_nsec = (int32_t)time.tv_usec * 1000;
return true;
}
}
@@ -13599,7 +13542,6 @@ Init_GC(void)
rb_hash_aset(gc_constants, ID2SYM(rb_intern("RVALUE_SIZE")), SIZET2NUM(sizeof(RVALUE)));
rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_OBJ_LIMIT")), SIZET2NUM(HEAP_PAGE_OBJ_LIMIT));
rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_BITMAP_SIZE")), SIZET2NUM(HEAP_PAGE_BITMAP_SIZE));
- rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_BITMAP_PLANES")), SIZET2NUM(HEAP_PAGE_BITMAP_PLANES));
rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_SIZE")), SIZET2NUM(HEAP_PAGE_SIZE));
rb_hash_aset(gc_constants, ID2SYM(rb_intern("SIZE_POOL_COUNT")), LONG2FIX(SIZE_POOL_COUNT));
rb_hash_aset(gc_constants, ID2SYM(rb_intern("RVARGC_MAX_ALLOCATE_SIZE")), LONG2FIX(size_pool_slot_size(SIZE_POOL_COUNT - 1)));
diff --git a/gc.rb b/gc.rb
index 7a60710f66d538..45930c3dab7d2f 100644
--- a/gc.rb
+++ b/gc.rb
@@ -123,13 +123,13 @@ def self.count
# call-seq:
# GC.stat -> Hash
- # GC.stat(hash) -> hash
+ # GC.stat(hash) -> Hash
# GC.stat(:key) -> Numeric
#
# Returns a Hash containing information about the GC.
#
- # The contents of the hash are implementation specific and may be changed in
- # the future.
+ # The contents of the hash are implementation specific and may change in
+ # the future without notice.
#
# The hash includes information about internal statistics about GC such as:
#
@@ -191,7 +191,7 @@ def self.count
# it is overwritten and returned.
# This is intended to avoid probe effect.
#
- # This method is only expected to work on C Ruby.
+ # This method is only expected to work on CRuby.
def self.stat hash_or_key = nil
Primitive.gc_stat hash_or_key
end
diff --git a/gems/bundled_gems b/gems/bundled_gems
index a947b14ca06a9a..8c591db9fbf84a 100644
--- a/gems/bundled_gems
+++ b/gems/bundled_gems
@@ -11,6 +11,6 @@ net-pop 0.1.1 https://github.com/ruby/net-pop
net-smtp 0.3.0 https://github.com/ruby/net-smtp
matrix 0.4.2 https://github.com/ruby/matrix
prime 0.1.2 https://github.com/ruby/prime
-rbs 1.7.1 https://github.com/ruby/rbs
+rbs 1.8.0 https://github.com/ruby/rbs
typeprof 0.20.4 https://github.com/ruby/typeprof
-debug 1.3.4 https://github.com/ruby/debug
+debug 1.3.4 https://github.com/ruby/debug 1e1bc8262fcbd33199114b7573151c7754a3e505
diff --git a/hash.c b/hash.c
index aee671da34bc8b..270ddfb52251c6 100644
--- a/hash.c
+++ b/hash.c
@@ -6598,13 +6598,13 @@ env_dup(VALUE obj)
*
* === Creating a \Hash
*
- * Here are three ways to create a \Hash:
+ * You can create a \Hash object explicitly with:
*
- * - \Method Hash.new
- * - \Method Hash[]
- * - Literal form: {}.
+ * - A {hash literal}[doc/syntax/literals_rdoc.html#label-Hash+Literals].
*
- * ---
+ * You can convert certain objects to Hashes with:
+ *
+ * - \Method {Hash}[Kernel.html#method-i-Hash].
*
* You can create a \Hash by calling method Hash.new.
*
@@ -6614,8 +6614,6 @@ env_dup(VALUE obj)
* h # => {}
* h.class # => Hash
*
- * ---
- *
* You can create a \Hash by calling method Hash.[].
*
* Create an empty Hash:
@@ -6628,8 +6626,6 @@ env_dup(VALUE obj)
* h = Hash[foo: 0, bar: 1, baz: 2]
* h # => {:foo=>0, :bar=>1, :baz=>2}
*
- * ---
- *
* You can create a \Hash by using its literal form (curly braces).
*
* Create an empty \Hash:
diff --git a/include/ruby/internal/intern/class.h b/include/ruby/internal/intern/class.h
index 835e85c26d212b..2181ab93c746c2 100644
--- a/include/ruby/internal/intern/class.h
+++ b/include/ruby/internal/intern/class.h
@@ -158,7 +158,7 @@ VALUE rb_mod_included_modules(VALUE mod);
VALUE rb_mod_include_p(VALUE child, VALUE parent);
/**
- * Queries the module's ancestors. This routine gathers classes and modules
+ * Queries the module's ancestors. This routine gathers classes and modules
* that the passed module either inherits, includes, or prepends, then
* recursively applies that routine again and again to the collected entries
* until the list doesn't grow up.
@@ -187,6 +187,19 @@ VALUE rb_mod_ancestors(VALUE mod);
*/
VALUE rb_class_descendants(VALUE klass);
+/**
+ * Queries the class's direct descendants. This routine gathers classes that are
+ * direct subclasses of the given class,
+ * returning an array of classes that have the given class as a superclass.
+ * The returned array does not include singleton classes.
+ *
+ * @param[in] klass A class.
+ * @return An array of classes where `klass` is the `superclass`.
+ *
+ * @internal
+ */
+VALUE rb_class_subclasses(VALUE klass);
+
/**
* Generates an array of symbols, which are the list of method names defined in
* the passed class.
diff --git a/insns.def b/insns.def
index f759c1a5c51503..87624a0500931c 100644
--- a/insns.def
+++ b/insns.def
@@ -350,6 +350,7 @@ putspecialobject
(rb_num_t value_type)
()
(VALUE val)
+// attr bool leaf = (value_type == VM_SPECIAL_OBJECT_VMCORE); /* others may raise when allocating singleton */
{
enum vm_special_object_type type;
@@ -715,7 +716,7 @@ defineclass
/* enter scope */
vm_push_frame(ec, class_iseq, VM_FRAME_MAGIC_CLASS | VM_ENV_FLAG_LOCAL, klass,
GET_BLOCK_HANDLER(),
- (VALUE)vm_cref_push(ec, klass, NULL, FALSE),
+ (VALUE)vm_cref_push(ec, klass, NULL, FALSE, FALSE),
class_iseq->body->iseq_encoded, GET_SP(),
class_iseq->body->local_table_size,
class_iseq->body->stack_max);
diff --git a/internal/class.h b/internal/class.h
index ee36ad1967ff39..9edc821701de21 100644
--- a/internal/class.h
+++ b/internal/class.h
@@ -22,6 +22,7 @@
struct rb_subclass_entry {
VALUE klass;
struct rb_subclass_entry *next;
+ struct rb_subclass_entry *prev;
};
struct rb_iv_index_tbl_entry {
@@ -47,13 +48,13 @@ struct rb_classext_struct {
struct rb_id_table *cc_tbl; /* ID -> [[ci, cc1], cc2, ...] */
struct rb_id_table *cvc_tbl;
struct rb_subclass_entry *subclasses;
- struct rb_subclass_entry **parent_subclasses;
+ struct rb_subclass_entry *subclass_entry;
/**
* In the case that this is an `ICLASS`, `module_subclasses` points to the link
* in the module's `subclasses` list that indicates that the klass has been
* included. Hopefully that makes sense.
*/
- struct rb_subclass_entry **module_subclasses;
+ struct rb_subclass_entry *module_subclass_entry;
#if SIZEOF_SERIAL_T != SIZEOF_VALUE /* otherwise class_serial is in struct RClass */
rb_serial_t class_serial;
#endif
@@ -105,8 +106,8 @@ typedef struct rb_classext_struct rb_classext_t;
# define RCLASS_SERIAL(c) (RCLASS_EXT(c)->class_serial)
#endif
#define RCLASS_INCLUDER(c) (RCLASS_EXT(c)->includer)
-#define RCLASS_PARENT_SUBCLASSES(c) (RCLASS_EXT(c)->parent_subclasses)
-#define RCLASS_MODULE_SUBCLASSES(c) (RCLASS_EXT(c)->module_subclasses)
+#define RCLASS_SUBCLASS_ENTRY(c) (RCLASS_EXT(c)->subclass_entry)
+#define RCLASS_MODULE_SUBCLASS_ENTRY(c) (RCLASS_EXT(c)->module_subclass_entry)
#define RCLASS_ALLOCATOR(c) (RCLASS_EXT(c)->allocator)
#define RCLASS_SUBCLASSES(c) (RCLASS_EXT(c)->subclasses)
@@ -117,6 +118,7 @@ typedef struct rb_classext_struct rb_classext_t;
/* class.c */
void rb_class_subclass_add(VALUE super, VALUE klass);
void rb_class_remove_from_super_subclasses(VALUE);
+void rb_class_remove_subclass_head(VALUE);
int rb_singleton_class_internal_p(VALUE sklass);
VALUE rb_class_boot(VALUE);
VALUE rb_class_s_alloc(VALUE klass);
diff --git a/internal/gc.h b/internal/gc.h
index b7b29214cfc905..baf4f36a10eba3 100644
--- a/internal/gc.h
+++ b/internal/gc.h
@@ -67,9 +67,19 @@ struct rb_objspace; /* in vm_core.h */
rb_obj_write((VALUE)(a), UNALIGNED_MEMBER_ACCESS((VALUE *)(slot)), \
(VALUE)(b), __FILE__, __LINE__)
-typedef struct ractor_newobj_cache {
+#if USE_RVARGC
+# define SIZE_POOL_COUNT 4
+#else
+# define SIZE_POOL_COUNT 1
+#endif
+
+typedef struct ractor_newobj_size_pool_cache {
struct RVALUE *freelist;
struct heap_page *using_page;
+} rb_ractor_newobj_size_pool_cache_t;
+
+typedef struct ractor_newobj_cache {
+ rb_ractor_newobj_size_pool_cache_t size_pool_caches[SIZE_POOL_COUNT];
} rb_ractor_newobj_cache_t;
/* gc.c */
diff --git a/internal/symbol.h b/internal/symbol.h
index 6875d98db3b0d5..4f041330f954d7 100644
--- a/internal/symbol.h
+++ b/internal/symbol.h
@@ -28,6 +28,7 @@ int rb_is_local_name(VALUE name);
PUREFUNC(int rb_is_const_sym(VALUE sym));
PUREFUNC(int rb_is_attrset_sym(VALUE sym));
ID rb_make_internal_id(void);
+ID rb_make_temporary_id(size_t n);
void rb_gc_free_dsymbol(VALUE);
#if __has_builtin(__builtin_constant_p)
diff --git a/io.c b/io.c
index 366225089c0645..bc64938648b94d 100644
--- a/io.c
+++ b/io.c
@@ -11483,6 +11483,13 @@ nogvl_fcopyfile(struct copy_stream_struct *stp)
return 0;
if (lseek(stp->dst_fptr->fd, 0, SEEK_CUR) > (off_t)0) /* if dst IO was already written */
return 0;
+ if (fcntl(stp->dst_fptr->fd, F_GETFL) & O_APPEND) {
+ /* fcopyfile(3) appends src IO to dst IO and then truncates
+ * dst IO to src IO's original size. */
+ off_t end = lseek(stp->dst_fptr->fd, 0, SEEK_END);
+ lseek(stp->dst_fptr->fd, 0, SEEK_SET);
+ if (end > (off_t)0) return 0;
+ }
if (src_offset > (off_t)0) {
off_t r;
@@ -12224,6 +12231,18 @@ rb_stdio_set_default_encoding(void)
{
VALUE val = Qnil;
+#ifdef _WIN32
+ if (isatty(fileno(stdin))) {
+ rb_encoding *external = rb_locale_encoding();
+ rb_encoding *internal = rb_default_internal_encoding();
+ if (!internal) internal = rb_default_external_encoding();
+ io_encoding_set(RFILE(rb_stdin)->fptr,
+ rb_enc_from_encoding(external),
+ rb_enc_from_encoding(internal),
+ Qnil);
+ }
+ else
+#endif
rb_io_set_encoding(1, &val, rb_stdin);
rb_io_set_encoding(1, &val, rb_stdout);
rb_io_set_encoding(1, &val, rb_stderr);
diff --git a/io_buffer.c b/io_buffer.c
index bd902ed8d4421c..2d8019f4e92d91 100644
--- a/io_buffer.c
+++ b/io_buffer.c
@@ -687,7 +687,8 @@ rb_io_buffer_to_str(int argc, VALUE *argv, VALUE self)
return rb_usascii_str_new((char*)data->base + offset, length);
}
-void rb_io_buffer_get_mutable(VALUE self, void **base, size_t *size)
+void
+rb_io_buffer_get_mutable(VALUE self, void **base, size_t *size)
{
struct rb_io_buffer *data = NULL;
TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, data);
@@ -710,7 +711,8 @@ void rb_io_buffer_get_mutable(VALUE self, void **base, size_t *size)
rb_raise(rb_eRuntimeError, "Buffer is not allocated!");
}
-void rb_io_buffer_get_immutable(VALUE self, const void **base, size_t *size)
+void
+rb_io_buffer_get_immutable(VALUE self, const void **base, size_t *size)
{
struct rb_io_buffer *data = NULL;
TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, data);
@@ -729,7 +731,8 @@ void rb_io_buffer_get_immutable(VALUE self, const void **base, size_t *size)
rb_raise(rb_eRuntimeError, "Buffer is not allocated!");
}
-size_t rb_io_buffer_copy(VALUE self, VALUE source, size_t offset)
+size_t
+rb_io_buffer_copy(VALUE self, VALUE source, size_t offset)
{
const void *source_base = NULL;
size_t source_size = 0;
@@ -763,12 +766,14 @@ io_buffer_copy(VALUE self, VALUE source, VALUE offset)
return RB_SIZE2NUM(size);
}
-static int io_buffer_external_p(enum rb_io_buffer_flags flags)
+static int
+io_buffer_external_p(enum rb_io_buffer_flags flags)
{
return !(flags & (RB_IO_BUFFER_INTERNAL | RB_IO_BUFFER_MAPPED));
}
-void rb_io_buffer_resize(VALUE self, size_t size, size_t preserve)
+void
+rb_io_buffer_resize(VALUE self, size_t size, size_t preserve)
{
struct rb_io_buffer *data = NULL, updated;
TypedData_Get_Struct(self, struct rb_io_buffer, &rb_io_buffer_type, data);
@@ -828,7 +833,9 @@ io_buffer_resize(VALUE self, VALUE size, VALUE preserve)
return self;
}
-static void io_buffer_validate_type(size_t size, size_t offset) {
+static void
+io_buffer_validate_type(size_t size, size_t offset)
+{
if (offset > size) {
rb_raise(rb_eRuntimeError, "Type extends beyond end of buffer!");
}
@@ -859,7 +866,8 @@ union swapf32 {
float value;
};
-static float ruby_swapf32(float value)
+static float
+ruby_swapf32(float value)
{
union swapf32 swap = {.value = value};
swap.integral = ruby_swap32(swap.integral);
@@ -871,7 +879,8 @@ union swapf64 {
double value;
};
-static double ruby_swapf64(double value)
+static double
+ruby_swapf64(double value)
{
union swapf64 swap = {.value = value};
swap.integral = ruby_swap64(swap.integral);
@@ -969,7 +978,8 @@ io_buffer_get(VALUE self, VALUE type, VALUE _offset)
return rb_io_buffer_get(base, size, RB_SYM2ID(type), offset);
}
-void rb_io_buffer_set(const void* base, size_t size, ID type, size_t offset, VALUE value)
+void
+rb_io_buffer_set(const void* base, size_t size, ID type, size_t offset, VALUE value)
{
#define WRITE_TYPE(name) if (type == RB_IO_BUFFER_TYPE_##name) {io_buffer_write_##name(base, size, &offset, value); return;}
WRITE_TYPE(U8)
@@ -1013,7 +1023,8 @@ io_buffer_set(VALUE self, VALUE type, VALUE _offset, VALUE value)
return SIZET2NUM(offset);
}
-void rb_io_buffer_clear(VALUE self, uint8_t value, size_t offset, size_t length)
+void
+rb_io_buffer_clear(VALUE self, uint8_t value, size_t offset, size_t length)
{
void *base;
size_t size;
diff --git a/iseq.c b/iseq.c
index f0117d94ce6985..e42525cb9fa461 100644
--- a/iseq.c
+++ b/iseq.c
@@ -3310,6 +3310,23 @@ rb_iseq_trace_flag_cleared(const rb_iseq_t *iseq, size_t pos)
encoded_iseq_trace_instrument(&iseq_encoded[pos], 0, false);
}
+// We need to fire call events on instructions with b_call events if the block
+// is running as a method. So, if we are listening for call events, then
+// instructions that have b_call events need to become trace variants.
+// Use this function when making decisions about recompiling to trace variants.
+static inline rb_event_flag_t
+add_bmethod_events(rb_event_flag_t events)
+{
+ if (events & RUBY_EVENT_CALL) {
+ events |= RUBY_EVENT_B_CALL;
+ }
+ if (events & RUBY_EVENT_RETURN) {
+ events |= RUBY_EVENT_B_RETURN;
+ }
+ return events;
+}
+
+// Note, to support call/return events for bmethods, turnon_event can have more events than tpval.
static int
iseq_add_local_tracepoint(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line)
{
@@ -3365,9 +3382,12 @@ iseq_add_local_tracepoint_i(const rb_iseq_t *iseq, void *p)
}
int
-rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line)
+rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line, bool target_bmethod)
{
struct trace_set_local_events_struct data;
+ if (target_bmethod) {
+ turnon_events = add_bmethod_events(turnon_events);
+ }
data.turnon_events = turnon_events;
data.tpval = tpval;
data.target_line = target_line;
@@ -3399,6 +3419,7 @@ iseq_remove_local_tracepoint(const rb_iseq_t *iseq, VALUE tpval)
((rb_iseq_t *)iseq)->aux.exec.local_hooks = NULL;
}
+ local_events = add_bmethod_events(local_events);
for (pc = 0; pciseq_size;) {
rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pc);
pc += encoded_iseq_trace_instrument(&iseq_encoded[pc], pc_events & (local_events | iseq->aux.exec.global_trace_events), false);
@@ -3449,7 +3470,7 @@ rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events)
rb_event_flag_t enabled_events;
rb_event_flag_t local_events = iseq->aux.exec.local_hooks ? iseq->aux.exec.local_hooks->events : 0;
((rb_iseq_t *)iseq)->aux.exec.global_trace_events = turnon_events;
- enabled_events = turnon_events | local_events;
+ enabled_events = add_bmethod_events(turnon_events | local_events);
for (pc=0; pciseq_size;) {
rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pc);
diff --git a/iseq.h b/iseq.h
index eb46367379aac6..cc68b8d3f8a868 100644
--- a/iseq.h
+++ b/iseq.h
@@ -160,7 +160,7 @@ const rb_iseq_t *rb_iseq_ibf_load(VALUE str);
const rb_iseq_t *rb_iseq_ibf_load_bytes(const char *cstr, size_t);
VALUE rb_iseq_ibf_load_extra_data(VALUE str);
void rb_iseq_init_trace(rb_iseq_t *iseq);
-int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line);
+int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line, bool target_bmethod);
int rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval);
const rb_iseq_t *rb_iseq_load_iseq(VALUE fname);
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 02c2d19c83f492..d271086b254a9d 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -331,6 +331,7 @@ def list
desc "info GEM [OPTIONS]", "Show information for the given gem"
method_option "path", :type => :boolean, :banner => "Print full path to gem"
+ method_option "version", :type => :boolean, :banner => "Print gem version"
def info(gem_name)
require_relative "cli/info"
Info.new(options, gem_name).run
@@ -552,7 +553,7 @@ def licenses
method_option :version, :type => :boolean, :default => false, :aliases => "-v", :desc => "Set to show each gem version."
method_option :without, :type => :array, :default => [], :aliases => "-W", :banner => "GROUP[ GROUP...]", :desc => "Exclude gems that are part of the specified named group."
def viz
- SharedHelpers.major_deprecation 2, "The `viz` command has been moved to the `bundle-viz` gem, see https://github.com/rubygems/bundler-graph"
+ SharedHelpers.major_deprecation 2, "The `viz` command has been renamed to `graph` and moved to a plugin. See https://github.com/rubygems/bundler-graph"
require_relative "cli/viz"
Viz.new(options.dup).run
end
diff --git a/lib/bundler/cli/doctor.rb b/lib/bundler/cli/doctor.rb
index c28997bc7ddb32..43f1ca92e2d722 100644
--- a/lib/bundler/cli/doctor.rb
+++ b/lib/bundler/cli/doctor.rb
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require "rbconfig"
+require "shellwords"
module Bundler
class CLI::Doctor
@@ -22,14 +23,14 @@ def ldd_available?
end
def dylibs_darwin(path)
- output = `/usr/bin/otool -L "#{path}"`.chomp
+ output = `/usr/bin/otool -L #{path.shellescape}`.chomp
dylibs = output.split("\n")[1..-1].map {|l| l.match(DARWIN_REGEX).captures[0] }.uniq
# ignore @rpath and friends
dylibs.reject {|dylib| dylib.start_with? "@" }
end
def dylibs_ldd(path)
- output = `/usr/bin/ldd "#{path}"`.chomp
+ output = `/usr/bin/ldd #{path.shellescape}`.chomp
output.split("\n").map do |l|
match = l.match(LDD_REGEX)
next if match.nil?
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index e917ceb7d43ca0..31e3af5580634f 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -76,6 +76,7 @@ def run
"#{Bundler.preferred_gemfile_name}.tt" => Bundler.preferred_gemfile_name,
"lib/newgem.rb.tt" => "lib/#{namespaced_path}.rb",
"lib/newgem/version.rb.tt" => "lib/#{namespaced_path}/version.rb",
+ "sig/newgem.rbs.tt" => "sig/#{namespaced_path}.rbs",
"newgem.gemspec.tt" => "#{name}.gemspec",
"Rakefile.tt" => "Rakefile",
"README.md.tt" => "README.md",
diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb
index 3afed89cebfa5f..76c8cf60c01044 100644
--- a/lib/bundler/cli/info.rb
+++ b/lib/bundler/cli/info.rb
@@ -18,6 +18,7 @@ def run
if spec
return print_gem_path(spec) if @options[:path]
+ return print_gem_version(spec) if @options[:version]
print_gem_info(spec)
end
end
@@ -39,6 +40,10 @@ def spec_not_found(gem_name)
raise GemNotFound, Bundler::CLI::Common.gem_not_found_message(gem_name, Bundler.definition.dependencies)
end
+ def print_gem_version(spec)
+ Bundler.ui.info spec.version.to_s
+ end
+
def print_gem_path(spec)
name = spec.name
if name == "bundler"
@@ -70,7 +75,7 @@ def print_gem_info(spec)
gem_info << "\tPath: #{spec.full_gem_path}\n"
gem_info << "\tDefault Gem: yes" if spec.respond_to?(:default_gem?) && spec.default_gem?
- if spec.deleted_gem?
+ if name != "bundler" && spec.deleted_gem?
return Bundler.ui.warn "The gem #{name} has been deleted. Gemspec information is still available though:\n#{gem_info}"
end
diff --git a/lib/bundler/cli/update.rb b/lib/bundler/cli/update.rb
index 1adcaef67cfbe5..95a8886ea5ced7 100644
--- a/lib/bundler/cli/update.rb
+++ b/lib/bundler/cli/update.rb
@@ -66,7 +66,7 @@ def run
if locked_gems = Bundler.definition.locked_gems
previous_locked_info = locked_gems.specs.reduce({}) do |h, s|
- h[s.name] = { :spec => s, :version => s.version, :source => s.source.to_s }
+ h[s.name] = { :spec => s, :version => s.version, :source => s.source.identifier }
h
end
end
@@ -95,7 +95,7 @@ def run
end
locked_source = locked_info[:source]
- new_source = new_spec.source.to_s
+ new_source = new_spec.source.identifier
next if locked_source != new_source
new_version = new_spec.version
diff --git a/lib/bundler/compact_index_client/updater.rb b/lib/bundler/compact_index_client/updater.rb
index 06486f98cb74e6..d9b9cec0d45430 100644
--- a/lib/bundler/compact_index_client/updater.rb
+++ b/lib/bundler/compact_index_client/updater.rb
@@ -76,11 +76,6 @@ def update(local_path, remote_path, retrying = nil)
update(local_path, remote_path, :retrying)
end
- rescue Errno::EACCES
- raise Bundler::PermissionError,
- "Bundler does not have write access to create a temp directory " \
- "within #{Dir.tmpdir}. Bundler must have write access to your " \
- "systems temp directory to function properly. "
rescue Zlib::GzipFile::Error
raise Bundler::HTTPError
end
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index d88436bdbd47c9..c2a8e2ba42f78e 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -163,10 +163,6 @@ def gem_version_promoter
end
end
- def multisource_allowed?
- @multisource_allowed
- end
-
def resolve_only_locally!
@remote = false
sources.local_only!
@@ -375,44 +371,26 @@ def ensure_equivalent_gemfile_and_lockfile(explicit_flag = false)
added.concat new_platforms.map {|p| "* platform: #{p}" }
deleted.concat deleted_platforms.map {|p| "* platform: #{p}" }
- gemfile_sources = sources.lock_sources
-
- new_sources = gemfile_sources - @locked_sources
- deleted_sources = @locked_sources - gemfile_sources
-
new_deps = @dependencies - locked_dependencies
deleted_deps = locked_dependencies - @dependencies
- # Check if it is possible that the source is only changed thing
- if (new_deps.empty? && deleted_deps.empty?) && (!new_sources.empty? && !deleted_sources.empty?)
- new_sources.reject! {|source| (source.path? && source.path.exist?) || equivalent_rubygems_remotes?(source) }
- deleted_sources.reject! {|source| (source.path? && source.path.exist?) || equivalent_rubygems_remotes?(source) }
- end
-
- if @locked_sources != gemfile_sources
- if new_sources.any?
- added.concat new_sources.map {|source| "* source: #{source}" }
- end
-
- if deleted_sources.any?
- deleted.concat deleted_sources.map {|source| "* source: #{source}" }
- end
- end
-
added.concat new_deps.map {|d| "* #{pretty_dep(d)}" } if new_deps.any?
- if deleted_deps.any?
- deleted.concat deleted_deps.map {|d| "* #{pretty_dep(d)}" }
- end
+ deleted.concat deleted_deps.map {|d| "* #{pretty_dep(d)}" } if deleted_deps.any?
both_sources = Hash.new {|h, k| h[k] = [] }
@dependencies.each {|d| both_sources[d.name][0] = d }
- @locked_deps.each {|name, d| both_sources[name][1] = d.source }
+ locked_dependencies.each {|d| both_sources[d.name][1] = d }
- both_sources.each do |name, (dep, lock_source)|
- next if lock_source.nil? || (dep && lock_source.can_lock?(dep))
- gemfile_source_name = (dep && dep.source) || "no specified source"
- lockfile_source_name = lock_source
- changed << "* #{name} from `#{gemfile_source_name}` to `#{lockfile_source_name}`"
+ both_sources.each do |name, (dep, lock_dep)|
+ next if dep.nil? || lock_dep.nil?
+
+ gemfile_source = dep.source || sources.default_source
+ lock_source = lock_dep.source || sources.default_source
+ next if lock_source.include?(gemfile_source)
+
+ gemfile_source_name = dep.source ? gemfile_source.identifier : "no specified source"
+ lockfile_source_name = lock_dep.source ? lock_source.identifier : "no specified source"
+ changed << "* #{name} from `#{lockfile_source_name}` to `#{gemfile_source_name}`"
end
reason = change_reason
@@ -656,15 +634,13 @@ def converge_sources
end
def converge_dependencies
- (@dependencies + locked_dependencies).each do |dep|
+ changes = false
+
+ @dependencies.each do |dep|
if dep.source
dep.source = sources.get(dep.source)
end
- end
- changes = false
-
- @dependencies.each do |dep|
unless locked_dep = @locked_deps[dep.name]
changes = true
next
@@ -718,11 +694,8 @@ def converge_specs(specs)
deps << dep
end
- s.source = (dep && dep.source) || sources.get(s.source) unless multisource_allowed?
+ s.source = (dep && dep.source) || sources.get(s.source) || sources.default_source unless Bundler.frozen_bundle?
- # Don't add a spec to the list if its source is expired. For example,
- # if you change a Git gem to RubyGems.
- next if s.source.nil?
next if @unlock[:sources].include?(s.source.name)
# If the spec is from a path source and it doesn't exist anymore
@@ -751,7 +724,7 @@ def converge_specs(specs)
s.dependencies.replace(new_spec.dependencies)
end
- if dep.nil? && @dependencies.find {|d| s.name == d.name }
+ if dep.nil? && requested_dependencies.find {|d| s.name == d.name }
@unlock[:gems] << s.name
else
converged << s
@@ -859,12 +832,6 @@ def additional_base_requirements_for_resolve
end
end
- def equivalent_rubygems_remotes?(source)
- return false unless source.is_a?(Source::Rubygems)
-
- Bundler.settings[:allow_deployment_source_credential_changes] && source.equivalent_remotes?(sources.rubygems_remotes)
- end
-
def source_map
@source_map ||= SourceMap.new(sources, dependencies)
end
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index ed7b3e2d6b7902..1108fc3b78110a 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -18,6 +18,8 @@ def self.evaluate(gemfile, lockfile, unlock)
VALID_KEYS = %w[group groups git path glob name branch ref tag require submodules
platform platforms type source install_if gemfile].freeze
+ GITHUB_PULL_REQUEST_URL = %r{\Ahttps://github\.com/([A-Za-z0-9_\-\.]+/[A-Za-z0-9_\-\.]+)/pull/(\d+)\z}.freeze
+
attr_reader :gemspecs
attr_accessor :dependencies
@@ -278,8 +280,17 @@ def add_git_sources
warn_deprecated_git_source(:github, <<-'RUBY'.strip, 'Change any "reponame" :github sources to "username/reponame".')
"https://github.com/#{repo_name}.git"
RUBY
- repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
- "https://github.com/#{repo_name}.git"
+ if repo_name =~ GITHUB_PULL_REQUEST_URL
+ {
+ "git" => "https://github.com/#{$1}.git",
+ "branch" => "refs/pull/#{$2}/head",
+ "ref" => nil,
+ "tag" => nil,
+ }
+ else
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
+ "https://github.com/#{repo_name}.git"
+ end
end
git_source(:gist) do |repo_name|
@@ -365,7 +376,11 @@ def normalize_options(name, version, opts)
git_name = (git_names & opts.keys).last
if @git_sources[git_name]
- opts["git"] = @git_sources[git_name].call(opts[git_name])
+ git_opts = @git_sources[git_name].call(opts[git_name])
+ git_opts = { "git" => git_opts } if git_opts.is_a?(String)
+ opts.merge!(git_opts) do |key, _gemfile_value, _git_source_value|
+ raise GemfileError, %(The :#{key} option can't be used with `#{git_name}: #{opts[git_name].inspect}`)
+ end
end
%w[git path].each do |type|
diff --git a/lib/bundler/environment_preserver.rb b/lib/bundler/environment_preserver.rb
index a77f7e0816b83e..0f08e049d8d49d 100644
--- a/lib/bundler/environment_preserver.rb
+++ b/lib/bundler/environment_preserver.rb
@@ -38,7 +38,10 @@ def initialize(env, keys)
# Replaces `ENV` with the bundler environment variables backed up
def replace_with_backup
- ENV.replace(backup) unless Gem.win_platform?
+ unless Gem.win_platform?
+ ENV.replace(backup)
+ return
+ end
# Fallback logic for Windows below to workaround
# https://bugs.ruby-lang.org/issues/16798. Can be dropped once all
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index 6760edba42cf45..4eb228f3145081 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -38,8 +38,24 @@ def hash
identifier.hash
end
+ ##
+ # Does this locked specification satisfy +dependency+?
+ #
+ # NOTE: Rubygems default requirement is ">= 0", which doesn't match
+ # prereleases of 0 versions, like "0.0.0.dev" or "0.0.0.SNAPSHOT". However,
+ # bundler users expect those to work. We need to make sure that Gemfile
+ # dependencies without explicit requirements (which use ">= 0" under the
+ # hood by default) are still valid for locked specs using this kind of
+ # versions. The method implements an ad-hoc fix for that. A better solution
+ # might be to change default rubygems requirement of dependencies to be ">=
+ # 0.A" but that's a major refactoring likely to break things. Hopefully we
+ # can attempt it in the future.
+ #
+
def satisfies?(dependency)
- @name == dependency.name && dependency.requirement.satisfied_by?(Gem::Version.new(@version))
+ effective_requirement = dependency.requirement == Gem::Requirement.default ? Gem::Requirement.new(">= 0.A") : dependency.requirement
+
+ @name == dependency.name && effective_requirement.satisfied_by?(Gem::Version.new(@version))
end
def to_lock
diff --git a/lib/bundler/man/bundle-add.1 b/lib/bundler/man/bundle-add.1
index 1d1e32e2e50524..a94467e25f3605 100644
--- a/lib/bundler/man/bundle-add.1
+++ b/lib/bundler/man/bundle-add.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-ADD" "1" "November 2021" "" ""
+.TH "BUNDLE\-ADD" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
diff --git a/lib/bundler/man/bundle-binstubs.1 b/lib/bundler/man/bundle-binstubs.1
index 1447c0344828ed..6d1b1d4247d436 100644
--- a/lib/bundler/man/bundle-binstubs.1
+++ b/lib/bundler/man/bundle-binstubs.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-BINSTUBS" "1" "November 2021" "" ""
+.TH "BUNDLE\-BINSTUBS" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
diff --git a/lib/bundler/man/bundle-cache.1 b/lib/bundler/man/bundle-cache.1
index b774bfd39bd6d8..acbdae0df2f671 100644
--- a/lib/bundler/man/bundle-cache.1
+++ b/lib/bundler/man/bundle-cache.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-CACHE" "1" "November 2021" "" ""
+.TH "BUNDLE\-CACHE" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
diff --git a/lib/bundler/man/bundle-check.1 b/lib/bundler/man/bundle-check.1
index 1d490ca2ba48c8..e555c9b3996076 100644
--- a/lib/bundler/man/bundle-check.1
+++ b/lib/bundler/man/bundle-check.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-CHECK" "1" "November 2021" "" ""
+.TH "BUNDLE\-CHECK" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
diff --git a/lib/bundler/man/bundle-clean.1 b/lib/bundler/man/bundle-clean.1
index db13ad2bf53141..d4032475240bf8 100644
--- a/lib/bundler/man/bundle-clean.1
+++ b/lib/bundler/man/bundle-clean.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-CLEAN" "1" "November 2021" "" ""
+.TH "BUNDLE\-CLEAN" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
diff --git a/lib/bundler/man/bundle-config.1 b/lib/bundler/man/bundle-config.1
index 94f7b98d9ad5c1..5c07e227fddc26 100644
--- a/lib/bundler/man/bundle-config.1
+++ b/lib/bundler/man/bundle-config.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-CONFIG" "1" "November 2021" "" ""
+.TH "BUNDLE\-CONFIG" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-config\fR \- Set bundler configuration options
diff --git a/lib/bundler/man/bundle-doctor.1 b/lib/bundler/man/bundle-doctor.1
index 64ae8d1164fadb..87a7fe5f2f69df 100644
--- a/lib/bundler/man/bundle-doctor.1
+++ b/lib/bundler/man/bundle-doctor.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-DOCTOR" "1" "November 2021" "" ""
+.TH "BUNDLE\-DOCTOR" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-doctor\fR \- Checks the bundle for common problems
diff --git a/lib/bundler/man/bundle-exec.1 b/lib/bundler/man/bundle-exec.1
index 61b9833c3577ab..69adfa7c92c24e 100644
--- a/lib/bundler/man/bundle-exec.1
+++ b/lib/bundler/man/bundle-exec.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-EXEC" "1" "November 2021" "" ""
+.TH "BUNDLE\-EXEC" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-exec\fR \- Execute a command in the context of the bundle
diff --git a/lib/bundler/man/bundle-gem.1 b/lib/bundler/man/bundle-gem.1
index 42875fc1893a22..fae5c34e7e9aa3 100644
--- a/lib/bundler/man/bundle-gem.1
+++ b/lib/bundler/man/bundle-gem.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-GEM" "1" "November 2021" "" ""
+.TH "BUNDLE\-GEM" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
diff --git a/lib/bundler/man/bundle-info.1 b/lib/bundler/man/bundle-info.1
index 0804534c3ec821..9e1400ec56c993 100644
--- a/lib/bundler/man/bundle-info.1
+++ b/lib/bundler/man/bundle-info.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-INFO" "1" "November 2021" "" ""
+.TH "BUNDLE\-INFO" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-info\fR \- Show information for the given gem in your bundle
diff --git a/lib/bundler/man/bundle-init.1 b/lib/bundler/man/bundle-init.1
index 3171452cffd98b..612d16031c649c 100644
--- a/lib/bundler/man/bundle-init.1
+++ b/lib/bundler/man/bundle-init.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-INIT" "1" "November 2021" "" ""
+.TH "BUNDLE\-INIT" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-init\fR \- Generates a Gemfile into the current working directory
diff --git a/lib/bundler/man/bundle-inject.1 b/lib/bundler/man/bundle-inject.1
index 647f71a4449ccb..ded4d6d64bf59c 100644
--- a/lib/bundler/man/bundle-inject.1
+++ b/lib/bundler/man/bundle-inject.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-INJECT" "1" "November 2021" "" ""
+.TH "BUNDLE\-INJECT" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
diff --git a/lib/bundler/man/bundle-install.1 b/lib/bundler/man/bundle-install.1
index 51d70468f73bf6..6824dea3b0b73f 100644
--- a/lib/bundler/man/bundle-install.1
+++ b/lib/bundler/man/bundle-install.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-INSTALL" "1" "November 2021" "" ""
+.TH "BUNDLE\-INSTALL" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
diff --git a/lib/bundler/man/bundle-list.1 b/lib/bundler/man/bundle-list.1
index 3aba56cf0bdc09..a697173af9c438 100644
--- a/lib/bundler/man/bundle-list.1
+++ b/lib/bundler/man/bundle-list.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-LIST" "1" "November 2021" "" ""
+.TH "BUNDLE\-LIST" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-list\fR \- List all the gems in the bundle
diff --git a/lib/bundler/man/bundle-lock.1 b/lib/bundler/man/bundle-lock.1
index acd4a8b7be4324..ef515b03373799 100644
--- a/lib/bundler/man/bundle-lock.1
+++ b/lib/bundler/man/bundle-lock.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-LOCK" "1" "November 2021" "" ""
+.TH "BUNDLE\-LOCK" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
diff --git a/lib/bundler/man/bundle-open.1 b/lib/bundler/man/bundle-open.1
index 1dfa14d4c1632d..dd28566bdb0535 100644
--- a/lib/bundler/man/bundle-open.1
+++ b/lib/bundler/man/bundle-open.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-OPEN" "1" "November 2021" "" ""
+.TH "BUNDLE\-OPEN" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
diff --git a/lib/bundler/man/bundle-outdated.1 b/lib/bundler/man/bundle-outdated.1
index 1b5bf668537cb4..b9d50a1c7101fa 100644
--- a/lib/bundler/man/bundle-outdated.1
+++ b/lib/bundler/man/bundle-outdated.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-OUTDATED" "1" "November 2021" "" ""
+.TH "BUNDLE\-OUTDATED" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-outdated\fR \- List installed gems with newer versions available
diff --git a/lib/bundler/man/bundle-platform.1 b/lib/bundler/man/bundle-platform.1
index a62091625c1280..b1c859f64b2f11 100644
--- a/lib/bundler/man/bundle-platform.1
+++ b/lib/bundler/man/bundle-platform.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-PLATFORM" "1" "November 2021" "" ""
+.TH "BUNDLE\-PLATFORM" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-platform\fR \- Displays platform compatibility information
diff --git a/lib/bundler/man/bundle-pristine.1 b/lib/bundler/man/bundle-pristine.1
index 52d5b6a3aa9a57..6e4a0286660388 100644
--- a/lib/bundler/man/bundle-pristine.1
+++ b/lib/bundler/man/bundle-pristine.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-PRISTINE" "1" "November 2021" "" ""
+.TH "BUNDLE\-PRISTINE" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
diff --git a/lib/bundler/man/bundle-remove.1 b/lib/bundler/man/bundle-remove.1
index 1b960fe4293f20..0b4edd14149dc7 100644
--- a/lib/bundler/man/bundle-remove.1
+++ b/lib/bundler/man/bundle-remove.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-REMOVE" "1" "November 2021" "" ""
+.TH "BUNDLE\-REMOVE" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-remove\fR \- Removes gems from the Gemfile
diff --git a/lib/bundler/man/bundle-show.1 b/lib/bundler/man/bundle-show.1
index 733161318ff092..375699ddf083d2 100644
--- a/lib/bundler/man/bundle-show.1
+++ b/lib/bundler/man/bundle-show.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-SHOW" "1" "November 2021" "" ""
+.TH "BUNDLE\-SHOW" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
diff --git a/lib/bundler/man/bundle-update.1 b/lib/bundler/man/bundle-update.1
index 85916e9a9ee279..f5a79fe24ea9a6 100644
--- a/lib/bundler/man/bundle-update.1
+++ b/lib/bundler/man/bundle-update.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-UPDATE" "1" "November 2021" "" ""
+.TH "BUNDLE\-UPDATE" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-update\fR \- Update your gems to the latest available versions
diff --git a/lib/bundler/man/bundle-viz.1 b/lib/bundler/man/bundle-viz.1
index 742d30cd3136b6..f792aa6346071c 100644
--- a/lib/bundler/man/bundle-viz.1
+++ b/lib/bundler/man/bundle-viz.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE\-VIZ" "1" "November 2021" "" ""
+.TH "BUNDLE\-VIZ" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
diff --git a/lib/bundler/man/bundle.1 b/lib/bundler/man/bundle.1
index 4f4bf6b0b90c5c..b1458bf57b9324 100644
--- a/lib/bundler/man/bundle.1
+++ b/lib/bundler/man/bundle.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BUNDLE" "1" "November 2021" "" ""
+.TH "BUNDLE" "1" "December 2021" "" ""
.
.SH "NAME"
\fBbundle\fR \- Ruby Dependency Management
diff --git a/lib/bundler/man/gemfile.5 b/lib/bundler/man/gemfile.5
index 90fb67a3c74a89..1ac003a78008c7 100644
--- a/lib/bundler/man/gemfile.5
+++ b/lib/bundler/man/gemfile.5
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "GEMFILE" "5" "November 2021" "" ""
+.TH "GEMFILE" "5" "December 2021" "" ""
.
.SH "NAME"
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
@@ -506,6 +506,32 @@ gem "rails", :git => "git://github\.com/rails/rails\.git"
.P
Since the \fBgithub\fR method is a specialization of \fBgit_source\fR, it accepts a \fB:branch\fR named argument\.
.
+.P
+You can also directly pass a pull request URL:
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", :github => "https://github\.com/rails/rails/pull/43753"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Which is equivalent to:
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", :github => "rails/rails", branch: "refs/pull/43753/head"
+.
+.fi
+.
+.IP "" 0
+.
.SS "GIST"
If the git repository you want to use is hosted as a GitHub Gist and is public, you can use the :gist shorthand to specify the gist identifier (without the trailing "\.git")\.
.
diff --git a/lib/bundler/man/gemfile.5.ronn b/lib/bundler/man/gemfile.5.ronn
index ea7cf40e63c6da..0feaf582463327 100644
--- a/lib/bundler/man/gemfile.5.ronn
+++ b/lib/bundler/man/gemfile.5.ronn
@@ -372,6 +372,14 @@ Are both equivalent to
Since the `github` method is a specialization of `git_source`, it accepts a `:branch` named argument.
+You can also directly pass a pull request URL:
+
+ gem "rails", :github => "https://github.com/rails/rails/pull/43753"
+
+Which is equivalent to:
+
+ gem "rails", :github => "rails/rails", branch: "refs/pull/43753/head"
+
### GIST
If the git repository you want to use is hosted as a GitHub Gist and is public, you can use
diff --git a/lib/bundler/plugin/api/source.rb b/lib/bundler/plugin/api/source.rb
index f6f4ac4f0a26a2..32b1d0ee38141d 100644
--- a/lib/bundler/plugin/api/source.rb
+++ b/lib/bundler/plugin/api/source.rb
@@ -283,6 +283,7 @@ def to_lock
def to_s
"plugin source for #{@type} with uri #{@uri}"
end
+ alias_method :identifier, :to_s
# Note: Do not override if you don't know what you are doing.
def include?(other)
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index d26e2feb109ea6..5eb17a3921a046 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -30,10 +30,8 @@ def initialize(source_requirements, base, gem_version_promoter, additional_base_
@resolver = Molinillo::Resolver.new(self, self)
@search_for = {}
@base_dg = Molinillo::DependencyGraph.new
- aggregate_global_source = @source_requirements[:default].is_a?(Source::RubygemsAggregate)
@base.each do |ls|
dep = Dependency.new(ls.name, ls.version)
- ls.source = source_for(ls.name) unless aggregate_global_source
@base_dg.add_vertex(ls.name, DepProxy.get_proxy(dep, ls.platform), true)
end
additional_base_requirements.each {|d| @base_dg.add_vertex(d.name, d) }
@@ -272,7 +270,7 @@ def verify_gemfile_dependencies_are_found!(requirements)
rescue GemfileNotFound
nil
end
- message = String.new("Could not find gem '#{SharedHelpers.pretty_dependency(requirement)}' in #{source.to_err}#{cache_message}.\n")
+ message = String.new("Could not find gem '#{SharedHelpers.pretty_dependency(requirement)}' in #{source}#{cache_message}.\n")
message << "The source contains the following versions of '#{name}': #{formatted_versions_with_platforms(versions_with_platforms)}" if versions_with_platforms.any?
end
raise GemNotFound, message
@@ -371,7 +369,7 @@ def version_conflict_message(e)
o << if metadata_requirement
"is not available in #{relevant_source}"
else
- "in #{relevant_source.to_err}.\n"
+ "in #{relevant_source}.\n"
end
end
end,
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index 405ade95ddfab7..846b9cc3aa43cc 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -313,12 +313,11 @@ def bundler_ruby_lib
end
def clean_load_path
- bundler_lib = bundler_ruby_lib
-
loaded_gem_paths = Bundler.rubygems.loaded_gem_paths
$LOAD_PATH.reject! do |p|
- next if resolve_path(p).start_with?(bundler_lib)
+ resolved_path = resolve_path(p)
+ next if $LOADED_FEATURES.any? {|lf| lf.start_with?(resolved_path) }
loaded_gem_paths.delete(p)
end
$LOAD_PATH.uniq!
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index 434112ac8a940c..2a2b332cff7dc7 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -67,7 +67,7 @@ def inspect
"#<#{self.class}:0x#{object_id} #{self}>"
end
- def to_err
+ def identifier
to_s
end
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index b1dd9572c05567..8bc3aa17e9891f 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -98,26 +98,30 @@ def to_lock
out << " specs:\n"
end
- def to_err
+ def to_s
if remotes.empty?
"locally installed gems"
- elsif @allow_remote
+ elsif @allow_remote && @allow_cached && @allow_local
+ "rubygems repository #{remote_names}, cached gems or installed locally"
+ elsif @allow_remote && @allow_local
"rubygems repository #{remote_names} or installed locally"
- elsif @allow_cached
- "cached gems from rubygems repository #{remote_names} or installed locally"
+ elsif @allow_remote
+ "rubygems repository #{remote_names}"
+ elsif @allow_cached && @allow_local
+ "cached gems or installed locally"
else
"locally installed gems"
end
end
- def to_s
+ def identifier
if remotes.empty?
"locally installed gems"
else
- "rubygems repository #{remote_names} or installed locally"
+ "rubygems repository #{remote_names}"
end
end
- alias_method :name, :to_s
+ alias_method :name, :identifier
def specs
@specs ||= begin
@@ -262,10 +266,6 @@ def add_remote(source)
@remotes.unshift(uri) unless @remotes.include?(uri)
end
- def equivalent_remotes?(other_remotes)
- other_remotes.map(&method(:remove_auth)) == @remotes.map(&method(:remove_auth))
- end
-
def spec_names
if @allow_remote && dependency_api_available?
remote_specs.spec_names
@@ -334,7 +334,11 @@ def remote_names
end
def credless_remotes
- remotes.map(&method(:suppress_configured_credentials))
+ if Bundler.settings[:allow_deployment_source_credential_changes]
+ remotes.map(&method(:remove_auth))
+ else
+ remotes.map(&method(:suppress_configured_credentials))
+ end
end
def remotes_for_spec(spec)
diff --git a/lib/bundler/source/rubygems_aggregate.rb b/lib/bundler/source/rubygems_aggregate.rb
index 09cf4002eab537..99ef81ad54bded 100644
--- a/lib/bundler/source/rubygems_aggregate.rb
+++ b/lib/bundler/source/rubygems_aggregate.rb
@@ -16,7 +16,7 @@ def specs
@index
end
- def to_err
+ def identifier
to_s
end
diff --git a/lib/bundler/source_list.rb b/lib/bundler/source_list.rb
index d6310b78c063cf..a4773397c7df4c 100644
--- a/lib/bundler/source_list.rb
+++ b/lib/bundler/source_list.rb
@@ -98,7 +98,7 @@ def non_default_explicit_sources
end
def get(source)
- source_list_for(source).find {|s| equal_source?(source, s) || equivalent_source?(source, s) }
+ source_list_for(source).find {|s| equivalent_source?(source, s) }
end
def lock_sources
@@ -106,14 +106,14 @@ def lock_sources
end
def lock_other_sources
- (path_sources + git_sources + plugin_sources).sort_by(&:to_s)
+ (path_sources + git_sources + plugin_sources).sort_by(&:identifier)
end
def lock_rubygems_sources
if merged_gem_lockfile_sections?
[combine_rubygems_sources]
else
- rubygems_sources.sort_by(&:to_s)
+ rubygems_sources.sort_by(&:identifier)
end
end
@@ -173,7 +173,7 @@ def global_replacement_source(replacement_sources)
end
def different_sources?(lock_sources, replacement_sources)
- !equal_sources?(lock_sources, replacement_sources) && !equivalent_sources?(lock_sources, replacement_sources)
+ !equivalent_sources?(lock_sources, replacement_sources)
end
def rubygems_aggregate_class
@@ -210,34 +210,12 @@ def warn_on_git_protocol(source)
end
end
- def equal_sources?(lock_sources, replacement_sources)
- lock_sources.sort_by(&:to_s) == replacement_sources.sort_by(&:to_s)
- end
-
- def equal_source?(source, other_source)
- return source.include?(other_source) if source.is_a?(Source::Rubygems) && other_source.is_a?(Source::Rubygems)
-
- source == other_source
- end
-
- def equivalent_source?(source, other_source)
- return false unless Bundler.settings[:allow_deployment_source_credential_changes] && source.is_a?(Source::Rubygems)
-
- equivalent_rubygems_sources?([source], [other_source])
- end
-
def equivalent_sources?(lock_sources, replacement_sources)
- return false unless Bundler.settings[:allow_deployment_source_credential_changes]
-
- lock_rubygems_sources, lock_other_sources = lock_sources.partition {|s| s.is_a?(Source::Rubygems) }
- replacement_rubygems_sources, replacement_other_sources = replacement_sources.partition {|s| s.is_a?(Source::Rubygems) }
-
- equivalent_rubygems_sources?(lock_rubygems_sources, replacement_rubygems_sources) && equal_sources?(lock_other_sources, replacement_other_sources)
+ lock_sources.sort_by(&:identifier) == replacement_sources.sort_by(&:identifier)
end
- def equivalent_rubygems_sources?(lock_sources, replacement_sources)
- actual_remotes = replacement_sources.map(&:remotes).flatten.uniq
- lock_sources.all? {|s| s.equivalent_remotes?(actual_remotes) }
+ def equivalent_source?(source, other_source)
+ source == other_source
end
end
end
diff --git a/lib/bundler/templates/newgem/github/workflows/main.yml.tt b/lib/bundler/templates/newgem/github/workflows/main.yml.tt
index 952cd649a24520..6570d177afef32 100644
--- a/lib/bundler/templates/newgem/github/workflows/main.yml.tt
+++ b/lib/bundler/templates/newgem/github/workflows/main.yml.tt
@@ -10,11 +10,11 @@ on:
jobs:
build:
runs-on: ubuntu-latest
-
+ name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- - <%= RUBY_VERSION %>
+ - '<%= RUBY_VERSION %>'
steps:
- uses: actions/checkout@v2
diff --git a/lib/bundler/templates/newgem/sig/newgem.rbs.tt b/lib/bundler/templates/newgem/sig/newgem.rbs.tt
new file mode 100644
index 00000000000000..eb7b380bbb9c93
--- /dev/null
+++ b/lib/bundler/templates/newgem/sig/newgem.rbs.tt
@@ -0,0 +1,8 @@
+<%- config[:constant_array].each_with_index do |c, i| -%>
+<%= " " * i %>module <%= c %>
+<%- end -%>
+<%= " " * config[:constant_array].size %>VERSION: String
+<%= " " * config[:constant_array].size %># See the writing guide of rbs: https://github.com/ruby/rbs#guides
+<%- (config[:constant_array].size-1).downto(0) do |i| -%>
+<%= " " * i %>end
+<%- end -%>
diff --git a/lib/bundler/vendor/.document b/lib/bundler/vendor/.document
new file mode 100644
index 00000000000000..0c43bbd6b38177
--- /dev/null
+++ b/lib/bundler/vendor/.document
@@ -0,0 +1 @@
+# Vendored files do not need to be documented
diff --git a/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb b/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb
index 880170c06b04cd..9d94c2c0f098d3 100644
--- a/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb
+++ b/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb
@@ -32,13 +32,13 @@ def respond_to?(id, *args)
# rubocop:disable Style/MethodMissingSuper
# rubocop:disable Style/MissingRespondToMissing
- if ::RUBY_VERSION >= "3.0.0"
+ if ::Gem.ruby_version >= ::Gem::Version.new("3.0.0")
def method_missing(name, *args, **kwargs, &block)
with do |connection|
connection.send(name, *args, **kwargs, &block)
end
end
- elsif ::RUBY_VERSION >= "2.7.0"
+ elsif ::Gem.ruby_version >= ::Gem::Version.new("2.7.0")
ruby2_keywords def method_missing(name, *args, &block)
with do |connection|
connection.send(name, *args, &block)
diff --git a/lib/cgi.rb b/lib/cgi.rb
index b6ffbae3318af4..1a03d064f1b615 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -288,7 +288,7 @@
#
class CGI
- VERSION = "0.3.0"
+ VERSION = "0.3.1"
end
require 'cgi/core'
diff --git a/lib/cgi/cgi.gemspec b/lib/cgi/cgi.gemspec
index 5d23ef0f6144b7..3ba62b93f6d96d 100644
--- a/lib/cgi/cgi.gemspec
+++ b/lib/cgi/cgi.gemspec
@@ -23,9 +23,9 @@ Gem::Specification.new do |spec|
spec.metadata["source_code_uri"] = spec.homepage
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
- `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{\A(?:(?:test|spec|features)/|\.git)}) }
end
- spec.bindir = "exe"
+ spec.extensions = ["ext/cgi/escape/extconf.rb"]
spec.executables = []
spec.require_paths = ["lib"]
end
diff --git a/lib/cgi/cookie.rb b/lib/cgi/cookie.rb
index ae9ab58edefc9c..6b0d89ca3baa5f 100644
--- a/lib/cgi/cookie.rb
+++ b/lib/cgi/cookie.rb
@@ -159,7 +159,6 @@ def self.parse(raw_cookie)
raw_cookie.split(/;\s?/).each do |pairs|
name, values = pairs.split('=',2)
next unless name and values
- name = CGI.unescape(name)
values ||= ""
values = values.split('&').collect{|v| CGI.unescape(v,@@accept_charset) }
if cookies.has_key?(name)
diff --git a/lib/error_highlight/core_ext.rb b/lib/error_highlight/core_ext.rb
index 1ae180aeac8d5f..ebb6788b0206f6 100644
--- a/lib/error_highlight/core_ext.rb
+++ b/lib/error_highlight/core_ext.rb
@@ -29,7 +29,7 @@ def to_s
spot = ErrorHighlight.spot(node, **opts)
- rescue Errno::ENOENT, SyntaxError
+ rescue SystemCallError, SyntaxError
end
if spot
diff --git a/lib/irb/cmd/show_source.rb b/lib/irb/cmd/show_source.rb
index dcba1d1c71eb89..8f203ef1250aaf 100644
--- a/lib/irb/cmd/show_source.rb
+++ b/lib/irb/cmd/show_source.rb
@@ -64,7 +64,7 @@ def find_end(file, first_line)
prev_tokens = []
# chunk with line number
- tokens.chunk { |tok| tok[0][0] }.each do |lnum, chunk|
+ tokens.chunk { |tok| tok.pos[0] }.each do |lnum, chunk|
code = lines[0..lnum].join
prev_tokens.concat chunk
continue = lex.process_continue(prev_tokens)
diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb
index dc95065f97586e..f7a4535da788d6 100644
--- a/lib/irb/input-method.rb
+++ b/lib/irb/input-method.rb
@@ -318,6 +318,7 @@ def auto_indent(&block)
dialog.trap_key = nil
alt_d = [
[Reline::Key.new(nil, 0xE4, true)], # Normal Alt+d.
+ [27, 100], # Normal Alt+d when convert-meta isn't used.
[195, 164] # The "ä" that appears when Alt+d is pressed on xterm.
]
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb
index d7ac17bd790f92..f2069a2b5fd326 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -87,8 +87,8 @@ def set_input(io, p = nil, context: nil, &block)
tokens.each do |t|
partial_tokens << t
unprocessed_tokens << t
- if t[2].include?("\n")
- t_str = t[2]
+ if t.tok.include?("\n")
+ t_str = t.tok
t_str.each_line("\n") do |s|
code << s << "\n"
ltype, indent, continue, code_block_open = check_state(code, partial_tokens, context: context)
@@ -97,9 +97,10 @@ def set_input(io, p = nil, context: nil, &block)
end
unprocessed_tokens = []
else
- code << t[2]
+ code << t.tok
end
end
+
unless unprocessed_tokens.empty?
ltype, indent, continue, code_block_open = check_state(code, unprocessed_tokens, context: context)
result << @prompt.call(ltype, indent, continue || code_block_open, @line_no + line_num_offset)
@@ -107,6 +108,7 @@ def set_input(io, p = nil, context: nil, &block)
result
end
end
+
if p.respond_to?(:call)
@input = p
elsif block_given?
@@ -153,19 +155,19 @@ def self.ripper_lex_without_warning(code, context: nil)
pos_to_index = {}
lexer.scan.each do |t|
next if t.pos.first == 0
- if pos_to_index.has_key?(t[0])
- index = pos_to_index[t[0]]
+ if pos_to_index.has_key?(t.pos)
+ index = pos_to_index[t.pos]
found_tk = tokens[index]
- if ERROR_TOKENS.include?(found_tk[1]) && !ERROR_TOKENS.include?(t[1])
+ if ERROR_TOKENS.include?(found_tk.event) && !ERROR_TOKENS.include?(t.event)
tokens[index] = t
end
else
- pos_to_index[t[0]] = tokens.size
+ pos_to_index[t.pos] = tokens.size
tokens << t
end
end
else
- tokens = lexer.parse
+ tokens = lexer.parse.reject { |it| it.pos.first == 0 }
end
end
tokens
@@ -175,17 +177,17 @@ def self.ripper_lex_without_warning(code, context: nil)
def find_prev_spaces(line_index)
return 0 if @tokens.size == 0
- md = @tokens[0][2].match(/(\A +)/)
+ md = @tokens[0].tok.match(/(\A +)/)
prev_spaces = md.nil? ? 0 : md[1].count(' ')
line_count = 0
@tokens.each_with_index do |t, i|
- if t[2].include?("\n")
- line_count += t[2].count("\n")
+ if t.tok.include?("\n")
+ line_count += t.tok.count("\n")
if line_count >= line_index
return prev_spaces
end
if (@tokens.size - 1) > i
- md = @tokens[i + 1][2].match(/(\A +)/)
+ md = @tokens[i + 1].tok.match(/(\A +)/)
prev_spaces = md.nil? ? 0 : md[1].count(' ')
end
end
@@ -295,18 +297,18 @@ def lex
def process_continue(tokens = @tokens)
# last token is always newline
- if tokens.size >= 2 and tokens[-2][1] == :on_regexp_end
+ if tokens.size >= 2 and tokens[-2].event == :on_regexp_end
# end of regexp literal
return false
- elsif tokens.size >= 2 and tokens[-2][1] == :on_semicolon
+ elsif tokens.size >= 2 and tokens[-2].event == :on_semicolon
return false
- elsif tokens.size >= 2 and tokens[-2][1] == :on_kw and ['begin', 'else', 'ensure'].include?(tokens[-2][2])
+ elsif tokens.size >= 2 and tokens[-2].event == :on_kw and ['begin', 'else', 'ensure'].include?(tokens[-2].tok)
return false
- elsif !tokens.empty? and tokens.last[2] == "\\\n"
+ elsif !tokens.empty? and tokens.last.tok == "\\\n"
return true
- elsif tokens.size >= 1 and tokens[-1][1] == :on_heredoc_end # "EOH\n"
+ elsif tokens.size >= 1 and tokens[-1].event == :on_heredoc_end # "EOH\n"
return false
- elsif tokens.size >= 2 and defined?(Ripper::EXPR_BEG) and tokens[-2][3].anybits?(Ripper::EXPR_BEG | Ripper::EXPR_FNAME) and tokens[-2][2] !~ /\A\.\.\.?\z/
+ elsif tokens.size >= 2 and defined?(Ripper::EXPR_BEG) and tokens[-2].state.anybits?(Ripper::EXPR_BEG | Ripper::EXPR_FNAME) and tokens[-2].tok !~ /\A\.\.\.?\z/
# end of literal except for regexp
# endless range at end of line is not a continue
return true
@@ -316,7 +318,7 @@ def process_continue(tokens = @tokens)
def check_code_block(code, tokens = @tokens)
return true if tokens.empty?
- if tokens.last[1] == :on_heredoc_beg
+ if tokens.last.event == :on_heredoc_beg
return true
end
@@ -388,7 +390,7 @@ def check_code_block(code, tokens = @tokens)
end
if defined?(Ripper::EXPR_BEG)
- last_lex_state = tokens.last[3]
+ last_lex_state = tokens.last.state
if last_lex_state.allbits?(Ripper::EXPR_BEG)
return false
elsif last_lex_state.allbits?(Ripper::EXPR_DOT)
@@ -413,14 +415,14 @@ def process_nesting_level(tokens = @tokens)
tokens.each_with_index { |t, index|
# detecting one-liner method definition
if in_oneliner_def.nil?
- if t[3].allbits?(Ripper::EXPR_ENDFN)
+ if t.state.allbits?(Ripper::EXPR_ENDFN)
in_oneliner_def = :ENDFN
end
else
- if t[3].allbits?(Ripper::EXPR_ENDFN)
+ if t.state.allbits?(Ripper::EXPR_ENDFN)
# continuing
- elsif t[3].allbits?(Ripper::EXPR_BEG)
- if t[2] == '='
+ elsif t.state.allbits?(Ripper::EXPR_BEG)
+ if t.tok == '='
in_oneliner_def = :BODY
end
else
@@ -432,14 +434,14 @@ def process_nesting_level(tokens = @tokens)
end
end
- case t[1]
+ case t.event
when :on_lbracket, :on_lbrace, :on_lparen, :on_tlambeg
indent += 1
when :on_rbracket, :on_rbrace, :on_rparen
indent -= 1
when :on_kw
- next if index > 0 and tokens[index - 1][3].allbits?(Ripper::EXPR_FNAME)
- case t[2]
+ next if index > 0 and tokens[index - 1].state.allbits?(Ripper::EXPR_FNAME)
+ case t.tok
when 'do'
syntax_of_do = take_corresponding_syntax_to_kw_do(tokens, index)
indent += 1 if syntax_of_do == :method_calling
@@ -447,7 +449,7 @@ def process_nesting_level(tokens = @tokens)
indent += 1
when 'if', 'unless', 'while', 'until'
# postfix if/unless/while/until must be Ripper::EXPR_LABEL
- indent += 1 unless t[3].allbits?(Ripper::EXPR_LABEL)
+ indent += 1 unless t.state.allbits?(Ripper::EXPR_LABEL)
when 'end'
indent -= 1
end
@@ -459,14 +461,14 @@ def process_nesting_level(tokens = @tokens)
def is_method_calling?(tokens, index)
tk = tokens[index]
- if tk[3].anybits?(Ripper::EXPR_CMDARG) and tk[1] == :on_ident
+ if tk.state.anybits?(Ripper::EXPR_CMDARG) and tk.event == :on_ident
# The target method call to pass the block with "do".
return true
- elsif tk[3].anybits?(Ripper::EXPR_ARG) and tk[1] == :on_ident
- non_sp_index = tokens[0..(index - 1)].rindex{ |t| t[1] != :on_sp }
+ elsif tk.state.anybits?(Ripper::EXPR_ARG) and tk.event == :on_ident
+ non_sp_index = tokens[0..(index - 1)].rindex{ |t| t.event != :on_sp }
if non_sp_index
prev_tk = tokens[non_sp_index]
- if prev_tk[3].anybits?(Ripper::EXPR_DOT) and prev_tk[1] == :on_period
+ if prev_tk.state.anybits?(Ripper::EXPR_DOT) and prev_tk.event == :on_period
# The target method call with receiver to pass the block with "do".
return true
end
@@ -481,17 +483,17 @@ def take_corresponding_syntax_to_kw_do(tokens, index)
index.downto(0) do |i|
tk = tokens[i]
# In "continue", the token isn't the corresponding syntax to "do".
- non_sp_index = tokens[0..(i - 1)].rindex{ |t| t[1] != :on_sp }
+ non_sp_index = tokens[0..(i - 1)].rindex{ |t| t.event != :on_sp }
first_in_fomula = false
if non_sp_index.nil?
first_in_fomula = true
- elsif [:on_ignored_nl, :on_nl, :on_comment].include?(tokens[non_sp_index][1])
+ elsif [:on_ignored_nl, :on_nl, :on_comment].include?(tokens[non_sp_index].event)
first_in_fomula = true
end
if is_method_calling?(tokens, i)
syntax_of_do = :method_calling
break if first_in_fomula
- elsif tk[1] == :on_kw && %w{while until for}.include?(tk[2])
+ elsif tk.event == :on_kw && %w{while until for}.include?(tk.tok)
# A loop syntax in front of "do" found.
#
# while cond do # also "until" or "for"
@@ -512,14 +514,14 @@ def is_the_in_correspond_to_a_for(tokens, index)
index.downto(0) do |i|
tk = tokens[i]
# In "continue", the token isn't the corresponding syntax to "do".
- non_sp_index = tokens[0..(i - 1)].rindex{ |t| t[1] != :on_sp }
+ non_sp_index = tokens[0..(i - 1)].rindex{ |t| t.event != :on_sp }
first_in_fomula = false
if non_sp_index.nil?
first_in_fomula = true
- elsif [:on_ignored_nl, :on_nl, :on_comment].include?(tokens[non_sp_index][1])
+ elsif [:on_ignored_nl, :on_nl, :on_comment].include?(tokens[non_sp_index].event)
first_in_fomula = true
end
- if tk[1] == :on_kw && tk[2] == 'for'
+ if tk.event == :on_kw && tk.tok == 'for'
# A loop syntax in front of "do" found.
#
# while cond do # also "until" or "for"
@@ -541,14 +543,14 @@ def check_newline_depth_difference
@tokens.each_with_index do |t, index|
# detecting one-liner method definition
if in_oneliner_def.nil?
- if t[3].allbits?(Ripper::EXPR_ENDFN)
+ if t.state.allbits?(Ripper::EXPR_ENDFN)
in_oneliner_def = :ENDFN
end
else
- if t[3].allbits?(Ripper::EXPR_ENDFN)
+ if t.state.allbits?(Ripper::EXPR_ENDFN)
# continuing
- elsif t[3].allbits?(Ripper::EXPR_BEG)
- if t[2] == '='
+ elsif t.state.allbits?(Ripper::EXPR_BEG)
+ if t.tok == '='
in_oneliner_def = :BODY
end
else
@@ -560,7 +562,7 @@ def check_newline_depth_difference
end
end
- case t[1]
+ case t.event
when :on_ignored_nl, :on_nl, :on_comment
if index != (@tokens.size - 1) and in_oneliner_def != :BODY
depth_difference = 0
@@ -570,15 +572,16 @@ def check_newline_depth_difference
when :on_sp
next
end
- case t[1]
+
+ case t.event
when :on_lbracket, :on_lbrace, :on_lparen, :on_tlambeg
depth_difference += 1
open_brace_on_line += 1
when :on_rbracket, :on_rbrace, :on_rparen
depth_difference -= 1 if open_brace_on_line > 0
when :on_kw
- next if index > 0 and @tokens[index - 1][3].allbits?(Ripper::EXPR_FNAME)
- case t[2]
+ next if index > 0 and @tokens[index - 1].state.allbits?(Ripper::EXPR_FNAME)
+ case t.tok
when 'do'
syntax_of_do = take_corresponding_syntax_to_kw_do(@tokens, index)
depth_difference += 1 if syntax_of_do == :method_calling
@@ -586,7 +589,7 @@ def check_newline_depth_difference
depth_difference += 1
when 'if', 'unless', 'while', 'until', 'rescue'
# postfix if/unless/while/until/rescue must be Ripper::EXPR_LABEL
- unless t[3].allbits?(Ripper::EXPR_LABEL)
+ unless t.state.allbits?(Ripper::EXPR_LABEL)
depth_difference += 1
end
when 'else', 'elsif', 'ensure', 'when'
@@ -619,14 +622,14 @@ def check_corresponding_token_depth(lines, line_index)
@tokens.each_with_index do |t, index|
# detecting one-liner method definition
if in_oneliner_def.nil?
- if t[3].allbits?(Ripper::EXPR_ENDFN)
+ if t.state.allbits?(Ripper::EXPR_ENDFN)
in_oneliner_def = :ENDFN
end
else
- if t[3].allbits?(Ripper::EXPR_ENDFN)
+ if t.state.allbits?(Ripper::EXPR_ENDFN)
# continuing
- elsif t[3].allbits?(Ripper::EXPR_BEG)
- if t[2] == '='
+ elsif t.state.allbits?(Ripper::EXPR_BEG)
+ if t.tok == '='
in_oneliner_def = :BODY
end
else
@@ -643,7 +646,7 @@ def check_corresponding_token_depth(lines, line_index)
end
end
- case t[1]
+ case t.event
when :on_ignored_nl, :on_nl, :on_comment
if in_oneliner_def != :BODY
corresponding_token_depth = nil
@@ -654,11 +657,12 @@ def check_corresponding_token_depth(lines, line_index)
end
next
when :on_sp
- spaces_at_line_head = t[2].count(' ') if is_first_spaces_of_line
+ spaces_at_line_head = t.tok.count(' ') if is_first_spaces_of_line
is_first_spaces_of_line = false
next
end
- case t[1]
+
+ case t.event
when :on_lbracket, :on_lbrace, :on_lparen, :on_tlambeg
spaces_of_nest.push(spaces_at_line_head + open_brace_on_line * 2)
open_brace_on_line += 1
@@ -671,8 +675,8 @@ def check_corresponding_token_depth(lines, line_index)
end
open_brace_on_line -= 1
when :on_kw
- next if index > 0 and @tokens[index - 1][3].allbits?(Ripper::EXPR_FNAME)
- case t[2]
+ next if index > 0 and @tokens[index - 1].state.allbits?(Ripper::EXPR_FNAME)
+ case t.tok
when 'do'
syntax_of_do = take_corresponding_syntax_to_kw_do(@tokens, index)
if syntax_of_do == :method_calling
@@ -681,16 +685,20 @@ def check_corresponding_token_depth(lines, line_index)
when 'def', 'case', 'for', 'begin', 'class', 'module'
spaces_of_nest.push(spaces_at_line_head)
when 'rescue'
- unless t[3].allbits?(Ripper::EXPR_LABEL)
+ unless t.state.allbits?(Ripper::EXPR_LABEL)
corresponding_token_depth = spaces_of_nest.last
end
when 'if', 'unless', 'while', 'until'
# postfix if/unless/while/until must be Ripper::EXPR_LABEL
- unless t[3].allbits?(Ripper::EXPR_LABEL)
+ unless t.state.allbits?(Ripper::EXPR_LABEL)
spaces_of_nest.push(spaces_at_line_head)
end
- when 'else', 'elsif', 'ensure', 'when', 'in'
+ when 'else', 'elsif', 'ensure', 'when'
corresponding_token_depth = spaces_of_nest.last
+ when 'in'
+ if in_keyword_case_scope?
+ corresponding_token_depth = spaces_of_nest.last
+ end
when 'end'
if is_first_printable_of_line
corresponding_token_depth = spaces_of_nest.pop
@@ -712,7 +720,7 @@ def check_string_literal(tokens)
end_type = []
while i < tokens.size
t = tokens[i]
- case t[1]
+ case t.event
when *end_type.last
start_token.pop
end_type.pop
@@ -725,7 +733,7 @@ def check_string_literal(tokens)
when :on_symbeg
acceptable_single_tokens = %i{on_ident on_const on_op on_cvar on_ivar on_gvar on_kw on_int on_backtick}
if (i + 1) < tokens.size
- if acceptable_single_tokens.all?{ |st| tokens[i + 1][1] != st }
+ if acceptable_single_tokens.all?{ |st| tokens[i + 1].event != st }
start_token << t
end_type << :on_tstring_end
else
@@ -749,9 +757,11 @@ def check_string_literal(tokens)
def process_literal_type(tokens = @tokens)
start_token = check_string_literal(tokens)
- case start_token[1]
+ return nil if start_token == ""
+
+ case start_token.event
when :on_tstring_beg
- case start_token[2]
+ case start_token.tok
when ?" then ?"
when /^%.$/ then ?"
when /^%Q.$/ then ?"
@@ -766,7 +776,7 @@ def process_literal_type(tokens = @tokens)
when :on_qsymbols_beg then ?]
when :on_symbols_beg then ?]
when :on_heredoc_beg
- start_token[2] =~ /<<[-~]?(['"`])[_a-zA-Z0-9]+\1/
+ start_token.tok =~ /<<[-~]?(['"`])[_a-zA-Z0-9]+\1/
case $1
when ?" then ?"
when ?' then ?'
@@ -794,6 +804,7 @@ def check_termination_in_prev_line(code, context: nil)
false
end
end
+
if index
first_token = nil
last_line_tokens = tokens[(index + 1)..(tokens.size - 1)]
@@ -803,6 +814,7 @@ def check_termination_in_prev_line(code, context: nil)
break
end
end
+
if first_token.nil?
return false
elsif first_token && first_token.state == Ripper::EXPR_DOT
@@ -829,5 +841,21 @@ def heredoc_scope?
heredoc_tokens = @tokens.select { |t| [:on_heredoc_beg, :on_heredoc_end].include?(t.event) }
heredoc_tokens[-1]&.event == :on_heredoc_beg
end
+
+ def in_keyword_case_scope?
+ kw_tokens = @tokens.select { |t| t.event == :on_kw && ['case', 'for', 'end'].include?(t.tok) }
+ counter = 0
+ kw_tokens.reverse.each do |t|
+ if t.tok == 'case'
+ return true if counter.zero?
+ counter += 1
+ elsif t.tok == 'for'
+ counter += 1
+ elsif t.tok == 'end'
+ counter -= 1
+ end
+ end
+ false
+ end
end
# :startdoc:
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index c9eac5670269b9..52788ab3abcad1 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -386,38 +386,64 @@ def libpath_env
end
end
- def xsystem command, opts = nil
+ def expand_command(commands, envs = libpath_env)
varpat = /\$\((\w+)\)|\$\{(\w+)\}/
- if varpat =~ command
- vars = Hash.new {|h, k| h[k] = ENV[k]}
- command = command.dup
- nil while command.gsub!(varpat) {vars[$1||$2]}
+ vars = nil
+ expand = proc do |command|
+ case command
+ when Array
+ command.map(&expand)
+ when String
+ if varpat =~ command
+ vars ||= Hash.new {|h, k| h[k] = ENV[k]}
+ command = command.dup
+ nil while command.gsub!(varpat) {vars[$1||$2]}
+ end
+ command
+ else
+ command
+ end
+ end
+ if Array === commands
+ env, *commands = commands if Hash === commands.first
+ envs.merge!(env) if env
end
+ return envs, expand[commands]
+ end
+
+ def env_quote(envs)
+ envs.map {|e, v| "#{e}=#{v.quote}"}
+ end
+
+ def xsystem command, opts = nil
+ env, command = expand_command(command)
Logging::open do
- puts command.quote
+ puts [env_quote(env), command.quote].join(' ')
if opts and opts[:werror]
result = nil
Logging.postpone do |log|
- output = IO.popen(libpath_env, command, &:read)
+ output = IO.popen(env, command, &:read)
result = ($?.success? and File.zero?(log.path))
output
end
result
else
- system(libpath_env, command)
+ system(env, *command)
end
end
end
def xpopen command, *mode, &block
+ env, commands = expand_command(command)
+ command = [env_quote(env), command].join(' ')
Logging::open do
case mode[0]
- when nil, /^r/
+ when nil, Hash, /^r/
puts "#{command} |"
else
puts "| #{command}"
end
- IO.popen(libpath_env, command, *mode, &block)
+ IO.popen(env, commands, *mode, &block)
end
end
@@ -1830,16 +1856,24 @@ def dir_config(target, idefault=nil, ldefault=nil)
# invoked with the option and a stripped output string is returned
# without modifying any of the global values mentioned above.
def pkg_config(pkg, option=nil)
+ _, ldir = dir_config(pkg)
+ if ldir
+ pkg_config_path = "#{ldir}/pkgconfig"
+ if File.directory?(pkg_config_path)
+ Logging.message("PKG_CONFIG_PATH = %s\n", pkg_config_path)
+ envs = ["PKG_CONFIG_PATH"=>[pkg_config_path, ENV["PKG_CONFIG_PATH"]].compact.join(File::PATH_SEPARATOR)]
+ end
+ end
if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig)
# if and only if package specific config command is given
elsif ($PKGCONFIG ||=
(pkgconfig = with_config("pkg-config", ("pkg-config" unless CROSS_COMPILING))) &&
find_executable0(pkgconfig) && pkgconfig) and
- xsystem("#{$PKGCONFIG} --exists #{pkg}")
+ xsystem([*envs, $PKGCONFIG, "--exists", pkg])
# default to pkg-config command
pkgconfig = $PKGCONFIG
get = proc {|opt|
- opt = xpopen("#{$PKGCONFIG} --#{opt} #{pkg}", err:[:child, :out], &:read)
+ opt = xpopen([*envs, $PKGCONFIG, "--#{opt}", pkg], err:[:child, :out], &:read)
Logging.open {puts opt.each_line.map{|s|"=> #{s.inspect}"}}
opt.strip if $?.success?
}
@@ -1850,7 +1884,7 @@ def pkg_config(pkg, option=nil)
end
if pkgconfig
get ||= proc {|opt|
- opt = xpopen("#{pkgconfig} --#{opt}", err:[:child, :out], &:read)
+ opt = xpopen([*envs, pkgconfig, "--#{opt}"], err:[:child, :out], &:read)
Logging.open {puts opt.each_line.map{|s|"=> #{s.inspect}"}}
opt.strip if $?.success?
}
diff --git a/lib/ostruct.rb b/lib/ostruct.rb
index a40729bb5d4178..c2de7a493d8cd6 100644
--- a/lib/ostruct.rb
+++ b/lib/ostruct.rb
@@ -93,16 +93,16 @@
# o.methods = [:foo, :bar]
# o.methods # => [:foo, :bar]
#
-# To help remedy clashes, OpenStruct uses only protected/private methods ending with `!`
-# and defines aliases for builtin public methods by adding a `!`:
+# To help remedy clashes, OpenStruct uses only protected/private methods ending with !
+# and defines aliases for builtin public methods by adding a !
:
#
# o = OpenStruct.new(make: 'Bentley', class: :luxury)
# o.class # => :luxury
# o.class! # => OpenStruct
#
-# It is recommended (but not enforced) to not use fields ending in `!`;
+# It is recommended (but not enforced) to not use fields ending in !
;
# Note that a subclass' methods may not be overwritten, nor can OpenStruct's own methods
-# ending with `!`.
+# ending with !
.
#
# For all these reasons, consider not using OpenStruct at all.
#
@@ -279,7 +279,7 @@ def freeze
# :call-seq:
# ostruct[name] -> object
#
- # Returns the value of an attribute, or `nil` if there is no such attribute.
+ # Returns the value of an attribute, or +nil+ if there is no such attribute.
#
# require "ostruct"
# person = OpenStruct.new("name" => "John Smith", "age" => 70)
@@ -452,7 +452,7 @@ def init_with(coder) # :nodoc:
update_to_values!(h)
end
- # Make all public methods (builtin or our own) accessible with `!`:
+ # Make all public methods (builtin or our own) accessible with !
:
instance_methods.each do |method|
new_name = "#{method}!"
alias_method new_name, method
diff --git a/lib/pp.rb b/lib/pp.rb
index 72480e53047294..eb8ea1e10a296b 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -61,6 +61,15 @@
# Tanaka Akira
class PP < PrettyPrint
+ def PP.width_for(out)
+ begin
+ require 'io/console'
+ _, width = out.winsize
+ rescue LoadError, NoMethodError, SystemCallError
+ end
+ (width || ENV['COLUMNS']&.to_i&.nonzero? || 80) - 1
+ end
+
# Outputs +obj+ to +out+ in pretty printed format of
# +width+ columns in width.
#
@@ -68,7 +77,7 @@ class PP < PrettyPrint
# If +width+ is omitted, 79 is assumed.
#
# PP.pp returns +out+.
- def PP.pp(obj, out=$>, width=79)
+ def PP.pp(obj, out=$>, width=width_for(out))
q = PP.new(out, width)
q.guard_inspect_key {q.pp obj}
q.flush
diff --git a/lib/readline.rb b/lib/readline.rb
index 6cc923cb2fb9fc..29cdf3a14f013b 100644
--- a/lib/readline.rb
+++ b/lib/readline.rb
@@ -2,5 +2,6 @@
require 'readline.so'
rescue LoadError
require 'reline' unless defined? Reline
+ Object.send(:remove_const, :Readline) if Object.const_defined?(:Readline)
Readline = Reline
end
diff --git a/lib/reline/ansi.rb b/lib/reline/ansi.rb
index ae6961e29fad03..c564873241999a 100644
--- a/lib/reline/ansi.rb
+++ b/lib/reline/ansi.rb
@@ -4,6 +4,19 @@
require_relative 'terminfo'
class Reline::ANSI
+ CAPNAME_KEY_BINDINGS = {
+ 'khome' => :ed_move_to_beg,
+ 'kend' => :ed_move_to_end,
+ 'kcuu1' => :ed_prev_history,
+ 'kcud1' => :ed_next_history,
+ 'kcuf1' => :ed_next_char,
+ 'kcub1' => :ed_prev_char,
+ 'cuu' => :ed_prev_history,
+ 'cud' => :ed_next_history,
+ 'cuf' => :ed_next_char,
+ 'cub' => :ed_prev_char,
+ }
+
if Reline::Terminfo.enabled?
Reline::Terminfo.setupterm(0, 2)
end
@@ -44,20 +57,23 @@ def self.set_default_key_bindings(config)
end
def self.set_default_key_bindings_terminfo(config)
- {
- Reline::Terminfo.tigetstr('khome').bytes => :ed_move_to_beg,
- Reline::Terminfo.tigetstr('kend').bytes => :ed_move_to_end,
- Reline::Terminfo.tigetstr('kcuu1').bytes => :ed_prev_history,
- Reline::Terminfo.tigetstr('kcud1').bytes => :ed_next_history,
- Reline::Terminfo.tigetstr('kcuf1').bytes => :ed_next_char,
- Reline::Terminfo.tigetstr('kcub1').bytes => :ed_prev_char,
- # Escape sequences that omit the move distance and are set to defaults
- # value 1 may be sometimes sent by pressing the arrow-key.
- Reline::Terminfo.tigetstr('cuu').sub(/%p1%d/, '').bytes => :ed_prev_history,
- Reline::Terminfo.tigetstr('cud').sub(/%p1%d/, '').bytes => :ed_next_history,
- Reline::Terminfo.tigetstr('cuf').sub(/%p1%d/, '').bytes => :ed_next_char,
- Reline::Terminfo.tigetstr('cub').sub(/%p1%d/, '').bytes => :ed_prev_char,
- }.each_pair do |key, func|
+ key_bindings = CAPNAME_KEY_BINDINGS.map do |capname, key_binding|
+ begin
+ key_code = Reline::Terminfo.tigetstr(capname)
+ case capname
+ # Escape sequences that omit the move distance and are set to defaults
+ # value 1 may be sometimes sent by pressing the arrow-key.
+ when 'cuu', 'cud', 'cuf', 'cub'
+ [ key_code.sub(/%p1%d/, '').bytes, key_binding ]
+ else
+ [ key_code.bytes, key_binding ]
+ end
+ rescue Reline::Terminfo::TerminfoError
+ # capname is undefined
+ end
+ end.compact.to_h
+
+ key_bindings.each_pair do |key, func|
config.add_default_key_binding_by_keymap(:emacs, key, func)
config.add_default_key_binding_by_keymap(:vi_insert, key, func)
config.add_default_key_binding_by_keymap(:vi_command, key, func)
@@ -261,7 +277,7 @@ def self.move_cursor_column(x)
def self.move_cursor_up(x)
if x > 0
- @@output.write "\e[#{x}A" if x > 0
+ @@output.write "\e[#{x}A"
elsif x < 0
move_cursor_down(-x)
end
@@ -269,7 +285,7 @@ def self.move_cursor_up(x)
def self.move_cursor_down(x)
if x > 0
- @@output.write "\e[#{x}B" if x > 0
+ @@output.write "\e[#{x}B"
elsif x < 0
move_cursor_up(-x)
end
@@ -277,7 +293,11 @@ def self.move_cursor_down(x)
def self.hide_cursor
if Reline::Terminfo.enabled?
- @@output.write Reline::Terminfo.tigetstr('civis')
+ begin
+ @@output.write Reline::Terminfo.tigetstr('civis')
+ rescue Reline::Terminfo::TerminfoError
+ # civis is undefined
+ end
else
# ignored
end
@@ -285,7 +305,11 @@ def self.hide_cursor
def self.show_cursor
if Reline::Terminfo.enabled?
- @@output.write Reline::Terminfo.tigetstr('cnorm')
+ begin
+ @@output.write Reline::Terminfo.tigetstr('cnorm')
+ rescue Reline::Terminfo::TerminfoError
+ # cnorm is undefined
+ end
else
# ignored
end
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index f6facc9da8199c..50bd22b424a768 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -858,7 +858,8 @@ def add_dialog_proc(name, p, context = nil)
s = ' ' * width
else
s = Reline::Unicode.take_range(visual_lines[start + i], old_dialog.column + dialog.width, width)
- s = padding_space_with_escape_sequences(s, dialog.width)
+ rerender_width = old_dialog.width - dialog.width
+ s = padding_space_with_escape_sequences(s, rerender_width)
end
Reline::IOGate.move_cursor_column(dialog.column + dialog.width)
@output.write "\e[0m#{s}\e[0m"
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index 80708e2aa00c4d..8e050ef3c77e68 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -800,11 +800,11 @@ def self.read_binary(path)
##
# Safely write a file in binary mode on all platforms.
def self.write_binary(path, data)
+ File.open(path, File::RDWR | File::CREAT | File::BINARY | File::LOCK_EX) do |io|
+ io.write data
+ end
+ rescue *WRITE_BINARY_ERRORS
File.open(path, 'wb') do |io|
- begin
- io.flock(File::LOCK_EX)
- rescue *WRITE_BINARY_ERRORS
- end
io.write data
end
rescue Errno::ENOLCK # NFS
@@ -1325,22 +1325,6 @@ def default_gem_load_paths
require_relative 'rubygems/exceptions'
# REFACTOR: This should be pulled out into some kind of hacks file.
-begin
- ##
- # Defaults the operating system (or packager) wants to provide for RubyGems.
-
- require 'rubygems/defaults/operating_system'
-rescue LoadError
- # Ignored
-rescue StandardError => e
- msg = "#{e.message}\n" \
- "Loading the rubygems/defaults/operating_system.rb file caused an error. " \
- "This file is owned by your OS, not by rubygems upstream. " \
- "Please find out which OS package this file belongs to and follow the guidelines from your OS to report " \
- "the problem and ask for help."
- raise e.class, msg
-end
-
begin
##
# Defaults the Ruby implementation wants to provide for RubyGems
@@ -1356,3 +1340,19 @@ def default_gem_load_paths
require_relative 'rubygems/core_ext/kernel_gem'
require_relative 'rubygems/core_ext/kernel_require'
require_relative 'rubygems/core_ext/kernel_warn'
+
+begin
+ ##
+ # Defaults the operating system (or packager) wants to provide for RubyGems.
+
+ require 'rubygems/defaults/operating_system'
+rescue LoadError
+ # Ignored
+rescue StandardError => e
+ msg = "#{e.message}\n" \
+ "Loading the rubygems/defaults/operating_system.rb file caused an error. " \
+ "This file is owned by your OS, not by rubygems upstream. " \
+ "Please find out which OS package this file belongs to and follow the guidelines from your OS to report " \
+ "the problem and ask for help."
+ raise e.class, msg
+end
diff --git a/lib/rubygems/command_manager.rb b/lib/rubygems/command_manager.rb
index 39bf8bd30d1c99..03cdd6a4bb96e6 100644
--- a/lib/rubygems/command_manager.rb
+++ b/lib/rubygems/command_manager.rb
@@ -73,7 +73,9 @@ class Gem::CommandManager
].freeze
ALIAS_COMMANDS = {
- 'i' => 'install',
+ 'i' => 'install',
+ 'login' => 'signin',
+ 'logout' => 'signout',
}.freeze
##
diff --git a/lib/rubygems/commands/pristine_command.rb b/lib/rubygems/commands/pristine_command.rb
index 41547ce73bfedc..13979b0a590cec 100644
--- a/lib/rubygems/commands/pristine_command.rb
+++ b/lib/rubygems/commands/pristine_command.rb
@@ -50,6 +50,11 @@ def initialize
options[:env_shebang] = value
end
+ add_option('-i', '--install-dir DIR',
+ 'Gem repository to get binstubs and plugins installed') do |value, options|
+ options[:install_dir] = File.expand_path(value)
+ end
+
add_option('-n', '--bindir DIR',
'Directory where executables are',
'located') do |value, options|
@@ -163,11 +168,12 @@ def execute
end
bin_dir = options[:bin_dir] if options[:bin_dir]
+ install_dir = options[:install_dir] if options[:install_dir]
installer_options = {
:wrappers => true,
:force => true,
- :install_dir => spec.base_dir,
+ :install_dir => install_dir || spec.base_dir,
:env_shebang => env_shebang,
:build_args => spec.build_args,
:bin_dir => bin_dir,
@@ -177,7 +183,7 @@ def execute
installer = Gem::Installer.for_spec(spec, installer_options)
installer.generate_bin
elsif options[:only_plugins]
- installer = Gem::Installer.for_spec(spec)
+ installer = Gem::Installer.for_spec(spec, installer_options)
installer.generate_plugins
else
installer = Gem::Installer.at(gem, installer_options)
diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb
index ac14e61a674765..ed1fcaa4b89748 100644
--- a/lib/rubygems/commands/setup_command.rb
+++ b/lib/rubygems/commands/setup_command.rb
@@ -182,8 +182,8 @@ def execute
say "RubyGems #{Gem::VERSION} installed"
- regenerate_binstubs if options[:regenerate_binstubs]
- regenerate_plugins if options[:regenerate_plugins]
+ regenerate_binstubs(bin_dir) if options[:regenerate_binstubs]
+ regenerate_plugins(bin_dir) if options[:regenerate_plugins]
uninstall_old_gemcutter
@@ -411,8 +411,16 @@ def install_default_bundler_gem(bin_dir)
Dir.chdir("bundler") do
built_gem = Gem::Package.build(bundler_spec)
begin
- installer = Gem::Installer.at(built_gem, env_shebang: options[:env_shebang], format_executable: options[:format_executable], force: options[:force], install_as_default: true, bin_dir: bin_dir, wrappers: true)
- installer.install
+ Gem::Installer.at(
+ built_gem,
+ env_shebang: options[:env_shebang],
+ format_executable: options[:format_executable],
+ force: options[:force],
+ install_as_default: true,
+ bin_dir: bin_dir,
+ install_dir: default_dir,
+ wrappers: true
+ ).install
ensure
FileUtils.rm_f built_gem
end
@@ -582,11 +590,12 @@ def uninstall_old_gemcutter
rescue Gem::InstallError
end
- def regenerate_binstubs
+ def regenerate_binstubs(bindir)
require_relative "pristine_command"
say "Regenerating binstubs"
args = %w[--all --only-executables --silent]
+ args << "--bindir=#{bindir}"
if options[:env_shebang]
args << "--env-shebang"
end
@@ -595,11 +604,13 @@ def regenerate_binstubs
command.invoke(*args)
end
- def regenerate_plugins
+ def regenerate_plugins(bindir)
require_relative "pristine_command"
say "Regenerating plugins"
args = %w[--all --only-plugins --silent]
+ args << "--bindir=#{bindir}"
+ args << "--install-dir=#{default_dir}"
command = Gem::Commands::PristineCommand.new
command.invoke(*args)
diff --git a/lib/rubygems/exceptions.rb b/lib/rubygems/exceptions.rb
index f0debb646ff5d3..20e4049e488617 100644
--- a/lib/rubygems/exceptions.rb
+++ b/lib/rubygems/exceptions.rb
@@ -284,3 +284,4 @@ def version
# Backwards compatible typo'd exception class for early RubyGems 2.0.x
Gem::UnsatisfiableDepedencyError = Gem::UnsatisfiableDependencyError # :nodoc:
+Gem.deprecate_constant :UnsatisfiableDepedencyError
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 10341a9398c83d..8e3965ef92d93b 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -293,8 +293,6 @@ def spec
def install
pre_install_checks
- FileUtils.rm_f File.join gem_home, 'specifications', spec.spec_name
-
run_pre_install_hooks
# Set loaded_from to ensure extension_dir is correct
@@ -448,13 +446,9 @@ def default_spec_file
# specifications directory.
def write_spec
- File.open spec_file, 'w' do |file|
- spec.installed_by_version = Gem.rubygems_version
-
- file.puts spec.to_ruby_for_cache
+ spec.installed_by_version = Gem.rubygems_version
- file.fsync rescue nil # for filesystems without fsync(2)
- end
+ Gem.write_binary(spec_file, spec.to_ruby_for_cache)
end
##
@@ -462,9 +456,7 @@ def write_spec
# specifications/default directory.
def write_default_spec
- File.open(default_spec_file, "w") do |file|
- file.puts spec.to_ruby
- end
+ Gem.write_binary(default_spec_file, spec.to_ruby)
end
##
diff --git a/lib/rubygems/security.rb b/lib/rubygems/security.rb
index 8240a1a059189c..2275997207007c 100644
--- a/lib/rubygems/security.rb
+++ b/lib/rubygems/security.rb
@@ -510,9 +510,10 @@ def self.email_to_name(email_address)
dcs = dcs.split '.'
- name = "CN=#{cn}/#{dcs.map {|dc| "DC=#{dc}" }.join '/'}"
-
- OpenSSL::X509::Name.parse name
+ OpenSSL::X509::Name.new([
+ ["CN", cn],
+ *dcs.map {|dc| ["DC", dc] },
+ ])
end
##
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index d22b0156e36602..40a5bddff6a38f 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -287,6 +287,15 @@ def authors=(value)
######################################################################
# :section: Recommended gemspec attributes
+ ##
+ # The version of Ruby required by this gem
+ #
+ # Usage:
+ #
+ # spec.required_ruby_version = '>= 2.7.0'
+
+ attr_reader :required_ruby_version
+
##
# A long description of this gem
#
@@ -522,11 +531,6 @@ def require_paths=(val)
@require_paths = Array(val)
end
- ##
- # The version of Ruby required by this gem
-
- attr_reader :required_ruby_version
-
##
# The RubyGems version required by this gem
diff --git a/lib/rubygems/version.rb b/lib/rubygems/version.rb
index 20bbff4fdd5e1c..37fd71edc063ba 100644
--- a/lib/rubygems/version.rb
+++ b/lib/rubygems/version.rb
@@ -149,6 +149,15 @@
# For the last example, single-digit versions are automatically extended with
# a zero to give a sensible result.
+# Our code style opens classes directly without opening the intermediate
+# modules. This works because tha main entrypoint `rubygems.rb`, which defines
+# the root `Gem` module, is usually required first. But in this case we want to
+# allow using `Gem::Version` without loading the rest of rubygems, so we
+# explicit define the `Gem` placeholder module first.
+module Gem; end
+
+require_relative "deprecate"
+
class Gem::Version
autoload :Requirement, File.expand_path('requirement', __dir__)
diff --git a/method.h b/method.h
index 031d2ce89f3768..8bff5b3b8d545e 100644
--- a/method.h
+++ b/method.h
@@ -44,7 +44,7 @@ typedef struct rb_scope_visi_struct {
typedef struct rb_cref_struct {
VALUE flags;
VALUE refinements;
- VALUE klass;
+ VALUE klass_or_self;
struct rb_cref_struct * next;
const rb_scope_visibility_t scope_visi;
} rb_cref_t;
diff --git a/misc/test_yjit_asm.sh b/misc/test_yjit_asm.sh
index cf1ae7bee56f7e..e09d83f0fb5990 100755
--- a/misc/test_yjit_asm.sh
+++ b/misc/test_yjit_asm.sh
@@ -1,9 +1,9 @@
-#!/bin/bash
+#!/bin/sh
set -e
set -x
-clang -std=gnu99 -Wall -Werror -Wno-error=unused-function -Wshorten-64-to-32 -I ${0%/*/*} ${0%/*}/yjit_asm_tests.c -o asm_test
+clang -std=gnu99 -Wall -Werror -Wno-error=unused-function -Wshorten-64-to-32 -I "${0%/*/*}" "${0%/*}/yjit_asm_tests.c" -o asm_test
./asm_test
diff --git a/misc/yjit_asm_tests.c b/misc/yjit_asm_tests.c
index 5548af07f5340a..ccf8822bbeb9b0 100644
--- a/misc/yjit_asm_tests.c
+++ b/misc/yjit_asm_tests.c
@@ -26,7 +26,7 @@ void print_bytes(codeblock_t* cb)
{
for (uint32_t i = 0; i < cb->write_pos; ++i)
{
- printf("%02X", (int)cb->mem_block[i]);
+ printf("%02X", (int)*cb_get_ptr(cb, i));
}
printf("\n");
@@ -59,7 +59,7 @@ void check_bytes(codeblock_t* cb, const char* bytes)
char* endptr;
long int byte = strtol(byte_str, &endptr, 16);
- uint8_t cb_byte = cb->mem_block[i];
+ uint8_t cb_byte = *cb_get_ptr(cb, i);
if (cb_byte != byte)
{
@@ -401,7 +401,7 @@ void run_runtime_tests(void)
int (*function)(void);
function = (int (*)(void))mem_block;
- #define TEST(BODY) cb_set_pos(cb, 0); BODY ret(cb); assert_equal(7, function());
+ #define TEST(BODY) cb_set_pos(cb, 0); BODY ret(cb); cb_mark_all_executable(cb); assert_equal(7, function());
// add
TEST({ mov(cb, RAX, imm_opnd(0)); add(cb, RAX, imm_opnd(7)); })
diff --git a/mjit_worker.c b/mjit_worker.c
index c6528a9bda5a6e..a3a2acab7fadb6 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -788,7 +788,7 @@ static const int c_file_access_mode =
static bool
compile_c_to_so(const char *c_file, const char *so_file)
{
- const char *files[] = { NULL, NULL, NULL, NULL, NULL, NULL, "-link", libruby_pathflag, NULL };
+ const char *files[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, "-link", libruby_pathflag, NULL };
char *p;
// files[0] = "-Fe*.dll"
@@ -824,12 +824,19 @@ compile_c_to_so(const char *c_file, const char *so_file)
*p = '\0';
// files[5] = "-Fd*.pdb"
- files[5] = p = alloca(sizeof(char) * (rb_strlen_lit("-Fd") + strlen(pch_file) + 1));
+ // Generate .pdb file in temporary directory instead of cwd.
+ files[5] = p = alloca(sizeof(char) * (rb_strlen_lit("-Fd") + strlen(so_file) - rb_strlen_lit(DLEXT) + rb_strlen_lit(".pdb") + 1));
p = append_lit(p, "-Fd");
- p = append_str2(p, pch_file, strlen(pch_file) - rb_strlen_lit(".pch"));
+ p = append_str2(p, so_file, strlen(so_file) - rb_strlen_lit(DLEXT));
p = append_lit(p, ".pdb");
*p = '\0';
+ // files[6] = "-Z7"
+ // Put this last to override any debug options that came previously.
+ files[6] = p = alloca(sizeof(char) * rb_strlen_lit("-Z7") + 1);
+ p = append_lit(p, "-Z7");
+ *p = '\0';
+
char **args = form_args(5, CC_LDSHARED_ARGS, CC_CODEFLAG_ARGS,
files, CC_LIBS, CC_DLDFLAGS_ARGS);
if (args == NULL)
diff --git a/node.c b/node.c
index 3dea7fe398e322..fe1a60c1514b33 100644
--- a/node.c
+++ b/node.c
@@ -136,7 +136,7 @@ dump_array(VALUE buf, VALUE indent, int comment, const NODE *node)
const char *next_indent = default_indent;
F_LONG(nd_alen, "length");
F_NODE(nd_head, "element");
- while (node->nd_next && nd_type(node->nd_next) == NODE_LIST) {
+ while (node->nd_next && nd_type_p(node->nd_next, NODE_LIST)) {
node = node->nd_next;
F_NODE(nd_head, "element");
}
@@ -175,7 +175,7 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
dump_node(buf, indent, comment, node->nd_head);
D_DEDENT;
} while (node->nd_next &&
- nd_type(node->nd_next) == NODE_BLOCK &&
+ nd_type_p(node->nd_next, NODE_BLOCK) &&
(node = node->nd_next, 1));
if (node->nd_next) {
LAST_NODE;
@@ -370,7 +370,7 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
andor:
while (1) {
F_NODE(nd_1st, "left expr");
- if (!node->nd_2nd || nd_type(node->nd_2nd) != (int)type)
+ if (!node->nd_2nd || !nd_type_p(node->nd_2nd, type))
break;
node = node->nd_2nd;
}
@@ -1043,12 +1043,12 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
ANN("new scope");
ANN("format: [nd_tbl]: local table, [nd_args]: arguments, [nd_body]: body");
F_CUSTOM1(nd_tbl, "local table") {
- ID *tbl = node->nd_tbl;
+ rb_ast_id_table_t *tbl = node->nd_tbl;
int i;
- int size = tbl ? (int)*tbl++ : 0;
+ int size = tbl ? tbl->size : 0;
if (size == 0) A("(empty)");
for (i = 0; i < size; i++) {
- A_ID(tbl[i]); if (i < size - 1) A(",");
+ A_ID(tbl->ids[i]); if (i < size - 1) A(",");
}
}
F_NODE(nd_args, "arguments");
@@ -1162,7 +1162,7 @@ typedef struct {
struct node_buffer_struct {
node_buffer_list_t unmarkable;
node_buffer_list_t markable;
- ID *local_tables;
+ struct rb_ast_local_table_link *local_tables;
VALUE mark_hash;
};
@@ -1205,15 +1205,22 @@ node_buffer_list_free(node_buffer_list_t * nb)
}
}
+struct rb_ast_local_table_link {
+ struct rb_ast_local_table_link *next;
+ // struct rb_ast_id_table {
+ int size;
+ ID ids[FLEX_ARY_LEN];
+ // }
+};
+
static void
rb_node_buffer_free(node_buffer_t *nb)
{
node_buffer_list_free(&nb->unmarkable);
node_buffer_list_free(&nb->markable);
- ID * local_table = nb->local_tables;
+ struct rb_ast_local_table_link *local_table = nb->local_tables;
while (local_table) {
- unsigned int size = (unsigned int)*local_table;
- ID * next_table = (ID *)local_table[size + 1];
+ struct rb_ast_local_table_link *next_table = local_table->next;
xfree(local_table);
local_table = next_table;
}
@@ -1277,12 +1284,28 @@ rb_ast_node_type_change(NODE *n, enum node_type type)
}
}
-void
-rb_ast_add_local_table(rb_ast_t *ast, ID *buf)
+rb_ast_id_table_t *
+rb_ast_new_local_table(rb_ast_t *ast, int size)
+{
+ size_t alloc_size = sizeof(struct rb_ast_local_table_link) + size * sizeof(ID);
+ struct rb_ast_local_table_link *link = ruby_xmalloc(alloc_size);
+ link->next = ast->node_buffer->local_tables;
+ ast->node_buffer->local_tables = link;
+ link->size = size;
+
+ return (rb_ast_id_table_t *) &link->size;
+}
+
+rb_ast_id_table_t *
+rb_ast_resize_latest_local_table(rb_ast_t *ast, int size)
{
- unsigned int size = (unsigned int)*buf;
- buf[size + 1] = (ID)ast->node_buffer->local_tables;
- ast->node_buffer->local_tables = buf;
+ struct rb_ast_local_table_link *link = ast->node_buffer->local_tables;
+ size_t alloc_size = sizeof(struct rb_ast_local_table_link) + size * sizeof(ID);
+ link = ruby_xrealloc(link, alloc_size);
+ ast->node_buffer->local_tables = link;
+ link->size = size;
+
+ return (rb_ast_id_table_t *) &link->size;
}
void
diff --git a/node.h b/node.h
index 8450455624283d..4251638fb3daa8 100644
--- a/node.h
+++ b/node.h
@@ -11,6 +11,8 @@
**********************************************************************/
+#include "internal/compilers.h"
+
#if defined(__cplusplus)
extern "C" {
#if 0
@@ -146,13 +148,18 @@ code_loc_gen(const rb_code_location_t *loc1, const rb_code_location_t *loc2)
return loc;
}
+typedef struct rb_ast_id_table {
+ int size;
+ ID ids[FLEX_ARY_LEN];
+} rb_ast_id_table_t;
+
typedef struct RNode {
VALUE flags;
union {
struct RNode *node;
ID id;
VALUE value;
- ID *tbl;
+ rb_ast_id_table_t *tbl;
} u1;
union {
struct RNode *node;
@@ -411,13 +418,14 @@ typedef struct rb_ast_struct {
rb_ast_t *rb_ast_new(void);
void rb_ast_mark(rb_ast_t*);
void rb_ast_update_references(rb_ast_t*);
-void rb_ast_add_local_table(rb_ast_t*, ID *buf);
void rb_ast_dispose(rb_ast_t*);
void rb_ast_free(rb_ast_t*);
size_t rb_ast_memsize(const rb_ast_t*);
void rb_ast_add_mark_object(rb_ast_t*, VALUE);
NODE *rb_ast_newnode(rb_ast_t*, enum node_type type);
void rb_ast_delete_node(rb_ast_t*, NODE *n);
+rb_ast_id_table_t *rb_ast_new_local_table(rb_ast_t*, int);
+rb_ast_id_table_t *rb_ast_resize_latest_local_table(rb_ast_t*, int);
VALUE rb_parser_new(void);
VALUE rb_parser_end_seen_p(VALUE);
@@ -489,6 +497,11 @@ rb_node_set_type(NODE *n, enum node_type t)
return nd_init_type(n, t);
}
+static inline bool
+nd_type_p(const NODE *n, enum node_type t)
+{
+ return (enum node_type)nd_type(n) == t;
+}
#if defined(__cplusplus)
#if 0
{ /* satisfy cc-mode */
diff --git a/numeric.c b/numeric.c
index 890c3c71316f62..28b68a71fbde5a 100644
--- a/numeric.c
+++ b/numeric.c
@@ -934,9 +934,9 @@ num_negative_p(VALUE num)
/********************************************************************
*
- * Document-class: Float
+ * Document-class: Float
*
- * Float objects represent inexact real numbers using the native
+ * A \Float object represents a sometimes-inexact real number using the native
* architecture's double-precision floating point representation.
*
* Floating point has a different arithmetic and is an inexact number.
@@ -945,6 +945,71 @@ num_negative_p(VALUE num)
* - https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
* - https://github.com/rdp/ruby_tutorials_core/wiki/Ruby-Talk-FAQ#floats_imprecise
* - https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems
+ *
+ * You can create a \Float object explicitly with:
+ *
+ * - A {floating-point literal}[doc/syntax/literals_rdoc.html#label-Float+Literals].
+ *
+ * You can convert certain objects to Floats with:
+ *
+ * - \Method {Float}[Kernel.html#method-i-Float].
+ *
+ * == What's Here
+ *
+ * First, what's elsewhere. \Class \Float:
+ *
+ * - Inherits from {class Numeric}[Numeric.html#class-Numeric-label-What-27s+Here].
+ *
+ * Here, class \Float provides methods for:
+ *
+ * - {Querying}[#class-Float-label-Querying]
+ * - {Comparing}[#class-Float-label-Comparing]
+ * - {Converting}[#class-Float-label-Converting]
+ *
+ * === Querying
+ *
+ * - #finite?:: Returns whether +self+ is finite.
+ * - #hash:: Returns the integer hash code for +self+.
+ * - #infinite?:: Returns whether +self+ is infinite.
+ * - #nan?:: Returns whether +self+ is a NaN (not-a-number).
+ *
+ * === Comparing
+ *
+ * - {<}[#method-i-3C]:: Returns whether +self+ is less than the given value.
+ * - {<=}[#method-i-3C-3D]:: Returns whether +self+ is less than
+ * or equal to the given value.
+ * - {<=>}[#method-i-3C-3D-3E]:: Returns a number indicating whether +self+ is less than,
+ * equal to, or greater than the given value.
+ * - {==}[#method-i-3D-3D] (aliased as #=== and #eql>):: Returns whether +self+ is
+ * equal to the given value.
+ * - {>}[#method-i-3E]:: Returns whether +self+ is greater than the given value.
+ * - {>=}[#method-i-3E-3D]:: Returns whether +self+ is greater than
+ * or equal to the given value.
+ *
+ * === Converting
+ *
+ * - #% (aliased as #modulo):: Returns +self+ modulo the given value.
+ * - #*:: Returns the product of +self+ and the given value.
+ * - {**}[#method-i-2A-2A]:: Returns the value of +self+ raised to the power of the given value.
+ * - #+:: Returns the sum of +self+ and the given value.
+ * - #-:: Returns the difference of +self+ and the given value.
+ * - {/}[#method-i-2F]:: Returns the quotient of +self+ and the given value.
+ * - #ceil:: Returns the smallest number greater than or equal to +self+.
+ * - #coerce:: Returns a 2-element array containing the given value converted to a \Float
+ and +self+
+ * - #divmod:: Returns a 2-element array containing the quotient and remainder
+ * results of dividing +self+ by the given value.
+ * - #fdiv:: Returns the Float result of dividing +self+ by the given value.
+ * - #floor:: Returns the greatest number smaller than or equal to +self+.
+ * - #next_float:: Returns the next-larger representable \Float.
+ * - #prev_float:: Returns the next-smaller representable \Float.
+ * - #quo:: Returns the quotient from dividing +self+ by the given value.
+ * - #round:: Returns +self+ rounded to the nearest value, to a given precision.
+ * - #to_i (aliased as #to_int):: Returns +self+ truncated to an Integer.
+ * - #to_s (aliased as #inspect):: Returns a string containing the place-value
+ * representation of +self+ in the given radix.
+ * - #truncate:: Returns +self+ truncated to a given precision.
+ *
*/
VALUE
@@ -1092,7 +1157,7 @@ rb_float_uminus(VALUE flt)
/*
* call-seq:
- * self + other -> float
+ * self + other -> numeric
*
* Returns a new \Float which is the sum of +self+ and +other+:
*
@@ -1123,7 +1188,7 @@ rb_float_plus(VALUE x, VALUE y)
/*
* call-seq:
- * self - other -> float
+ * self - other -> numeric
*
* Returns a new \Float which is the difference of +self+ and +other+:
*
@@ -1154,7 +1219,7 @@ rb_float_minus(VALUE x, VALUE y)
/*
* call-seq:
- * self * other -> float
+ * self * other -> numeric
*
* Returns a new \Float which is the product of +self+ and +other+:
*
@@ -1208,7 +1273,7 @@ rb_flo_div_flo(VALUE x, VALUE y)
/*
* call-seq:
- * self / other -> float
+ * self / other -> numeric
*
* Returns a new \Float which is the result of dividing +self+ by +other+:
*
@@ -1246,10 +1311,18 @@ rb_float_div(VALUE x, VALUE y)
/*
* call-seq:
- * float.fdiv(numeric) -> float
- * float.quo(numeric) -> float
+ * quo(other) -> numeric
+ *
+ * Returns the quotient from dividing +self+ by +other+:
+ *
+ * f = 3.14
+ * f.quo(2) # => 1.57
+ * f.quo(-2) # => -1.57
+ * f.quo(Rational(2, 1)) # => 1.57
+ * f.quo(Complex(2, 0)) # => (1.57+0.0i)
+ *
+ * Float#fdiv is an alias for Float#quo.
*
- * Returns float / numeric
, same as Float#/.
*/
static VALUE
@@ -1420,12 +1493,18 @@ flo_divmod(VALUE x, VALUE y)
}
/*
- * call-seq:
- * float ** other -> float
+ * call-seq:
+ * self ** other -> numeric
+ *
+ * Raises +self+ to the power of +other+:
*
- * Raises +float+ to the power of +other+.
+ * f = 3.14
+ * f ** 2 # => 9.8596
+ * f ** -2 # => 0.1014239928597509
+ * f ** 2.1 # => 11.054834900588839
+ * f ** Rational(2, 1) # => 9.8596
+ * f ** Complex(2, 0) # => (9.8596+0i)
*
- * 2.0**3 #=> 8.0
*/
VALUE
@@ -1517,15 +1596,19 @@ num_equal(VALUE x, VALUE y)
/*
* call-seq:
- * float == obj -> true or false
+ * self == other -> true or false
*
- * Returns +true+ only if +obj+ has the same value as +float+.
- * Contrast this with Float#eql?, which requires +obj+ to be a Float.
+ * Returns +true+ if +other+ has the same value as +self+, +false+ otherwise:
*
- * 1.0 == 1 #=> true
+ * 2.0 == 2 # => true
+ * 2.0 == 2.0 # => true
+ * 2.0 == Rational(2, 1) # => true
+ * 2.0 == Complex(2, 0) # => true
+ *
+ * Float::NAN == Float::NAN returns an implementation-dependent value.
+ *
+ * Related: Float#eql? (requires +other+ to be a \Float).
*
- * The result of NaN == NaN
is undefined,
- * so an implementation-dependent value is returned.
*/
MJIT_FUNC_EXPORTED VALUE
@@ -1557,9 +1640,9 @@ static VALUE rb_dbl_hash(double d);
/*
* call-seq:
- * float.hash -> integer
+ * hash -> integer
*
- * Returns a hash code for this float.
+ * Returns the integer hash value for +self+.
*
* See also Object#hash.
*/
@@ -1588,16 +1671,30 @@ rb_dbl_cmp(double a, double b)
/*
* call-seq:
- * float <=> real -> -1, 0, +1, or nil
+ * self <=> other -> -1, 0, +1, or nil
+ *
+ * Returns a value that depends on the numeric relation
+ * between +self+ and +other+:
+ *
+ * - -1, if +self+ is less than +other+.
+ * - 0, if +self+ is equal to +other+.
+ * - 1, if +self+ is greater than +other+.
+ * - +nil+, if the two values are incommensurate.
+ *
+ * Examples:
+ *
+ * 2.0 <=> 2 # => 0
+ 2.0 <=> 2.0 # => 0
+ 2.0 <=> Rational(2, 1) # => 0
+ 2.0 <=> Complex(2, 0) # => 0
+ 2.0 <=> 1.9 # => 1
+ 2.0 <=> 2.1 # => -1
+ 2.0 <=> 'foo' # => nil
*
- * Returns -1, 0, or +1 depending on whether +float+ is
- * less than, equal to, or greater than +real+.
* This is the basis for the tests in the Comparable module.
*
- * The result of NaN <=> NaN
is undefined,
- * so an implementation-dependent value is returned.
+ * Float::NAN <=> Float::NAN returns an implementation-dependent value.
*
- * +nil+ is returned if the two values are incomparable.
*/
static VALUE
@@ -1639,13 +1736,18 @@ rb_float_cmp(VALUE x, VALUE y)
}
/*
- * call-seq:
- * float > real -> true or false
+ * call-seq:
+ * self > other -> true or false
+ *
+ * Returns +true+ if +self+ is numerically greater than +other+:
*
- * Returns +true+ if +float+ is greater than +real+.
+ * 2.0 > 1 # => true
+ * 2.0 > 1.0 # => true
+ * 2.0 > Rational(1, 2) # => true
+ * 2.0 > 2.0 # => false
+ *
+ * Float::NAN > Float::NAN returns an implementation-dependent value.
*
- * The result of NaN > NaN
is undefined,
- * so an implementation-dependent value is returned.
*/
VALUE
@@ -1676,13 +1778,19 @@ rb_float_gt(VALUE x, VALUE y)
}
/*
- * call-seq:
- * float >= real -> true or false
+ * call-seq:
+ * self >= other -> true or false
+ *
+ * Returns +true+ if +self+ is numerically greater than or equal to +other+:
+ *
+ * 2.0 >= 1 # => true
+ * 2.0 >= 1.0 # => true
+ * 2.0 >= Rational(1, 2) # => true
+ * 2.0 >= 2.0 # => true
+ * 2.0 >= 2.1 # => false
*
- * Returns +true+ if +float+ is greater than or equal to +real+.
+ * Float::NAN >= Float::NAN returns an implementation-dependent value.
*
- * The result of NaN >= NaN
is undefined,
- * so an implementation-dependent value is returned.
*/
static VALUE
@@ -1713,13 +1821,18 @@ flo_ge(VALUE x, VALUE y)
}
/*
- * call-seq:
- * float < real -> true or false
+ * call-seq:
+ * self < other -> true or false
*
- * Returns +true+ if +float+ is less than +real+.
+ * Returns +true+ if +self+ is numerically less than +other+:
+ *
+ * 2.0 < 3 # => true
+ * 2.0 < 3.0 # => true
+ * 2.0 < Rational(3, 1) # => true
+ * 2.0 < 2.0 # => false
+ *
+ * Float::NAN < Float::NAN returns an implementation-dependent value.
*
- * The result of NaN < NaN
is undefined,
- * so an implementation-dependent value is returned.
*/
static VALUE
@@ -1750,13 +1863,19 @@ flo_lt(VALUE x, VALUE y)
}
/*
- * call-seq:
- * float <= real -> true or false
+ * call-seq:
+ * self <= other -> true or false
+ *
+ * Returns +true+ if +self+ is numerically less than or equal to +other+:
+ *
+ * 2.0 <= 3 # => true
+ * 2.0 <= 3.0 # => true
+ * 2.0 <= Rational(3, 1) # => true
+ * 2.0 <= 2.0 # => true
+ * 2.0 <= 1.0 # => false
*
- * Returns +true+ if +float+ is less than or equal to +real+.
+ * Float::NAN <= Float::NAN returns an implementation-dependent value.
*
- * The result of NaN <= NaN
is undefined,
- * so an implementation-dependent value is returned.
*/
static VALUE
@@ -1788,15 +1907,20 @@ flo_le(VALUE x, VALUE y)
/*
* call-seq:
- * float.eql?(obj) -> true or false
+ * eql?(other) -> true or false
+ *
+ * Returns +true+ if +other+ is a \Float with the same value as +self+,
+ * +false+ otherwise:
*
- * Returns +true+ only if +obj+ is a Float with the same value as +float+.
- * Contrast this with Float#==, which performs type conversions.
+ * 2.0.eql?(2.0) # => true
+ * 2.0.eql?(1.0) # => false
+ * 2.0.eql?(1) # => false
+ * 2.0.eql?(Rational(2, 1)) # => false
+ * 2.0.eql?(Complex(2, 0)) # => false
*
- * 1.0.eql?(1) #=> false
+ * Float::NAN.eql?(Float::NAN) returns an implementation-dependent value.
*
- * The result of NaN.eql?(NaN)
is undefined,
- * so an implementation-dependent value is returned.
+ * Related: Float#== (performs type conversions).
*/
MJIT_FUNC_EXPORTED VALUE
@@ -1824,14 +1948,14 @@ rb_float_abs(VALUE flt)
/*
* call-seq:
- * float.nan? -> true or false
+ * nan? -> true or false
*
- * Returns +true+ if +float+ is an invalid IEEE floating point number.
+ * Returns +true+ if +self+ is a NaN, +false+ otherwise.
*
- * a = -1.0 #=> -1.0
- * a.nan? #=> false
- * a = 0.0/0.0 #=> NaN
- * a.nan? #=> true
+ * f = -1.0 #=> -1.0
+ * f.nan? #=> false
+ * f = 0.0/0.0 #=> NaN
+ * f.nan? #=> true
*/
static VALUE
@@ -1844,14 +1968,25 @@ flo_is_nan_p(VALUE num)
/*
* call-seq:
- * float.infinite? -> -1, 1, or nil
+ * infinite? -> -1, 1, or nil
*
- * Returns +nil+, -1, or 1 depending on whether the value is
- * finite, -Infinity
, or +Infinity
.
+ * Returns:
+ *
+ * - 1, if +self+ is Infinity.
+ * - -1 if +self+ is -Infinity.
+ * - +nil+, otherwise.
+ *
+ * Examples:
+ *
+ * f = 1.0/0.0 # => Infinity
+ * f.infinite? # => 1
+ * f = -1.0/0.0 # => -Infinity
+ * f.infinite? # => -1
+ * f = 1.0 # => 1.0
+ * f.infinite? # => nil
+ * f = 0.0/0.0 # => NaN
+ * f.infinite? # => nil
*
- * (0.0).infinite? #=> nil
- * (-1.0/0.0).infinite? #=> -1
- * (+1.0/0.0).infinite? #=> 1
*/
VALUE
@@ -1868,10 +2003,20 @@ rb_flo_is_infinite_p(VALUE num)
/*
* call-seq:
- * float.finite? -> true or false
+ * finite? -> true or false
+ *
+ * Returns +true+ if +self+ is not +Infinity+, +-Infinity+, or +Nan+,
+ * +false+ otherwise:
+ *
+ * f = 2.0 # => 2.0
+ * f.finite? # => true
+ * f = 1.0/0.0 # => Infinity
+ * f.finite? # => false
+ * f = -1.0/0.0 # => -Infinity
+ * f.finite? # => false
+ * f = 0.0/0.0 # => NaN
+ * f.finite? # => false
*
- * Returns +true+ if +float+ is a valid IEEE floating point number,
- * i.e. it is not infinite and Float#nan? is +false+.
*/
VALUE
@@ -1893,55 +2038,47 @@ flo_nextafter(VALUE flo, double value)
/*
* call-seq:
- * float.next_float -> float
- *
- * Returns the next representable floating point number.
- *
- * Float::MAX.next_float and Float::INFINITY.next_float is Float::INFINITY.
- *
- * Float::NAN.next_float is Float::NAN.
- *
- * For example:
- *
- * 0.01.next_float #=> 0.010000000000000002
- * 1.0.next_float #=> 1.0000000000000002
- * 100.0.next_float #=> 100.00000000000001
- *
- * 0.01.next_float - 0.01 #=> 1.734723475976807e-18
- * 1.0.next_float - 1.0 #=> 2.220446049250313e-16
- * 100.0.next_float - 100.0 #=> 1.4210854715202004e-14
- *
- * f = 0.01; 20.times { printf "%-20a %s\n", f, f.to_s; f = f.next_float }
- * #=> 0x1.47ae147ae147bp-7 0.01
- * # 0x1.47ae147ae147cp-7 0.010000000000000002
- * # 0x1.47ae147ae147dp-7 0.010000000000000004
- * # 0x1.47ae147ae147ep-7 0.010000000000000005
- * # 0x1.47ae147ae147fp-7 0.010000000000000007
- * # 0x1.47ae147ae148p-7 0.010000000000000009
- * # 0x1.47ae147ae1481p-7 0.01000000000000001
- * # 0x1.47ae147ae1482p-7 0.010000000000000012
- * # 0x1.47ae147ae1483p-7 0.010000000000000014
- * # 0x1.47ae147ae1484p-7 0.010000000000000016
- * # 0x1.47ae147ae1485p-7 0.010000000000000018
- * # 0x1.47ae147ae1486p-7 0.01000000000000002
- * # 0x1.47ae147ae1487p-7 0.010000000000000021
- * # 0x1.47ae147ae1488p-7 0.010000000000000023
- * # 0x1.47ae147ae1489p-7 0.010000000000000024
- * # 0x1.47ae147ae148ap-7 0.010000000000000026
- * # 0x1.47ae147ae148bp-7 0.010000000000000028
- * # 0x1.47ae147ae148cp-7 0.01000000000000003
- * # 0x1.47ae147ae148dp-7 0.010000000000000031
- * # 0x1.47ae147ae148ep-7 0.010000000000000033
- *
- * f = 0.0
- * 100.times { f += 0.1 }
- * f #=> 9.99999999999998 # should be 10.0 in the ideal world.
- * 10-f #=> 1.9539925233402755e-14 # the floating point error.
- * 10.0.next_float-10 #=> 1.7763568394002505e-15 # 1 ulp (unit in the last place).
- * (10-f)/(10.0.next_float-10) #=> 11.0 # the error is 11 ulp.
- * (10-f)/(10*Float::EPSILON) #=> 8.8 # approximation of the above.
- * "%a" % 10 #=> "0x1.4p+3"
- * "%a" % f #=> "0x1.3fffffffffff5p+3" # the last hex digit is 5. 16 - 5 = 11 ulp.
+ * next_float -> float
+ *
+ * Returns the next-larger representable \Float.
+ *
+ * These examples show the internally stored values (64-bit hexadecimal)
+ * for each \Float +f+ and for the corresponding f.next_float:
+ *
+ * f = 0.0 # 0x0000000000000000
+ * f.next_float # 0x0000000000000001
+ *
+ * f = 0.01 # 0x3f847ae147ae147b
+ * f.next_float # 0x3f847ae147ae147c
+ *
+ * In the remaining examples here, the output is shown in the usual way
+ * (result +to_s+):
+ *
+ * 0.01.next_float # => 0.010000000000000002
+ * 1.0.next_float # => 1.0000000000000002
+ * 100.0.next_float # => 100.00000000000001
+ *
+ * f = 0.01
+ * (0..3).each_with_index {|i| printf "%2d %-20a %s\n", i, f, f.to_s; f = f.next_float }
+ *
+ * Output:
+ *
+ * 0 0x1.47ae147ae147bp-7 0.01
+ * 1 0x1.47ae147ae147cp-7 0.010000000000000002
+ * 2 0x1.47ae147ae147dp-7 0.010000000000000004
+ * 3 0x1.47ae147ae147ep-7 0.010000000000000005
+ *
+ * f = 0.0; 100.times { f += 0.1 }
+ * f # => 9.99999999999998 # should be 10.0 in the ideal world.
+ * 10-f # => 1.9539925233402755e-14 # the floating point error.
+ * 10.0.next_float-10 # => 1.7763568394002505e-15 # 1 ulp (unit in the last place).
+ * (10-f)/(10.0.next_float-10) # => 11.0 # the error is 11 ulp.
+ * (10-f)/(10*Float::EPSILON) # => 8.8 # approximation of the above.
+ * "%a" % 10 # => "0x1.4p+3"
+ * "%a" % f # => "0x1.3fffffffffff5p+3" # the last hex digit is 5. 16 - 5 = 11 ulp.
+ *
+ * Related: Float#prev_float
+ *
*/
static VALUE
flo_next_float(VALUE vx)
@@ -1953,43 +2090,36 @@ flo_next_float(VALUE vx)
* call-seq:
* float.prev_float -> float
*
- * Returns the previous representable floating point number.
- *
- * (-Float::MAX).prev_float and (-Float::INFINITY).prev_float is -Float::INFINITY.
- *
- * Float::NAN.prev_float is Float::NAN.
- *
- * For example:
- *
- * 0.01.prev_float #=> 0.009999999999999998
- * 1.0.prev_float #=> 0.9999999999999999
- * 100.0.prev_float #=> 99.99999999999999
- *
- * 0.01 - 0.01.prev_float #=> 1.734723475976807e-18
- * 1.0 - 1.0.prev_float #=> 1.1102230246251565e-16
- * 100.0 - 100.0.prev_float #=> 1.4210854715202004e-14
- *
- * f = 0.01; 20.times { printf "%-20a %s\n", f, f.to_s; f = f.prev_float }
- * #=> 0x1.47ae147ae147bp-7 0.01
- * # 0x1.47ae147ae147ap-7 0.009999999999999998
- * # 0x1.47ae147ae1479p-7 0.009999999999999997
- * # 0x1.47ae147ae1478p-7 0.009999999999999995
- * # 0x1.47ae147ae1477p-7 0.009999999999999993
- * # 0x1.47ae147ae1476p-7 0.009999999999999992
- * # 0x1.47ae147ae1475p-7 0.00999999999999999
- * # 0x1.47ae147ae1474p-7 0.009999999999999988
- * # 0x1.47ae147ae1473p-7 0.009999999999999986
- * # 0x1.47ae147ae1472p-7 0.009999999999999985
- * # 0x1.47ae147ae1471p-7 0.009999999999999983
- * # 0x1.47ae147ae147p-7 0.009999999999999981
- * # 0x1.47ae147ae146fp-7 0.00999999999999998
- * # 0x1.47ae147ae146ep-7 0.009999999999999978
- * # 0x1.47ae147ae146dp-7 0.009999999999999976
- * # 0x1.47ae147ae146cp-7 0.009999999999999974
- * # 0x1.47ae147ae146bp-7 0.009999999999999972
- * # 0x1.47ae147ae146ap-7 0.00999999999999997
- * # 0x1.47ae147ae1469p-7 0.009999999999999969
- * # 0x1.47ae147ae1468p-7 0.009999999999999967
+ * Returns the next-smaller representable \Float.
+ *
+ * These examples show the internally stored values (64-bit hexadecimal)
+ * for each \Float +f+ and for the corresponding f.pev_float:
+ *
+ * f = 5e-324 # 0x0000000000000001
+ * f.prev_float # 0x0000000000000000
+ *
+ * f = 0.01 # 0x3f847ae147ae147b
+ * f.prev_float # 0x3f847ae147ae147a
+ *
+ * In the remaining examples here, the output is shown in the usual way
+ * (result +to_s+):
+ *
+ * 0.01.prev_float # => 0.009999999999999998
+ * 1.0.prev_float # => 0.9999999999999999
+ * 100.0.prev_float # => 99.99999999999999
+ *
+ * f = 0.01
+ * (0..3).each_with_index {|i| printf "%2d %-20a %s\n", i, f, f.to_s; f = f.prev_float }
+ *
+ * Output:
+ *
+ * 0 0x1.47ae147ae147bp-7 0.01
+ * 1 0x1.47ae147ae147ap-7 0.009999999999999998
+ * 2 0x1.47ae147ae1479p-7 0.009999999999999997
+ * 3 0x1.47ae147ae1478p-7 0.009999999999999995
+ *
+ * Related: Float#next_float.
+ *
*/
static VALUE
flo_prev_float(VALUE vx)
@@ -2026,45 +2156,6 @@ rb_float_floor(VALUE num, int ndigits)
}
}
-/*
- * call-seq:
- * float.floor([ndigits]) -> integer or float
- *
- * Returns the largest number less than or equal to +float+ with
- * a precision of +ndigits+ decimal digits (default: 0).
- *
- * When the precision is negative, the returned value is an integer
- * with at least ndigits.abs
trailing zeros.
- *
- * Returns a floating point number when +ndigits+ is positive,
- * otherwise returns an integer.
- *
- * 1.2.floor #=> 1
- * 2.0.floor #=> 2
- * (-1.2).floor #=> -2
- * (-2.0).floor #=> -2
- *
- * 1.234567.floor(2) #=> 1.23
- * 1.234567.floor(3) #=> 1.234
- * 1.234567.floor(4) #=> 1.2345
- * 1.234567.floor(5) #=> 1.23456
- *
- * 34567.89.floor(-5) #=> 0
- * 34567.89.floor(-4) #=> 30000
- * 34567.89.floor(-3) #=> 34000
- * 34567.89.floor(-2) #=> 34500
- * 34567.89.floor(-1) #=> 34560
- * 34567.89.floor(0) #=> 34567
- * 34567.89.floor(1) #=> 34567.8
- * 34567.89.floor(2) #=> 34567.89
- * 34567.89.floor(3) #=> 34567.89
- *
- * Note that the limited precision of floating point arithmetic
- * might lead to surprising results:
- *
- * (0.3 / 0.1).floor #=> 2 (!)
- */
-
static int
flo_ndigits(int argc, VALUE *argv)
{
@@ -2074,6 +2165,42 @@ flo_ndigits(int argc, VALUE *argv)
return 0;
}
+/*
+ * call-seq:
+ * floor(ndigits = 0) -> float or integer
+ *
+ * Returns the largest number less than or equal to +self+ with
+ * a precision of +ndigits+ decimal digits.
+ *
+ * When +ndigits+ is positive, returns a float with +ndigits+
+ * digits after the decimal point (as available):
+ *
+ * f = 12345.6789
+ * f.floor(1) # => 12345.6
+ * f.floor(3) # => 12345.678
+ * f = -12345.6789
+ * f.floor(1) # => -12345.7
+ * f.floor(3) # => -12345.679
+ *
+ * When +ndigits+ is non-positive, returns an integer with at least
+ * ndigits.abs
trailing zeros:
+ *
+ * f = 12345.6789
+ * f.floor(0) # => 12345
+ * f.floor(-3) # => 12000
+ * f = -12345.6789
+ * f.floor(0) # => -12346
+ * f.floor(-3) # => -13000
+ *
+ * Note that the limited precision of floating-point arithmetic
+ * may lead to surprising results:
+ *
+ * (0.3 / 0.1).floor #=> 2 (!)
+ *
+ * Related: Float#ceil.
+ *
+ */
+
static VALUE
flo_floor(int argc, VALUE *argv, VALUE num)
{
@@ -2083,41 +2210,38 @@ flo_floor(int argc, VALUE *argv, VALUE num)
/*
* call-seq:
- * float.ceil([ndigits]) -> integer or float
+ * ceil(ndigits = 0) -> float or integer
+ *
+ * Returns the smallest number greater than or equal to +self+ with
+ * a precision of +ndigits+ decimal digits.
*
- * Returns the smallest number greater than or equal to +float+ with
- * a precision of +ndigits+ decimal digits (default: 0).
+ * When +ndigits+ is positive, returns a float with +ndigits+
+ * digits after the decimal point (as available):
*
- * When the precision is negative, the returned value is an integer
- * with at least ndigits.abs
trailing zeros.
- *
- * Returns a floating point number when +ndigits+ is positive,
- * otherwise returns an integer.
- *
- * 1.2.ceil #=> 2
- * 2.0.ceil #=> 2
- * (-1.2).ceil #=> -1
- * (-2.0).ceil #=> -2
- *
- * 1.234567.ceil(2) #=> 1.24
- * 1.234567.ceil(3) #=> 1.235
- * 1.234567.ceil(4) #=> 1.2346
- * 1.234567.ceil(5) #=> 1.23457
- *
- * 34567.89.ceil(-5) #=> 100000
- * 34567.89.ceil(-4) #=> 40000
- * 34567.89.ceil(-3) #=> 35000
- * 34567.89.ceil(-2) #=> 34600
- * 34567.89.ceil(-1) #=> 34570
- * 34567.89.ceil(0) #=> 34568
- * 34567.89.ceil(1) #=> 34567.9
- * 34567.89.ceil(2) #=> 34567.89
- * 34567.89.ceil(3) #=> 34567.89
- *
- * Note that the limited precision of floating point arithmetic
- * might lead to surprising results:
+ * f = 12345.6789
+ * f.ceil(1) # => 12345.7
+ * f.ceil(3) # => 12345.679
+ * f = -12345.6789
+ * f.ceil(1) # => -12345.6
+ * f.ceil(3) # => -12345.678
+ *
+ * When +ndigits+ is non-positive, returns an integer with at least
+ * ndigits.abs
trailing zeros:
+ *
+ * f = 12345.6789
+ * f.ceil(0) # => 12346
+ * f.ceil(-3) # => 13000
+ * f = -12345.6789
+ * f.ceil(0) # => -12345
+ * f.ceil(-3) # => -12000
+ *
+ * Note that the limited precision of floating-point arithmetic
+ * may lead to surprising results:
*
* (2.1 / 0.7).ceil #=> 4 (!)
+ *
+ * Related: Float#floor.
+ *
*/
static VALUE
@@ -2326,54 +2450,57 @@ rb_int_truncate(VALUE num, int ndigits)
/*
* call-seq:
- * float.round([ndigits] [, half: mode]) -> integer or float
+ * round(ndigits = 0, half: :up]) -> integer or float
*
- * Returns +float+ rounded to the nearest value with
- * a precision of +ndigits+ decimal digits (default: 0).
+ * Returns +self+ rounded to the nearest value with
+ * a precision of +ndigits+ decimal digits.
+ *
+ * When +ndigits+ is non-negative, returns a float with +ndigits+
+ * after the decimal point (as available):
+ *
+ * f = 12345.6789
+ * f.round(1) # => 12345.7
+ * f.round(3) # => 12345.679
+ * f = -12345.6789
+ * f.round(1) # => -12345.7
+ * f.round(3) # => -12345.679
+ *
+ * When +ndigits+ is negative, returns an integer
+ * with at least ndigits.abs trailing zeros:
+ *
+ * f = 12345.6789
+ * f.round(0) # => 12346
+ * f.round(-3) # => 12000
+ * f = -12345.6789
+ * f.round(0) # => -12346
+ * f.round(-3) # => -12000
+ *
+ * If keyword argument +half+ is given,
+ * and +self+ is equidistant from the two candidate values,
+ * the rounding is according to the given +half+ value:
+ *
+ * - +:up+ or +nil+: round away from zero:
+ *
+ * 2.5.round(half: :up) # => 3
+ * 3.5.round(half: :up) # => 4
+ * (-2.5).round(half: :up) # => -3
+ *
+ * - +:down+: round toward zero:
+ *
+ * 2.5.round(half: :down) # => 2
+ * 3.5.round(half: :down) # => 3
+ * (-2.5).round(half: :down) # => -2
+ *
+ * - +:even+: round toward the candidate whose last nonzero digit is even:
+ *
+ * 2.5.round(half: :even) # => 2
+ * 3.5.round(half: :even) # => 4
+ * (-2.5).round(half: :even) # => -2
+ *
+ * Raises and exception if the value for +half+ is invalid.
+ *
+ * Related: Float#truncate.
*
- * When the precision is negative, the returned value is an integer
- * with at least ndigits.abs
trailing zeros.
- *
- * Returns a floating point number when +ndigits+ is positive,
- * otherwise returns an integer.
- *
- * 1.4.round #=> 1
- * 1.5.round #=> 2
- * 1.6.round #=> 2
- * (-1.5).round #=> -2
- *
- * 1.234567.round(2) #=> 1.23
- * 1.234567.round(3) #=> 1.235
- * 1.234567.round(4) #=> 1.2346
- * 1.234567.round(5) #=> 1.23457
- *
- * 34567.89.round(-5) #=> 0
- * 34567.89.round(-4) #=> 30000
- * 34567.89.round(-3) #=> 35000
- * 34567.89.round(-2) #=> 34600
- * 34567.89.round(-1) #=> 34570
- * 34567.89.round(0) #=> 34568
- * 34567.89.round(1) #=> 34567.9
- * 34567.89.round(2) #=> 34567.89
- * 34567.89.round(3) #=> 34567.89
- *
- * If the optional +half+ keyword argument is given,
- * numbers that are half-way between two possible rounded values
- * will be rounded according to the specified tie-breaking +mode+:
- *
- * * :up
or +nil+: round half away from zero (default)
- * * :down
: round half toward zero
- * * :even
: round half toward the nearest even number
- *
- * 2.5.round(half: :up) #=> 3
- * 2.5.round(half: :down) #=> 2
- * 2.5.round(half: :even) #=> 2
- * 3.5.round(half: :up) #=> 4
- * 3.5.round(half: :down) #=> 3
- * 3.5.round(half: :even) #=> 4
- * (-2.5).round(half: :up) #=> -3
- * (-2.5).round(half: :down) #=> -2
- * (-2.5).round(half: :even) #=> -2
*/
static VALUE
@@ -2454,20 +2581,19 @@ float_round_underflow(int ndigits, int binexp)
/*
* call-seq:
- * float.to_i -> integer
- * float.to_int -> integer
+ * to_i -> integer
*
- * Returns the +float+ truncated to an Integer.
+ * Returns +self+ truncated to an Integer.
*
- * 1.2.to_i #=> 1
- * (-1.2).to_i #=> -1
+ * 1.2.to_i # => 1
+ * (-1.2).to_i # => -1
*
- * Note that the limited precision of floating point arithmetic
- * might lead to surprising results:
+ * Note that the limited precision of floating-point arithmetic
+ * may lead to surprising results:
*
- * (0.3 / 0.1).to_i #=> 2 (!)
+ * (0.3 / 0.1).to_i # => 2 (!)
*
- * #to_int is an alias for #to_i.
+ * Float#to_int is an alias for Float#to_i.
*/
static VALUE
@@ -2483,26 +2609,38 @@ flo_to_i(VALUE num)
/*
* call-seq:
- * float.truncate([ndigits]) -> integer or float
+ * truncate(ndigits = 0) -> float or integer
*
- * Returns +float+ truncated (toward zero) to
- * a precision of +ndigits+ decimal digits (default: 0).
+ * Returns +self+ truncated (toward zero) to
+ * a precision of +ndigits+ decimal digits.
*
- * When the precision is negative, the returned value is an integer
- * with at least ndigits.abs
trailing zeros.
+ * When +ndigits+ is positive, returns a float with +ndigits+ digits
+ * after the decimal point (as available):
+ *
+ * f = 12345.6789
+ * f.truncate(1) # => 12345.6
+ * f.truncate(3) # => 12345.678
+ * f = -12345.6789
+ * f.truncate(1) # => -12345.6
+ * f.truncate(3) # => -12345.678
*
- * Returns a floating point number when +ndigits+ is positive,
- * otherwise returns an integer.
+ * When +ndigits+ is negative, returns an integer
+ * with at least ndigits.abs trailing zeros:
*
- * 2.8.truncate #=> 2
- * (-2.8).truncate #=> -2
- * 1.234567.truncate(2) #=> 1.23
- * 34567.89.truncate(-2) #=> 34500
+ * f = 12345.6789
+ * f.truncate(0) # => 12345
+ * f.truncate(-3) # => 12000
+ * f = -12345.6789
+ * f.truncate(0) # => -12345
+ * f.truncate(-3) # => -12000
*
- * Note that the limited precision of floating point arithmetic
- * might lead to surprising results:
+ * Note that the limited precision of floating-point arithmetic
+ * may lead to surprising results:
*
* (0.3 / 0.1).truncate #=> 2 (!)
+ *
+ * Related: Float#round.
+ *
*/
static VALUE
flo_truncate(int argc, VALUE *argv, VALUE num)
@@ -3340,8 +3478,95 @@ rb_num2ull(VALUE val)
*
* Document-class: Integer
*
- * Holds Integer values. You cannot add a singleton method to an
- * Integer object, any attempt to do so will raise a TypeError.
+ * An \Integer object represents an integer value.
+ *
+ * You can create an \Integer object explicitly with:
+ *
+ * - An {integer literal}[doc/syntax/literals_rdoc.html#label-Integer+Literals].
+ *
+ * You can convert certain objects to Integers with:
+ *
+ * - \Method {Integer}[Kernel.html#method-i-Integer].
+ *
+ * An attempt to add a singleton method to an instance of this class
+ * causes an exception to be raised.
+ *
+ * == What's Here
+ *
+ * First, what's elsewhere. \Class \Integer:
+ *
+ * - Inherits from {class Numeric}[Numeric.html#class-Numeric-label-What-27s+Here].
+ *
+ * Here, class \Integer provides methods for:
+ *
+ * - {Querying}[#class-Integer-label-Querying]
+ * - {Comparing}[#class-Integer-label-Comparing]
+ * - {Converting}[#class-Integer-label-Converting]
+ * - {Other}[#class-Integer-label-Other]
+ *
+ * === Querying
+ *
+ * - #allbits?:: Returns whether all bits in +self+ are set.
+ * - #anybits?:: Returns whether any bits in +self+ are set.
+ * - #nobits?:: Returns whether no bits in +self+ are set.
+ *
+ * === Comparing
+ *
+ * - {<}[#method-i-3C]:: Returns whether +self+ is less than the given value.
+ * - {<=}[#method-i-3C-3D]:: Returns whether +self+ is less than
+ * or equal to the given value.
+ * - {<=>}[#method-i-3C-3D-3E]:: Returns a number indicating whether +self+ is less than,
+ * equal to, or greater than the given value.
+ * - {==}[#method-i-3D-3D] (aliased as #===):: Returns whether +self+ is
+ * equal to the given value.
+ * - {>}[#method-i-3E]:: Returns whether +self+ is greater than the given value.
+ * - {>=}[#method-i-3E-3D]:: Returns whether +self+ is greater than
+ * or equal to the given value.
+ *
+ * === Converting
+ *
+ * - ::sqrt:: Returns the integer square root of the given value.
+ * - ::try_convert:: Returns the given value converted to an \Integer.
+ * - #% (aliased as #modulo):: Returns +self+ modulo the given value.
+ * - {&}[#method-i-26]:: Returns the bitwise AND of +self+ and the given value.
+ * - #*:: Returns the product of +self+ and the given value.
+ * - {**}[#method-i-2A-2A]:: Returns the value of +self+ raised to the power of the given value.
+ * - #+:: Returns the sum of +self+ and the given value.
+ * - #-:: Returns the difference of +self+ and the given value.
+ * - {/}[#method-i-2F]:: Returns the quotient of +self+ and the given value.
+ * - #<<:: Returns the value of +self+ after a leftward bit-shift.
+ * - #>>:: Returns the value of +self+ after a rightward bit-shift.
+ * - #[]:: Returns a slice of bits from +self+.
+ * - {^}[#method-i-5E]:: Returns the bitwise EXCLUSIVE OR of +self+ and the given value.
+ * - #ceil:: Returns the smallest number greater than or equal to +self+.
+ * - #chr:: Returns a 1-character string containing the character
+ * represented by the value of +self+.
+ * - #digits:: Returns an array of integers representing the base-radix digits
+ * of +self+.
+ * - #div:: Returns the integer result of dividing +self+ by the given value.
+ * - #divmod:: Returns a 2-element array containing the quotient and remainder
+ * results of dividing +self+ by the given value.
+ * - #fdiv:: Returns the Float result of dividing +self+ by the given value.
+ * - #floor:: Returns the greatest number smaller than or equal to +self+.
+ * - #pow:: Returns the modular exponentiation of +self+.
+ * - #pred:: Returns the integer predecessor of +self+.
+ * - #remainder:: Returns the remainder after dividing +self+ by the given value.
+ * - #round:: Returns +self+ rounded to the nearest value with the given precision.
+ * - #succ (aliased as #next):: Returns the integer successor of +self+.
+ * - #to_f:: Returns +self+ converted to a Float.
+ * - #to_s (aliased as #inspect):: Returns a string containing the place-value
+ * representation of +self+ in the given radix.
+ * - #truncate:: Returns +self+ truncated to the given precision.
+ * - {/}[#method-i-7C]:: Returns the bitwise OR of +self+ and the given value.
+ *
+ * === Other
+ *
+ * - #downto:: Calls the given block with each integer value from +self+
+ * down to the given value.
+ * - #times:: Calls the given block +self+ times with each integer
+ * in (0..self-1).
+ * - #upto:: Calls the given block with each integer value from +self+
+ * up to the given value.
*
*/
@@ -5478,9 +5703,9 @@ int_dotimes(VALUE num)
VALUE i = INT2FIX(0);
for (;;) {
- if (!RTEST(rb_funcall(i, '<', 1, num))) break;
+ if (!RTEST(int_le(i, num))) break;
rb_yield(i);
- i = rb_funcall(i, '+', 1, INT2FIX(1));
+ i = rb_int_plus(i, INT2FIX(1));
}
}
return num;
@@ -5898,7 +6123,7 @@ int_s_try_convert(VALUE self, VALUE num)
* - {<=>}[#method-i-3C-3D-3E]:: Returns:
* - -1 if +self+ is less than the given value.
* - 0 if +self+ is equal to the given value.
- * - 1 if +self is greater than the given value.
+ * - 1 if +self+ is greater than the given value.
* - +nil+ if +self+ and the given value are not comparable.
* - #eql?:: Returns whether +self+ and the given value have the same value and type.
*
diff --git a/object.c b/object.c
index 0f67b27667807e..705ba7ff1c4a5e 100644
--- a/object.c
+++ b/object.c
@@ -4660,6 +4660,7 @@ InitVM_Object(void)
rb_define_method(rb_cClass, "initialize", rb_class_initialize, -1);
rb_define_method(rb_cClass, "superclass", rb_class_superclass, 0);
rb_define_method(rb_cClass, "descendants", rb_class_descendants, 0); /* in class.c */
+ rb_define_method(rb_cClass, "subclasses", rb_class_subclasses, 0); /* in class.c */
rb_define_alloc_func(rb_cClass, rb_class_s_alloc);
rb_undef_method(rb_cClass, "extend_object");
rb_undef_method(rb_cClass, "append_features");
diff --git a/parse.y b/parse.y
index b6498651bfb1b3..ed215ad1be75fd 100644
--- a/parse.y
+++ b/parse.y
@@ -574,7 +574,7 @@ static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
-static ID *local_tbl(struct parser_params*);
+static rb_ast_id_table_t *local_tbl(struct parser_params*);
static VALUE reg_compile(struct parser_params*, VALUE, int);
static void reg_fragment_setenc(struct parser_params*, VALUE, int);
@@ -607,7 +607,7 @@ ripper_new_yylval(struct parser_params *p, ID a, VALUE b, VALUE c)
static inline int
ripper_is_node_yylval(VALUE n)
{
- return RB_TYPE_P(n, T_NODE) && nd_type(RNODE(n)) == NODE_RIPPER;
+ return RB_TYPE_P(n, T_NODE) && nd_type_p(RNODE(n), NODE_RIPPER);
}
#define value_expr(node) ((void)(node))
@@ -1335,7 +1335,7 @@ program : {
if ($2 && !compile_for_eval) {
NODE *node = $2;
/* last expression should not be void */
- if (nd_type(node) == NODE_BLOCK) {
+ if (nd_type_p(node, NODE_BLOCK)) {
while (node->nd_next) {
node = node->nd_next;
}
@@ -1530,7 +1530,7 @@ stmt : keyword_alias fitem {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);} fitem
| stmt modifier_while expr_value
{
/*%%%*/
- if ($1 && nd_type($1) == NODE_BEGIN) {
+ if ($1 && nd_type_p($1, NODE_BEGIN)) {
$$ = NEW_WHILE(cond(p, $3, &@3), $1->nd_body, 0, &@$);
}
else {
@@ -1542,7 +1542,7 @@ stmt : keyword_alias fitem {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);} fitem
| stmt modifier_until expr_value
{
/*%%%*/
- if ($1 && nd_type($1) == NODE_BEGIN) {
+ if ($1 && nd_type_p($1, NODE_BEGIN)) {
$$ = NEW_UNTIL(cond(p, $3, &@3), $1->nd_body, 0, &@$);
}
else {
@@ -2973,7 +2973,7 @@ primary : literal
| tLPAREN_ARG stmt {SET_LEX_STATE(EXPR_ENDARG);} rparen
{
/*%%%*/
- if (nd_type($2) == NODE_SELF) $2->nd_state = 0;
+ if (nd_type_p($2, NODE_SELF)) $2->nd_state = 0;
$$ = $2;
/*% %*/
/*% ripper: paren!($2) %*/
@@ -2981,7 +2981,7 @@ primary : literal
| tLPAREN compstmt ')'
{
/*%%%*/
- if (nd_type($2) == NODE_SELF) $2->nd_state = 0;
+ if (nd_type_p($2, NODE_SELF)) $2->nd_state = 0;
$$ = $2;
/*% %*/
/*% ripper: paren!($2) %*/
@@ -3172,9 +3172,8 @@ primary : literal
ID id = internal_id(p);
NODE *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
NODE *args, *scope, *internal_var = NEW_DVAR(id, &@2);
- ID *tbl = ALLOC_N(ID, 3);
- tbl[0] = 1 /* length of local var table */; tbl[1] = id /* internal id */;
- rb_ast_add_local_table(p->ast, tbl);
+ rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
+ tbl->ids[0] = id; /* internal id */
switch (nd_type($2)) {
case NODE_LASGN:
@@ -3836,7 +3835,7 @@ do_block : k_do_block do_body k_end
block_call : command do_block
{
/*%%%*/
- if (nd_type($1) == NODE_YIELD) {
+ if (nd_type_p($1, NODE_YIELD)) {
compile_error(p, "block given to yield");
}
else {
@@ -3935,7 +3934,7 @@ method_call : fcall paren_args
| primary_value '[' opt_call_args rbracket
{
/*%%%*/
- if ($1 && nd_type($1) == NODE_SELF)
+ if ($1 && nd_type_p($1, NODE_SELF))
$$ = NEW_FCALL(tAREF, $3, &@$);
else
$$ = NEW_CALL($1, tAREF, $3, &@$);
@@ -4425,7 +4424,7 @@ p_kw_label : tLABEL
{
YYLTYPE loc = code_loc_gen(&@1, &@3);
/*%%%*/
- if (!$2 || nd_type($2) == NODE_STR) {
+ if (!$2 || nd_type_p($2, NODE_STR)) {
NODE *node = dsym_node(p, $2, &loc);
$$ = SYM2ID(node->nd_lit);
}
@@ -4552,7 +4551,7 @@ p_var_ref : '^' tIDENTIFIER
{
/*%%%*/
NODE *n = gettable(p, $2, &@$);
- if (!(nd_type(n) == NODE_LVAR || nd_type(n) == NODE_DVAR)) {
+ if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str($2));
}
$$ = n;
@@ -5625,8 +5624,8 @@ assocs : assoc
}
else if (tail) {
if (assocs->nd_head &&
- !tail->nd_head && nd_type(tail->nd_next) == NODE_LIST &&
- nd_type(tail->nd_next->nd_head) == NODE_HASH) {
+ !tail->nd_head && nd_type_p(tail->nd_next, NODE_LIST) &&
+ nd_type_p(tail->nd_next->nd_head, NODE_HASH)) {
/* DSTAR */
tail = tail->nd_next->nd_head->nd_head;
}
@@ -5641,7 +5640,7 @@ assocs : assoc
assoc : arg_value tASSOC arg_value
{
/*%%%*/
- if (nd_type($1) == NODE_STR) {
+ if (nd_type_p($1, NODE_STR)) {
nd_set_type($1, NODE_LIT);
RB_OBJ_WRITE(p->ast, &$1->nd_lit, rb_fstring($1->nd_lit));
}
@@ -5676,7 +5675,7 @@ assoc : arg_value tASSOC arg_value
| tDSTAR arg_value
{
/*%%%*/
- if (nd_type($2) == NODE_HASH &&
+ if (nd_type_p($2, NODE_HASH) &&
!($2->nd_head && $2->nd_head->nd_alen)) {
static VALUE empty_hash;
if (!empty_hash) {
@@ -7644,7 +7643,7 @@ heredoc_dedent(struct parser_params *p, NODE *root)
if (!root) return root;
prev_node = node = str_node = root;
- if (nd_type(root) == NODE_LIST) str_node = root->nd_head;
+ if (nd_type_p(root, NODE_LIST)) str_node = root->nd_head;
while (str_node) {
VALUE lit = str_node->nd_lit;
@@ -7661,7 +7660,7 @@ heredoc_dedent(struct parser_params *p, NODE *root)
NODE *end = node->nd_end;
node = prev_node->nd_next = node->nd_next;
if (!node) {
- if (nd_type(prev_node) == NODE_DSTR)
+ if (nd_type_p(prev_node, NODE_DSTR))
nd_set_type(prev_node, NODE_STR);
break;
}
@@ -7672,7 +7671,7 @@ heredoc_dedent(struct parser_params *p, NODE *root)
str_node = 0;
while ((node = (prev_node = node)->nd_next) != 0) {
next_str:
- if (nd_type(node) != NODE_LIST) break;
+ if (!nd_type_p(node, NODE_LIST)) break;
if ((str_node = node->nd_head) != 0) {
enum node_type type = nd_type(str_node);
if (type == NODE_STR || type == NODE_DSTR) break;
@@ -10059,7 +10058,7 @@ block_append(struct parser_params *p, NODE *head, NODE *tail)
break;
}
- if (nd_type(tail) != NODE_BLOCK) {
+ if (!nd_type_p(tail, NODE_BLOCK)) {
tail = NEW_BLOCK(tail, &tail->nd_loc);
tail->nd_end = tail;
}
@@ -10141,7 +10140,7 @@ string_literal_head(enum node_type htype, NODE *head)
if (htype != NODE_DSTR) return Qfalse;
if (head->nd_next) {
head = head->nd_next->nd_end->nd_head;
- if (!head || nd_type(head) != NODE_STR) return Qfalse;
+ if (!head || !nd_type_p(head, NODE_STR)) return Qfalse;
}
const VALUE lit = head->nd_lit;
ASSUME(lit != Qfalse);
@@ -10240,7 +10239,7 @@ literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *l
static NODE *
evstr2dstr(struct parser_params *p, NODE *node)
{
- if (nd_type(node) == NODE_EVSTR) {
+ if (nd_type_p(node, NODE_EVSTR)) {
node = new_dstr(p, node, &node->nd_loc);
}
return node;
@@ -10315,7 +10314,7 @@ new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *a
return ret;
}
-#define nd_once_body(node) (nd_type(node) == NODE_ONCE ? (node)->nd_body : node)
+#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? (node)->nd_body : node)
static NODE*
match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
{
@@ -10637,7 +10636,7 @@ check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
lit = rb_node_case_when_optimizable_literal(arg);
if (lit == Qundef) return;
- if (nd_type(arg) == NODE_STR) {
+ if (nd_type_p(arg, NODE_STR)) {
RB_OBJ_WRITTEN(p->ast, Qnil, arg->nd_lit = lit);
}
@@ -10998,7 +10997,7 @@ aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
static void
block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
{
- if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) {
+ if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
compile_error(p, "both block arg and actual block given");
}
}
@@ -11050,7 +11049,7 @@ arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc
nd_set_type(node1, NODE_ARGSCAT);
return node1;
case NODE_ARGSCAT:
- if (nd_type(node1->nd_body) != NODE_LIST) break;
+ if (!nd_type_p(node1->nd_body, NODE_LIST)) break;
node1->nd_body = list_append(p, node1->nd_body, node2);
node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
return node1;
@@ -11070,13 +11069,13 @@ arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc
node1->nd_head = NEW_LIST(node2, loc);
return node1;
case NODE_ARGSPUSH:
- if (nd_type(node2) != NODE_LIST) break;
+ if (!nd_type_p(node2, NODE_LIST)) break;
node1->nd_body = list_concat(NEW_LIST(node1->nd_body, loc), node2);
nd_set_type(node1, NODE_ARGSCAT);
return node1;
case NODE_ARGSCAT:
- if (nd_type(node2) != NODE_LIST ||
- nd_type(node1->nd_body) != NODE_LIST) break;
+ if (!nd_type_p(node2, NODE_LIST) ||
+ !nd_type_p(node1->nd_body, NODE_LIST)) break;
node1->nd_body = list_concat(node1->nd_body, node2);
return node1;
}
@@ -11097,7 +11096,7 @@ static NODE *
rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
{
NODE *n1;
- if ((nd_type(rest_arg) == NODE_LIST) && (n1 = splat_array(args)) != 0) {
+ if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
return list_concat(n1, rest_arg);
}
return arg_concat(p, args, rest_arg, loc);
@@ -11106,8 +11105,8 @@ rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTY
static NODE *
splat_array(NODE* node)
{
- if (nd_type(node) == NODE_SPLAT) node = node->nd_head;
- if (nd_type(node) == NODE_LIST) return node;
+ if (nd_type_p(node, NODE_SPLAT)) node = node->nd_head;
+ if (nd_type_p(node, NODE_LIST)) return node;
return 0;
}
@@ -11142,7 +11141,7 @@ static NODE *
const_decl_path(struct parser_params *p, NODE **dest)
{
NODE *n = *dest;
- if (nd_type(n) != NODE_CALL) {
+ if (!nd_type_p(n, NODE_CALL)) {
const YYLTYPE *loc = &n->nd_loc;
VALUE path;
if (n->nd_vid) {
@@ -11151,14 +11150,14 @@ const_decl_path(struct parser_params *p, NODE **dest)
else {
n = n->nd_else;
path = rb_ary_new();
- for (; n && nd_type(n) == NODE_COLON2; n = n->nd_head) {
+ for (; n && nd_type_p(n, NODE_COLON2); n = n->nd_head) {
rb_ary_push(path, rb_id2str(n->nd_mid));
}
- if (n && nd_type(n) == NODE_CONST) {
+ if (n && nd_type_p(n, NODE_CONST)) {
// Const::Name
rb_ary_push(path, rb_id2str(n->nd_vid));
}
- else if (n && nd_type(n) == NODE_COLON3) {
+ else if (n && nd_type_p(n, NODE_COLON3)) {
// ::Const::Name
rb_ary_push(path, rb_str_new(0, 0));
}
@@ -11436,7 +11435,7 @@ value_expr_check(struct parser_params *p, NODE *node)
return void_node ? void_node : node;
case NODE_CASE3:
- if (!node->nd_body || nd_type(node->nd_body) != NODE_IN) {
+ if (!node->nd_body || !nd_type_p(node->nd_body, NODE_IN)) {
compile_error(p, "unexpected node");
return NULL;
}
@@ -11592,7 +11591,7 @@ void_stmts(struct parser_params *p, NODE *node)
NODE *const n = node;
if (!RTEST(ruby_verbose)) return n;
if (!node) return n;
- if (nd_type(node) != NODE_BLOCK) return n;
+ if (!nd_type_p(node, NODE_BLOCK)) return n;
while (node->nd_next) {
void_expr(p, node->nd_head);
@@ -11605,7 +11604,7 @@ static NODE *
remove_begin(NODE *node)
{
NODE **n = &node, *n1 = node;
- while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) {
+ while (n1 && nd_type_p(n1, NODE_BEGIN) && n1->nd_body) {
*n = n1 = n1->nd_body;
}
return node;
@@ -11615,7 +11614,7 @@ static NODE *
remove_begin_all(NODE *node)
{
NODE **n = &node, *n1 = node;
- while (n1 && nd_type(n1) == NODE_BEGIN) {
+ while (n1 && nd_type_p(n1, NODE_BEGIN)) {
*n = n1 = n1->nd_body;
}
return node;
@@ -11792,8 +11791,8 @@ cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *l
case NODE_DOT3:
node->nd_beg = range_op(p, node->nd_beg, loc);
node->nd_end = range_op(p, node->nd_end, loc);
- if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
- else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
+ if (nd_type_p(node, NODE_DOT2)) nd_set_type(node,NODE_FLIP2);
+ else if (nd_type_p(node, NODE_DOT3)) nd_set_type(node, NODE_FLIP3);
break;
case NODE_DSYM:
@@ -11866,9 +11865,9 @@ logop(struct parser_params *p, ID id, NODE *left, NODE *right,
enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
NODE *op;
value_expr(left);
- if (left && (enum node_type)nd_type(left) == type) {
+ if (left && nd_type_p(left, type)) {
NODE *node = left, *second;
- while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) {
+ while ((second = node->nd_2nd) != 0 && nd_type_p(second, type)) {
node = second;
}
node->nd_2nd = NEW_NODE(type, second, right, 0, loc);
@@ -11884,7 +11883,7 @@ logop(struct parser_params *p, ID id, NODE *left, NODE *right,
static void
no_blockarg(struct parser_params *p, NODE *node)
{
- if (node && nd_type(node) == NODE_BLOCK_PASS) {
+ if (node && nd_type_p(node, NODE_BLOCK_PASS)) {
compile_error(p, "block argument should not be given");
}
}
@@ -11894,7 +11893,7 @@ ret_args(struct parser_params *p, NODE *node)
{
if (node) {
no_blockarg(p, node);
- if (nd_type(node) == NODE_LIST) {
+ if (nd_type_p(node, NODE_LIST)) {
if (node->nd_next == 0) {
node = node->nd_head;
}
@@ -12282,7 +12281,7 @@ remove_duplicate_keys(struct parser_params *p, NODE *hash)
st_data_t key = (st_data_t)head;
st_data_t data;
value->nd_next = 0;
- if (nd_type(head) == NODE_LIT &&
+ if (nd_type_p(head, NODE_LIT) &&
st_delete(literal_keys, (key = (st_data_t)head->nd_lit, &key), &data)) {
NODE *dup_value = ((NODE *)data)->nd_next;
rb_compile_warn(p->ruby_sourcefile, nd_line((NODE *)data),
@@ -12296,7 +12295,7 @@ remove_duplicate_keys(struct parser_params *p, NODE *hash)
}
}
st_insert(literal_keys, (st_data_t)key, (st_data_t)hash);
- last_expr = nd_type(head) == NODE_LIT ? value : head;
+ last_expr = nd_type_p(head, NODE_LIT) ? value : head;
hash = next;
}
st_foreach(literal_keys, append_literal_keys, (st_data_t)&result);
@@ -12418,7 +12417,7 @@ new_ary_op_assign(struct parser_params *p, NODE *ary,
NODE *asgn;
args = make_list(args, args_loc);
- if (nd_type(args) == NODE_BLOCK_PASS) {
+ if (nd_type_p(args, NODE_BLOCK_PASS)) {
args = NEW_ARGSCAT(args, rhs, loc);
}
else {
@@ -12585,38 +12584,36 @@ local_pop(struct parser_params *p)
}
#ifndef RIPPER
-static ID*
+static rb_ast_id_table_t *
local_tbl(struct parser_params *p)
{
int cnt_args = vtable_size(p->lvtbl->args);
int cnt_vars = vtable_size(p->lvtbl->vars);
int cnt = cnt_args + cnt_vars;
int i, j;
- ID *buf;
+ rb_ast_id_table_t *tbl;
if (cnt <= 0) return 0;
- buf = ALLOC_N(ID, cnt + 2);
- MEMCPY(buf+1, p->lvtbl->args->tbl, ID, cnt_args);
+ tbl = rb_ast_new_local_table(p->ast, cnt);
+ MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
/* remove IDs duplicated to warn shadowing */
- for (i = 0, j = cnt_args+1; i < cnt_vars; ++i) {
+ for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
ID id = p->lvtbl->vars->tbl[i];
if (!vtable_included(p->lvtbl->args, id)) {
- buf[j++] = id;
+ tbl->ids[j++] = id;
}
}
- if (--j < cnt) {
- REALLOC_N(buf, ID, (cnt = j) + 2);
+ if (j < cnt) {
+ tbl = rb_ast_resize_latest_local_table(p->ast, j);
}
- buf[0] = cnt;
- rb_ast_add_local_table(p->ast, buf);
- return buf;
+ return tbl;
}
static NODE*
node_newnode_with_locals(struct parser_params *p, enum node_type type, VALUE a1, VALUE a2, const rb_code_location_t *loc)
{
- ID *a0;
+ rb_ast_id_table_t *a0;
NODE *n;
a0 = local_tbl(p);
@@ -13093,10 +13090,7 @@ rb_init_parse(void)
static ID
internal_id(struct parser_params *p)
{
- const ID max_id = RB_ID_SERIAL_MAX & ~0xffff;
- ID id = (ID)vtable_size(p->lvtbl->args) + (ID)vtable_size(p->lvtbl->vars);
- id = max_id - id;
- return ID_STATIC_SYM | ID_INTERNAL | (id << ID_SCOPE_SHIFT);
+ return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
}
#endif /* !RIPPER */
@@ -13570,7 +13564,7 @@ ripper_validate_object(VALUE self, VALUE x)
case T_RATIONAL:
break;
case T_NODE:
- if (nd_type((NODE *)x) != NODE_RIPPER) {
+ if (!nd_type_p((NODE *)x, NODE_RIPPER)) {
rb_raise(rb_eArgError, "NODE given: %p", (void *)x);
}
x = ((NODE *)x)->nd_rval;
@@ -13659,7 +13653,7 @@ ripper_get_id(VALUE v)
NODE *nd;
if (!RB_TYPE_P(v, T_NODE)) return 0;
nd = (NODE *)v;
- if (nd_type(nd) != NODE_RIPPER) return 0;
+ if (!nd_type_p(nd, NODE_RIPPER)) return 0;
return nd->nd_vid;
}
@@ -13670,7 +13664,7 @@ ripper_get_value(VALUE v)
if (v == Qundef) return Qnil;
if (!RB_TYPE_P(v, T_NODE)) return v;
nd = (NODE *)v;
- if (nd_type(nd) != NODE_RIPPER) return Qnil;
+ if (!nd_type_p(nd, NODE_RIPPER)) return Qnil;
return nd->nd_rval;
}
diff --git a/proc.c b/proc.c
index 13996b102ad778..94b269d6946029 100644
--- a/proc.c
+++ b/proc.c
@@ -3845,7 +3845,8 @@ proc_ruby2_keywords(VALUE procval)
*
* lambda1 = lambda {|x| x**2 }
*
- * * Use the Lambda literal syntax (also constructs a proc with lambda semantics):
+ * * Use the {Lambda proc literal}[doc/syntax/literals_rdoc.html#label-Lambda+Proc+Literals] syntax
+ * (also constructs a proc with lambda semantics):
*
* lambda2 = ->(x) { x**2 }
*
diff --git a/range.c b/range.c
index 6ac7d794c65836..6eb7842313eda2 100644
--- a/range.c
+++ b/range.c
@@ -2050,14 +2050,16 @@ range_count(int argc, VALUE *argv, VALUE range)
/* A \Range object represents a collection of values
* that are between given begin and end values.
*
- * A range may be created using a literal:
- *
- * # Ranges that use '..' to include the given end value.
- * (1..4).to_a # => [1, 2, 3, 4]
- * ('a'..'d').to_a # => ["a", "b", "c", "d"]
- * # Ranges that use '...' to exclude the given end value.
- * (1...4).to_a # => [1, 2, 3]
- * ('a'...'d').to_a # => ["a", "b", "c"]
+ * You can create an \Range object explicitly with:
+ *
+ * - A {range literal}[doc/syntax/literals_rdoc.html#label-Range+Literals]:
+ *
+ * # Ranges that use '..' to include the given end value.
+ * (1..4).to_a # => [1, 2, 3, 4]
+ * ('a'..'d').to_a # => ["a", "b", "c", "d"]
+ * # Ranges that use '...' to exclude the given end value.
+ * (1...4).to_a # => [1, 2, 3]
+ * ('a'...'d').to_a # => ["a", "b", "c"]
*
* A range may be created using method Range.new:
*
diff --git a/rational.c b/rational.c
index b903decaf65582..7817bdbcefa770 100644
--- a/rational.c
+++ b/rational.c
@@ -2715,13 +2715,19 @@ nurat_s_convert(int argc, VALUE *argv, VALUE klass)
* a/b (b>0), where a is the numerator and b is the denominator.
* Integer a equals rational a/1 mathematically.
*
- * In Ruby, you can create rational objects with the Kernel#Rational,
- * to_r, or rationalize methods or by suffixing +r+ to a literal.
- * The return values will be irreducible fractions.
+ * You can create a \Rational object explicitly with:
+ *
+ * - A {rational literal}[doc/syntax/literals_rdoc.html#label-Rational+Literals].
+ *
+ * You can convert certain objects to Rationals with:
+ *
+ * - \Method {Rational}[Kernel.html#method-i-Rational].
+ *
+ * Examples
*
* Rational(1) #=> (1/1)
* Rational(2, 3) #=> (2/3)
- * Rational(4, -6) #=> (-2/3)
+ * Rational(4, -6) #=> (-2/3) # Reduced.
* 3.to_r #=> (3/1)
* 2/3r #=> (2/3)
*
diff --git a/re.c b/re.c
index cccedc9869082d..d91909a743542a 100644
--- a/re.c
+++ b/re.c
@@ -4082,6 +4082,10 @@ re_warn(const char *s)
* and %r{...}
literals, and by the Regexp::new
* constructor.
*
+ * You can create a \Regexp object explicitly with:
+ *
+ * - A {regexp literal}[doc/syntax/literals_rdoc.html#label-Regexp+Literals].
+ *
* :include: doc/regexp.rdoc
*/
diff --git a/ruby.c b/ruby.c
index c04810acf38a4d..b9ed1ae89c47af 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1884,12 +1884,6 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
*/
rb_warning("-K is specified; it is for 1.8 compatibility and may cause odd behavior");
-#ifdef __OpenBSD__
- /* Disable yjit on OpenBSD, stops --enable-all from failing with:
- mmap call failed: Not supported */
- opt->features.set &= ~FEATURE_BIT(yjit);
-#endif
-
#if USE_MJIT
if (opt->features.set & FEATURE_BIT(jit)) {
opt->mjit.on = TRUE; /* set mjit.on for ruby_show_version() API and check to call mjit_init() */
diff --git a/spec/bundler/bundler/compact_index_client/updater_spec.rb b/spec/bundler/bundler/compact_index_client/updater_spec.rb
index 4acd7dbc63416b..fe417e392067c9 100644
--- a/spec/bundler/bundler/compact_index_client/updater_spec.rb
+++ b/spec/bundler/bundler/compact_index_client/updater_spec.rb
@@ -36,16 +36,6 @@
end
end
- context "when bundler doesn't have permissions on Dir.tmpdir" do
- it "Errno::EACCES is raised" do
- allow(Bundler::Dir).to receive(:mktmpdir) { raise Errno::EACCES }
-
- expect do
- updater.update(local_path, remote_path)
- end.to raise_error(Bundler::PermissionError)
- end
- end
-
context "when receiving non UTF-8 data and default internal encoding set to ASCII" do
let(:response) { double(:response, :body => "\x8B".b) }
diff --git a/spec/bundler/bundler/dsl_spec.rb b/spec/bundler/bundler/dsl_spec.rb
index 4d14949c8949c4..a44a12924ce1ae 100644
--- a/spec/bundler/bundler/dsl_spec.rb
+++ b/spec/bundler/bundler/dsl_spec.rb
@@ -25,6 +25,45 @@
expect { subject.git_source(:example) }.to raise_error(Bundler::InvalidOption)
end
+ it "converts :github PR to URI using https" do
+ subject.gem("sparks", :github => "https://github.com/indirect/sparks/pull/5")
+ github_uri = "https://github.com/indirect/sparks.git"
+ expect(subject.dependencies.first.source.uri).to eq(github_uri)
+ expect(subject.dependencies.first.source.branch).to eq("refs/pull/5/head")
+ end
+
+ it "rejects :github PR URI with a branch, ref or tag" do
+ expect do
+ subject.gem("sparks", :github => "https://github.com/indirect/sparks/pull/5", :branch => "foo")
+ end.to raise_error(
+ Bundler::GemfileError,
+ %(The :branch option can't be used with `github: "https://github.com/indirect/sparks/pull/5"`),
+ )
+
+ expect do
+ subject.gem("sparks", :github => "https://github.com/indirect/sparks/pull/5", :ref => "foo")
+ end.to raise_error(
+ Bundler::GemfileError,
+ %(The :ref option can't be used with `github: "https://github.com/indirect/sparks/pull/5"`),
+ )
+
+ expect do
+ subject.gem("sparks", :github => "https://github.com/indirect/sparks/pull/5", :tag => "foo")
+ end.to raise_error(
+ Bundler::GemfileError,
+ %(The :tag option can't be used with `github: "https://github.com/indirect/sparks/pull/5"`),
+ )
+ end
+
+ it "rejects :github with :git" do
+ expect do
+ subject.gem("sparks", :github => "indirect/sparks", :git => "https://github.com/indirect/sparks.git")
+ end.to raise_error(
+ Bundler::GemfileError,
+ %(The :git option can't be used with `github: "indirect/sparks"`),
+ )
+ end
+
context "default hosts", :bundler => "< 3" do
it "converts :github to URI using https" do
subject.gem("sparks", :github => "indirect/sparks")
diff --git a/spec/bundler/commands/doctor_spec.rb b/spec/bundler/commands/doctor_spec.rb
index a59ccc540ae975..860b638f06e19a 100644
--- a/spec/bundler/commands/doctor_spec.rb
+++ b/spec/bundler/commands/doctor_spec.rb
@@ -79,7 +79,7 @@
it "exits with an error if home contains files that are not readable/writable" do
expect { Bundler::CLI::Doctor.new({}).run }.not_to raise_error
expect(@stdout.string).to include(
- "Broken links exist in the Bundler home. Please report them to the offending gem's upstream repo. These files are:\n - #{@unwritable_file}"
+ "Broken links exist in the Bundler home. Please report them to the offending gem's upstream repo. These files are:\n - #{@broken_symlink}"
)
expect(@stdout.string).not_to include("No issues")
end
@@ -133,4 +133,14 @@
end
end
end
+
+ context "when home contains filesname with special characters" do
+ it "escape filename before command execute" do
+ doctor = Bundler::CLI::Doctor.new({})
+ expect(doctor).to receive(:`).with("/usr/bin/otool -L \\$\\(date\\)\\ \\\"\\'\\\\.bundle").and_return("dummy string")
+ doctor.dylibs_darwin('$(date) "\'\.bundle')
+ expect(doctor).to receive(:`).with("/usr/bin/ldd \\$\\(date\\)\\ \\\"\\'\\\\.bundle").and_return("dummy string")
+ doctor.dylibs_ldd('$(date) "\'\.bundle')
+ end
+ end
end
diff --git a/spec/bundler/commands/info_spec.rb b/spec/bundler/commands/info_spec.rb
index 518f93511a383c..7f618b5f6cc301 100644
--- a/spec/bundler/commands/info_spec.rb
+++ b/spec/bundler/commands/info_spec.rb
@@ -50,6 +50,19 @@
expect(out).to eq(root.to_s)
end
+ it "prints gem version if exists in bundle" do
+ bundle "info rails --version"
+ expect(out).to eq("2.3.2")
+ end
+
+ it "doesn't claim that bundler has been deleted, even if using a custom path without bundler there" do
+ bundle "config set --local path vendor/bundle"
+ bundle "install"
+ bundle "info bundler"
+ expect(out).to include("\tPath: #{root}")
+ expect(err).not_to match(/The gem bundler has been deleted/i)
+ end
+
it "complains if gem not in bundle" do
bundle "info missing", :raise_on_error => false
expect(err).to eq("Could not find gem 'missing'.")
diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb
index 5ba513861c2a67..ddefe0ba25b665 100644
--- a/spec/bundler/commands/newgem_spec.rb
+++ b/spec/bundler/commands/newgem_spec.rb
@@ -513,6 +513,7 @@ def create_temporary_dir(dir)
expect(bundled_app("#{gem_name}/Rakefile")).to exist
expect(bundled_app("#{gem_name}/lib/#{require_path}.rb")).to exist
expect(bundled_app("#{gem_name}/lib/#{require_path}/version.rb")).to exist
+ expect(bundled_app("#{gem_name}/sig/#{require_path}.rbs")).to exist
expect(bundled_app("#{gem_name}/.gitignore")).to exist
expect(bundled_app("#{gem_name}/bin/setup")).to exist
@@ -529,6 +530,12 @@ def create_temporary_dir(dir)
expect(bundled_app("#{gem_name}/lib/#{require_path}/version.rb").read).to match(/VERSION = "0.1.0"/)
end
+ it "declare String type for VERSION constant" do
+ bundle "gem #{gem_name}"
+
+ expect(bundled_app("#{gem_name}/sig/#{require_path}.rbs").read).to match(/VERSION: String/)
+ end
+
context "git config user.{name,email} is set" do
before do
bundle "gem #{gem_name}"
diff --git a/spec/bundler/install/deploy_spec.rb b/spec/bundler/install/deploy_spec.rb
index 8f2650a932d3a4..54fc6371cb0ae3 100644
--- a/spec/bundler/install/deploy_spec.rb
+++ b/spec/bundler/install/deploy_spec.rb
@@ -357,11 +357,11 @@
bundle "config set --local deployment true"
bundle :install, :raise_on_error => false
expect(err).to include("deployment mode")
- expect(err).to include("You have added to the Gemfile:\n* source: git://hubz.com")
- expect(err).not_to include("You have changed in the Gemfile")
+ expect(err).not_to include("You have added to the Gemfile")
+ expect(err).to include("You have changed in the Gemfile:\n* rack from `no specified source` to `git://hubz.com`")
end
- it "explodes if you unpin a source" do
+ it "explodes if you change a source" do
build_git "rack"
install_gemfile <<-G
@@ -377,12 +377,12 @@
bundle "config set --local deployment true"
bundle :install, :raise_on_error => false
expect(err).to include("deployment mode")
- expect(err).to include("You have deleted from the Gemfile:\n* source: #{lib_path("rack-1.0")}")
+ expect(err).not_to include("You have deleted from the Gemfile")
expect(err).not_to include("You have added to the Gemfile")
- expect(err).not_to include("You have changed in the Gemfile")
+ expect(err).to include("You have changed in the Gemfile:\n* rack from `#{lib_path("rack-1.0")}` to `no specified source`")
end
- it "explodes if you unpin a source, leaving it pinned somewhere else" do
+ it "explodes if you change a source" do
build_lib "foo", :path => lib_path("rack/foo")
build_git "rack", :path => lib_path("rack")
@@ -401,7 +401,7 @@
bundle "config set --local deployment true"
bundle :install, :raise_on_error => false
expect(err).to include("deployment mode")
- expect(err).to include("You have changed in the Gemfile:\n* rack from `no specified source` to `#{lib_path("rack")}`")
+ expect(err).to include("You have changed in the Gemfile:\n* rack from `#{lib_path("rack")}` to `no specified source`")
expect(err).not_to include("You have added to the Gemfile")
expect(err).not_to include("You have deleted from the Gemfile")
end
diff --git a/spec/bundler/install/gemfile/path_spec.rb b/spec/bundler/install/gemfile/path_spec.rb
index 4143b04c2aa4d0..bea7c11dec2953 100644
--- a/spec/bundler/install/gemfile/path_spec.rb
+++ b/spec/bundler/install/gemfile/path_spec.rb
@@ -183,6 +183,72 @@
expect(the_bundle).to include_gems "foo 1.0"
end
+ it "works when using prereleases of 0.0.0" do
+ build_lib "foo", "0.0.0.dev", :path => lib_path("foo")
+
+ gemfile <<~G
+ source "#{file_uri_for(gem_repo1)}"
+ gem "foo", :path => "#{lib_path("foo")}"
+ G
+
+ lockfile <<~L
+ PATH
+ remote: #{lib_path("foo")}
+ specs:
+ foo (0.0.0.dev)
+
+ GEM
+ remote: #{file_uri_for(gem_repo1)}/
+ specs:
+
+ PLATFORMS
+ #{lockfile_platforms}
+
+ DEPENDENCIES
+ foo!
+
+ BUNDLED WITH
+ #{Bundler::VERSION}
+ L
+
+ bundle :install
+
+ expect(the_bundle).to include_gems "foo 0.0.0.dev"
+ end
+
+ it "works when using uppercase prereleases of 0.0.0" do
+ build_lib "foo", "0.0.0.SNAPSHOT", :path => lib_path("foo")
+
+ gemfile <<~G
+ source "#{file_uri_for(gem_repo1)}"
+ gem "foo", :path => "#{lib_path("foo")}"
+ G
+
+ lockfile <<~L
+ PATH
+ remote: #{lib_path("foo")}
+ specs:
+ foo (0.0.0.SNAPSHOT)
+
+ GEM
+ remote: #{file_uri_for(gem_repo1)}/
+ specs:
+
+ PLATFORMS
+ #{lockfile_platforms}
+
+ DEPENDENCIES
+ foo!
+
+ BUNDLED WITH
+ #{Bundler::VERSION}
+ L
+
+ bundle :install
+
+ expect(the_bundle).to include_gems "foo 0.0.0.SNAPSHOT"
+ end
+
it "handles downgrades" do
build_lib "omg", "2.0", :path => lib_path("omg")
diff --git a/spec/bundler/install/gemfile/platform_spec.rb b/spec/bundler/install/gemfile/platform_spec.rb
index 221c52c4485be1..35a3872c032724 100644
--- a/spec/bundler/install/gemfile/platform_spec.rb
+++ b/spec/bundler/install/gemfile/platform_spec.rb
@@ -358,6 +358,49 @@
expect(the_bundle).not_to include_gems "nokogiri 1.4.2"
end
+ it "installs gems tagged w/ another platform but also dependent on the current one transitively" do
+ build_repo4 do
+ build_gem "activesupport", "6.1.4.1" do |s|
+ s.add_dependency "tzinfo", "~> 2.0"
+ end
+
+ build_gem "tzinfo", "2.0.4"
+ end
+
+ gemfile <<~G
+ source "#{file_uri_for(gem_repo4)}"
+
+ gem "activesupport"
+
+ platforms :#{not_local_tag} do
+ gem "tzinfo", "~> 1.2"
+ end
+ G
+
+ lockfile <<~L
+ GEM
+ remote: #{file_uri_for(gem_repo4)}/
+ specs:
+ activesupport (6.1.4.1)
+ tzinfo (~> 2.0)
+ tzinfo (2.0.4)
+
+ PLATFORMS
+ #{specific_local_platform}
+
+ DEPENDENCIES
+ activesupport
+ tzinfo (~> 1.2)
+
+ BUNDLED WITH
+ #{Bundler::VERSION}
+ L
+
+ bundle "install --verbose"
+
+ expect(the_bundle).to include_gems "tzinfo 2.0.4"
+ end
+
it "installs gems tagged w/ the current platforms inline" do
skip "platform issues" if Gem.win_platform?
diff --git a/spec/bundler/install/gemfile/sources_spec.rb b/spec/bundler/install/gemfile/sources_spec.rb
index 9885145662f005..5456e95f33dd51 100644
--- a/spec/bundler/install/gemfile/sources_spec.rb
+++ b/spec/bundler/install/gemfile/sources_spec.rb
@@ -1250,8 +1250,8 @@
G
end
- it "installs the higher version in the new repo" do
- expect(the_bundle).to include_gems("rack 1.2")
+ it "conservatively installs the existing locked version" do
+ expect(the_bundle).to include_gems("rack 1.0.0")
end
end
@@ -1336,8 +1336,8 @@
G
expect(err).to eq strip_whitespace(<<-EOS).strip
Warning: The gem 'rack' was found in multiple relevant sources.
- * rubygems repository https://gem.repo1/ or installed locally
- * rubygems repository https://gem.repo4/ or installed locally
+ * rubygems repository https://gem.repo1/
+ * rubygems repository https://gem.repo4/
You should add this gem to the source block for the source you wish it to be installed from.
EOS
expect(last_command).to be_success
@@ -1366,8 +1366,8 @@
expect(last_command).to be_failure
expect(err).to eq strip_whitespace(<<-EOS).strip
The gem 'rack' was found in multiple relevant sources.
- * rubygems repository https://gem.repo1/ or installed locally
- * rubygems repository https://gem.repo4/ or installed locally
+ * rubygems repository https://gem.repo1/
+ * rubygems repository https://gem.repo4/
You must add this gem to the source block for the source you wish it to be installed from.
EOS
expect(the_bundle).not_to be_locked
diff --git a/spec/bundler/other/major_deprecation_spec.rb b/spec/bundler/other/major_deprecation_spec.rb
index d59f64662dd5cb..b228027c03fe9e 100644
--- a/spec/bundler/other/major_deprecation_spec.rb
+++ b/spec/bundler/other/major_deprecation_spec.rb
@@ -665,7 +665,7 @@
end
it "prints a deprecation warning", :bundler => "< 3" do
- expect(deprecations).to include "The `viz` command has been moved to the `bundle-viz` gem, see https://github.com/rubygems/bundler-graph"
+ expect(deprecations).to include "The `viz` command has been renamed to `graph` and moved to a plugin. See https://github.com/rubygems/bundler-graph"
end
pending "fails with a helpful message", :bundler => "3"
diff --git a/spec/bundler/realworld/ffi_spec.rb b/spec/bundler/realworld/ffi_spec.rb
new file mode 100644
index 00000000000000..083ea38901d63f
--- /dev/null
+++ b/spec/bundler/realworld/ffi_spec.rb
@@ -0,0 +1,57 @@
+# frozen_string_literal: true
+
+RSpec.describe "loading dinamically linked library on a bundle exec context", :realworld => true do
+ it "passes ENV right after argv in memory" do
+ create_file "foo.rb", <<~RUBY
+ require 'ffi'
+
+ module FOO
+ extend FFI::Library
+ ffi_lib './libfoo.so'
+
+ attach_function :Hello, [], :void
+ end
+
+ FOO.Hello()
+ RUBY
+
+ create_file "libfoo.c", <<~'C'
+ #include
+
+ static int foo_init(int argc, char** argv, char** envp) {
+ if (argv[argc+1] == NULL) {
+ printf("FAIL\n");
+ } else {
+ printf("OK\n");
+ }
+
+ return 0;
+ }
+
+ #if defined(__APPLE__) && defined(__MACH__)
+ __attribute__((section("__DATA,__mod_init_func"), used, aligned(sizeof(void*))))
+ #else
+ __attribute__((section(".init_array")))
+ #endif
+ static void *ctr = &foo_init;
+
+ extern char** environ;
+
+ void Hello() {
+ return;
+ }
+ C
+
+ sys_exec "gcc -g -o libfoo.so -shared -fpic libfoo.c"
+
+ install_gemfile <<-G
+ source "https://rubygems.org"
+
+ gem 'ffi'
+ G
+
+ bundle "exec ruby foo.rb"
+
+ expect(out).to eq("OK")
+ end
+end
diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb
index 804e29c3c13a65..35873dcaa967a9 100644
--- a/spec/bundler/runtime/setup_spec.rb
+++ b/spec/bundler/runtime/setup_spec.rb
@@ -1511,5 +1511,28 @@ def lock_with(ruby_version = nil)
expect(out).to include("rack, yard")
end
+
+ it "does not cause double loads when higher versions of default gems are activated before bundler" do
+ build_repo2 do
+ build_gem "json", "999.999.999" do |s|
+ s.write "lib/json.rb", <<~RUBY
+ module JSON
+ VERSION = "999.999.999"
+ end
+ RUBY
+ end
+ end
+
+ system_gems "json-999.999.999", :gem_repo => gem_repo2
+
+ install_gemfile "source \"#{file_uri_for(gem_repo1)}\""
+ ruby <<-RUBY
+ require "json"
+ require "bundler/setup"
+ require "json"
+ RUBY
+
+ expect(err).to be_empty
+ end
end
end
diff --git a/spec/bundler/support/helpers.rb b/spec/bundler/support/helpers.rb
index 13fa36fbc249f1..f84e68cee8ca65 100644
--- a/spec/bundler/support/helpers.rb
+++ b/spec/bundler/support/helpers.rb
@@ -220,7 +220,7 @@ def sys_exec(cmd, options = {})
end
def all_commands_output
- return [] if command_executions.empty?
+ return "" if command_executions.empty?
"\n\nCommands:\n#{command_executions.map(&:to_s_verbose).join("\n\n")}"
end
diff --git a/spec/bundler/support/indexes.rb b/spec/bundler/support/indexes.rb
index 91dd699b5fec7c..638f394e76a70b 100644
--- a/spec/bundler/support/indexes.rb
+++ b/spec/bundler/support/indexes.rb
@@ -17,7 +17,7 @@ def platform(*args)
def resolve(args = [])
@platforms ||= ["ruby"]
deps = []
- default_source = instance_double("Bundler::Source::Rubygems", :specs => @index, :to_err => "locally install gems")
+ default_source = instance_double("Bundler::Source::Rubygems", :specs => @index, :to_s => "locally install gems")
source_requirements = { :default => default_source }
@deps.each do |d|
source_requirements[d.name] = d.source = default_source
diff --git a/spec/bundler/support/rubygems_version_manager.rb b/spec/bundler/support/rubygems_version_manager.rb
index c2e5a5f484eced..d1b1f8dd03b6dd 100644
--- a/spec/bundler/support/rubygems_version_manager.rb
+++ b/spec/bundler/support/rubygems_version_manager.rb
@@ -24,12 +24,6 @@ def switch
def assert_system_features_not_loaded!
at_exit do
- errors = if $?.nil?
- ""
- else
- all_commands_output
- end
-
rubylibdir = RbConfig::CONFIG["rubylibdir"]
rubygems_path = rubylibdir + "/rubygems"
@@ -43,11 +37,11 @@ def assert_system_features_not_loaded!
(loaded_feature.start_with?(bundler_path) && !bundler_exemptions.any? {|bundler_exemption| loaded_feature.start_with?(bundler_exemption) })
end
- if bad_loaded_features.any?
- errors += "the following features were incorrectly loaded:\n#{bad_loaded_features.join("\n")}"
+ errors = if bad_loaded_features.any?
+ all_commands_output + "the following features were incorrectly loaded:\n#{bad_loaded_features.join("\n")}"
end
- raise errors unless errors.empty?
+ raise errors if errors
end
end
diff --git a/spec/mspec/lib/mspec/utils/warnings.rb b/spec/mspec/lib/mspec/utils/warnings.rb
index c770d609f3ee61..0d3d36fada2c28 100644
--- a/spec/mspec/lib/mspec/utils/warnings.rb
+++ b/spec/mspec/lib/mspec/utils/warnings.rb
@@ -10,7 +10,7 @@
end
if Object.const_defined?(:Warning) and Warning.respond_to?(:warn)
- def Warning.warn(message)
+ def Warning.warn(message, category: nil)
# Suppress any warning inside the method to prevent recursion
verbose = $VERBOSE
$VERBOSE = nil
diff --git a/spec/ruby/core/array/shared/slice.rb b/spec/ruby/core/array/shared/slice.rb
index cf195ad7a46b35..540a050130cc00 100644
--- a/spec/ruby/core/array/shared/slice.rb
+++ b/spec/ruby/core/array/shared/slice.rb
@@ -743,6 +743,30 @@ def to.to_int() -2 end
@array.send(@method, eval("(-2..-4).step(10)")).should == []
@array.send(@method, eval("(-2...-4).step(10)")).should == []
end
+
+ it "has range with bounds outside of array" do
+ # end is equal to array's length
+ @array.send(@method, (0..6).step(1)).should == [0, 1, 2, 3, 4, 5]
+ -> { @array.send(@method, (0..6).step(2)) }.should raise_error(RangeError)
+
+ # end is greater than length with positive steps
+ @array.send(@method, (1..6).step(2)).should == [1, 3, 5]
+ @array.send(@method, (2..7).step(2)).should == [2, 4]
+ -> { @array.send(@method, (2..8).step(2)) }.should raise_error(RangeError)
+
+ # begin is greater than length with negative steps
+ @array.send(@method, (6..1).step(-2)).should == [5, 3, 1]
+ @array.send(@method, (7..2).step(-2)).should == [5, 3]
+ -> { @array.send(@method, (8..2).step(-2)) }.should raise_error(RangeError)
+ end
+
+ it "has endless range with start outside of array's bounds" do
+ @array.send(@method, eval("(6..).step(1)")).should == []
+ @array.send(@method, eval("(7..).step(1)")).should == nil
+
+ @array.send(@method, eval("(6..).step(2)")).should == []
+ -> { @array.send(@method, eval("(7..).step(2)")) }.should raise_error(RangeError)
+ end
end
end
diff --git a/spec/ruby/core/class/subclasses_spec.rb b/spec/ruby/core/class/subclasses_spec.rb
new file mode 100644
index 00000000000000..ddbcfb02c06382
--- /dev/null
+++ b/spec/ruby/core/class/subclasses_spec.rb
@@ -0,0 +1,38 @@
+require_relative '../../spec_helper'
+require_relative '../module/fixtures/classes'
+
+ruby_version_is '3.1' do
+ describe "Class#subclasses" do
+ it "returns a list of classes directly inheriting from self" do
+ assert_subclasses(ModuleSpecs::Parent, [ModuleSpecs::Child, ModuleSpecs::Child2])
+ end
+
+ it "does not return included modules" do
+ parent = Class.new
+ child = Class.new(parent)
+ mod = Module.new
+ parent.include(mod)
+
+ assert_subclasses(parent, [child])
+ end
+
+ it "does not return singleton classes" do
+ a = Class.new
+
+ a_obj = a.new
+ def a_obj.force_singleton_class
+ 42
+ end
+
+ a.subclasses.should_not include(a_obj.singleton_class)
+ end
+
+ it "has 1 entry per module or class" do
+ ModuleSpecs::Parent.subclasses.should == ModuleSpecs::Parent.subclasses.uniq
+ end
+
+ def assert_subclasses(mod,subclasses)
+ mod.subclasses.sort_by(&:inspect).should == subclasses.sort_by(&:inspect)
+ end
+ end
+end
diff --git a/spec/ruby/core/dir/shared/glob.rb b/spec/ruby/core/dir/shared/glob.rb
index 69fb0f0a012796..a38ff8aa68b577 100644
--- a/spec/ruby/core/dir/shared/glob.rb
+++ b/spec/ruby/core/dir/shared/glob.rb
@@ -55,12 +55,24 @@
end
end
+ ruby_version_is "3.0"..."3.1" do
+ it "result is sorted with any non false value of sort:" do
+ result = Dir.send(@method, '*', sort: 0)
+ result.should == result.sort
+
+ result = Dir.send(@method, '*', sort: nil)
+ result.should == result.sort
+
+ result = Dir.send(@method, '*', sort: 'false')
+ result.should == result.sort
+ end
+ end
+
ruby_version_is "3.1" do
- it "true or false is expected as sort:" do
- -> {Dir.send(@method, '*', sort: nil)}.should raise_error ArgumentError, /true or false/
- -> {Dir.send(@method, '*', sort: 0)}.should raise_error ArgumentError, /true or false/
- -> {Dir.send(@method, '*', sort: "")}.should raise_error ArgumentError, /true or false/
- -> {Dir.send(@method, '*', sort: Object.new)}.should raise_error ArgumentError, /true or false/
+ it "raises an ArgumentError if sort: is not true or false" do
+ -> { Dir.send(@method, '*', sort: 0) }.should raise_error ArgumentError, /expected true or false/
+ -> { Dir.send(@method, '*', sort: nil) }.should raise_error ArgumentError, /expected true or false/
+ -> { Dir.send(@method, '*', sort: 'false') }.should raise_error ArgumentError, /expected true or false/
end
end
diff --git a/spec/ruby/core/encoding/compatible_spec.rb b/spec/ruby/core/encoding/compatible_spec.rb
index dc47a6553a80dd..80ecab6155844a 100644
--- a/spec/ruby/core/encoding/compatible_spec.rb
+++ b/spec/ruby/core/encoding/compatible_spec.rb
@@ -54,7 +54,7 @@
it "returns nil if the second's Encoding is not ASCII compatible" do
a = "abc".force_encoding("UTF-8")
- b = "123".force_encoding("UTF-16LE")
+ b = "1234".force_encoding("UTF-16LE")
Encoding.compatible?(a, b).should be_nil
end
end
diff --git a/spec/ruby/core/encoding/converter/putback_spec.rb b/spec/ruby/core/encoding/converter/putback_spec.rb
index 87495eaf3f1fc7..c4e0a5da213c9f 100644
--- a/spec/ruby/core/encoding/converter/putback_spec.rb
+++ b/spec/ruby/core/encoding/converter/putback_spec.rb
@@ -34,14 +34,23 @@
@ec.putback.should == ""
end
+ it "returns the problematic bytes for UTF-16LE" do
+ ec = Encoding::Converter.new("utf-16le", "iso-8859-1")
+ src = "\x00\xd8\x61\x00"
+ dst = ""
+ ec.primitive_convert(src, dst).should == :invalid_byte_sequence
+ ec.primitive_errinfo.should == [:invalid_byte_sequence, "UTF-16LE", "UTF-8", "\x00\xD8", "a\x00"]
+ ec.putback.should == "a\x00".force_encoding("utf-16le")
+ ec.putback.should == ""
+ end
+
it "accepts an integer argument corresponding to the number of bytes to be put back" do
ec = Encoding::Converter.new("utf-16le", "iso-8859-1")
src = "\x00\xd8\x61\x00"
dst = ""
ec.primitive_convert(src, dst).should == :invalid_byte_sequence
ec.primitive_errinfo.should == [:invalid_byte_sequence, "UTF-16LE", "UTF-8", "\x00\xD8", "a\x00"]
- ec.putback(1).should == "\x00".force_encoding("utf-16le")
- ec.putback.should == "a".force_encoding("utf-16le")
+ ec.putback(2).should == "a\x00".force_encoding("utf-16le")
ec.putback.should == ""
end
end
diff --git a/spec/ruby/core/enumerable/grep_spec.rb b/spec/ruby/core/enumerable/grep_spec.rb
index ac3d3db64129e2..b81075291fc9cb 100644
--- a/spec/ruby/core/enumerable/grep_spec.rb
+++ b/spec/ruby/core/enumerable/grep_spec.rb
@@ -65,6 +65,18 @@ class EnumerableSpecGrep2; def ===(obj); /^ca/ =~ obj; end; end
["abc", "def"].grep(/b/).should == ["abc"]
Regexp.last_match[0].should == "z"
end
+
+ it "correctly handles non-string elements" do
+ 'set last match' =~ /set last (.*)/
+ [:a, 'b', 'z', :c, 42, nil].grep(/[a-d]/).should == [:a, 'b', :c]
+ $1.should == 'match'
+
+ o = Object.new
+ def o.to_str
+ 'hello'
+ end
+ [o].grep(/ll/).first.should.equal?(o)
+ end
end
describe "with a block" do
diff --git a/spec/ruby/core/enumerable/grep_v_spec.rb b/spec/ruby/core/enumerable/grep_v_spec.rb
index 892640efa45daa..35fde27eb69ede 100644
--- a/spec/ruby/core/enumerable/grep_v_spec.rb
+++ b/spec/ruby/core/enumerable/grep_v_spec.rb
@@ -45,6 +45,18 @@ def (@odd_matcher = BasicObject.new).===(obj)
["abc", "def"].grep_v(/e/).should == ["abc"]
Regexp.last_match[0].should == "z"
end
+
+ it "correctly handles non-string elements" do
+ 'set last match' =~ /set last (.*)/
+ [:a, 'b', 'z', :c, 42, nil].grep_v(/[a-d]/).should == ['z', 42, nil]
+ $1.should == 'match'
+
+ o = Object.new
+ def o.to_str
+ 'hello'
+ end
+ [o].grep_v(/mm/).first.should.equal?(o)
+ end
end
describe "without block" do
diff --git a/spec/ruby/core/enumerator/arithmetic_sequence/begin_spec.rb b/spec/ruby/core/enumerator/arithmetic_sequence/begin_spec.rb
index bed30c546d64e2..1837a4f246adfc 100644
--- a/spec/ruby/core/enumerator/arithmetic_sequence/begin_spec.rb
+++ b/spec/ruby/core/enumerator/arithmetic_sequence/begin_spec.rb
@@ -6,4 +6,13 @@
(1..10).step.begin.should == 1
(1...10).step.begin.should == 1
end
+
+ ruby_version_is "2.7" do
+ context "with beginless" do
+ it "returns nil as begin of the sequence" do
+ eval("(..10).step(1)").begin.should == nil
+ eval("(...10).step(1)").begin.should == nil
+ end
+ end
+ end
end
diff --git a/spec/ruby/core/enumerator/arithmetic_sequence/end_spec.rb b/spec/ruby/core/enumerator/arithmetic_sequence/end_spec.rb
index 29e6e105cfeec3..05429cac3e824d 100644
--- a/spec/ruby/core/enumerator/arithmetic_sequence/end_spec.rb
+++ b/spec/ruby/core/enumerator/arithmetic_sequence/end_spec.rb
@@ -6,4 +6,11 @@
(1..10).step.end.should == 10
(1...10).step(17).end.should == 10
end
+
+ context "with endless" do
+ it "returns nil as end of the sequence" do
+ (1..).step(1).end.should == nil
+ (1...).step(1).end.should == nil
+ end
+ end
end
diff --git a/spec/ruby/core/exception/errno_spec.rb b/spec/ruby/core/exception/errno_spec.rb
index 095a926e09e49a..a063e522eaaabd 100644
--- a/spec/ruby/core/exception/errno_spec.rb
+++ b/spec/ruby/core/exception/errno_spec.rb
@@ -56,3 +56,12 @@
end
end
end
+
+describe "Errno::ENOENT" do
+ it "lets subclasses inherit the default error message" do
+ c = Class.new(Errno::ENOENT)
+ raise c, "custom message"
+ rescue => e
+ e.message.should == "No such file or directory - custom message"
+ end
+end
diff --git a/spec/ruby/core/gc/auto_compact_spec.rb b/spec/ruby/core/gc/auto_compact_spec.rb
index 386725996d9532..4f9d04317176f3 100644
--- a/spec/ruby/core/gc/auto_compact_spec.rb
+++ b/spec/ruby/core/gc/auto_compact_spec.rb
@@ -12,6 +12,11 @@
original = GC.auto_compact
begin
GC.auto_compact = !original
+ rescue NotImplementedError # platform does not support autocompact
+ skip
+ end
+
+ begin
GC.auto_compact.should == !original
ensure
GC.auto_compact = original
diff --git a/spec/ruby/core/gc/measure_total_time_spec.rb b/spec/ruby/core/gc/measure_total_time_spec.rb
new file mode 100644
index 00000000000000..05d4598ebc76e6
--- /dev/null
+++ b/spec/ruby/core/gc/measure_total_time_spec.rb
@@ -0,0 +1,19 @@
+require_relative '../../spec_helper'
+
+ruby_version_is "3.1" do
+ describe "GC.measure_total_time" do
+ before :each do
+ @default = GC.measure_total_time
+ end
+
+ after :each do
+ GC.measure_total_time = @default
+ end
+
+ it "can set and get a boolean value" do
+ original = GC.measure_total_time
+ GC.measure_total_time = !original
+ GC.measure_total_time.should == !original
+ end
+ end
+end
diff --git a/spec/ruby/core/gc/stat_spec.rb b/spec/ruby/core/gc/stat_spec.rb
index eb71fd969142a6..3b43b28a920ae4 100644
--- a/spec/ruby/core/gc/stat_spec.rb
+++ b/spec/ruby/core/gc/stat_spec.rb
@@ -7,6 +7,16 @@
stat.keys.should.include?(:count)
end
+ it "updates the given hash values" do
+ hash = { count: "hello", __other__: "world" }
+ stat = GC.stat(hash)
+
+ stat.should be_kind_of(Hash)
+ stat.should equal hash
+ stat[:count].should be_kind_of(Integer)
+ stat[:__other__].should == "world"
+ end
+
it "the values are all Integer since rb_gc_stat() returns size_t" do
GC.stat.values.each { |value| value.should be_kind_of(Integer) }
end
@@ -41,4 +51,12 @@
GC.stat(:total_allocated_objects).should be_kind_of(Integer)
GC.stat[:total_allocated_objects].should be_kind_of(Integer)
end
+
+ it "raises an error if argument is not nil, a symbol, or a hash" do
+ -> { GC.stat(7) }.should raise_error(TypeError, "non-hash or symbol given")
+ end
+
+ it "raises an error if an unknown key is given" do
+ -> { GC.stat(:foo) }.should raise_error(ArgumentError, "unknown key: foo")
+ end
end
diff --git a/spec/ruby/core/gc/total_time_spec.rb b/spec/ruby/core/gc/total_time_spec.rb
new file mode 100644
index 00000000000000..fcc8f45a834f6a
--- /dev/null
+++ b/spec/ruby/core/gc/total_time_spec.rb
@@ -0,0 +1,15 @@
+require_relative '../../spec_helper'
+
+ruby_version_is "3.1" do
+ describe "GC.total_time" do
+ it "returns an Integer" do
+ GC.total_time.should be_kind_of(Integer)
+ end
+
+ it "increases as collections are run" do
+ time_before = GC.total_time
+ GC.start
+ GC.total_time.should >= time_before
+ end
+ end
+end
diff --git a/spec/ruby/core/integer/plus_spec.rb b/spec/ruby/core/integer/plus_spec.rb
index be626c33050d18..511a4368721767 100644
--- a/spec/ruby/core/integer/plus_spec.rb
+++ b/spec/ruby/core/integer/plus_spec.rb
@@ -40,4 +40,19 @@
-> { @bignum + :symbol}.should raise_error(TypeError)
end
end
+
+ it "can be redefined" do
+ code = <<~RUBY
+ class Integer
+ alias_method :old_plus, :+
+ def +(other)
+ self - other
+ end
+ end
+ result = 1 + 2
+ Integer.alias_method :+, :old_plus
+ print result
+ RUBY
+ ruby_exe(code).should == "-1"
+ end
end
diff --git a/spec/ruby/core/kernel/clone_spec.rb b/spec/ruby/core/kernel/clone_spec.rb
index f9daa2badc6205..38ae1984c09a09 100644
--- a/spec/ruby/core/kernel/clone_spec.rb
+++ b/spec/ruby/core/kernel/clone_spec.rb
@@ -31,10 +31,10 @@ def klass.allocate
describe "with no arguments" do
it "copies frozen state from the original" do
o2 = @obj.clone
+ o2.should_not.frozen?
+
@obj.freeze
o3 = @obj.clone
-
- o2.should_not.frozen?
o3.should.frozen?
end
@@ -44,6 +44,30 @@ def klass.allocate
end
end
+ describe "with freeze: nil" do
+ ruby_version_is ""..."3.0" do
+ it "raises ArgumentError" do
+ -> { @obj.clone(freeze: nil) }.should raise_error(ArgumentError, /unexpected value for freeze: NilClass/)
+ end
+ end
+
+ ruby_version_is "3.0" do
+ it "copies frozen state from the original, like #clone without arguments" do
+ o2 = @obj.clone(freeze: nil)
+ o2.should_not.frozen?
+
+ @obj.freeze
+ o3 = @obj.clone(freeze: nil)
+ o3.should.frozen?
+ end
+
+ it "copies frozen?" do
+ o = "".freeze.clone(freeze: nil)
+ o.frozen?.should be_true
+ end
+ end
+ end
+
describe "with freeze: true" do
it 'makes a frozen copy if the original is frozen' do
@obj.freeze
@@ -112,6 +136,14 @@ def klass.allocate
end
end
+ describe "with freeze: anything else" do
+ it 'raises ArgumentError when passed not true/false/nil' do
+ -> { @obj.clone(freeze: 1) }.should raise_error(ArgumentError, /unexpected value for freeze: Integer/)
+ -> { @obj.clone(freeze: "") }.should raise_error(ArgumentError, /unexpected value for freeze: String/)
+ -> { @obj.clone(freeze: Object.new) }.should raise_error(ArgumentError, /unexpected value for freeze: Object/)
+ end
+ end
+
it "copies instance variables" do
clone = @obj.clone
clone.one.should == 1
diff --git a/spec/ruby/core/kernel/fixtures/classes.rb b/spec/ruby/core/kernel/fixtures/classes.rb
index 8de1407b92eec5..541a4c075e550c 100644
--- a/spec/ruby/core/kernel/fixtures/classes.rb
+++ b/spec/ruby/core/kernel/fixtures/classes.rb
@@ -281,9 +281,14 @@ def initialize(one, two)
@two = two
end
- def initialize_copy(other)
+ def initialize_copy(other, **kw)
ScratchPad.record object_id
end
+
+ # define to support calling #clone with optional :freeze keyword argument
+ def initialize_clone(other, **kw)
+ super(other) # to call #initialize_copy
+ end
end
class Clone
diff --git a/spec/ruby/core/kernel/initialize_clone_spec.rb b/spec/ruby/core/kernel/initialize_clone_spec.rb
new file mode 100644
index 00000000000000..2d889f5aadfee9
--- /dev/null
+++ b/spec/ruby/core/kernel/initialize_clone_spec.rb
@@ -0,0 +1,28 @@
+require_relative '../../spec_helper'
+
+describe "Kernel#initialize_clone" do
+ it "is a private instance method" do
+ Kernel.should have_private_instance_method(:initialize_clone)
+ end
+
+ it "returns the receiver" do
+ a = Object.new
+ b = Object.new
+ a.send(:initialize_clone, b).should == a
+ end
+
+ it "calls #initialize_copy" do
+ a = Object.new
+ b = Object.new
+ a.should_receive(:initialize_copy).with(b)
+ a.send(:initialize_clone, b)
+ end
+
+ ruby_version_is "3.0" do
+ it "accepts a :freeze keyword argument for obj.clone(freeze: value)" do
+ a = Object.new
+ b = Object.new
+ a.send(:initialize_clone, b, freeze: true).should == a
+ end
+ end
+end
diff --git a/spec/ruby/core/kernel/initialize_dup_spec.rb b/spec/ruby/core/kernel/initialize_dup_spec.rb
new file mode 100644
index 00000000000000..6dff34b7ad8fb9
--- /dev/null
+++ b/spec/ruby/core/kernel/initialize_dup_spec.rb
@@ -0,0 +1,20 @@
+require_relative '../../spec_helper'
+
+describe "Kernel#initialize_dup" do
+ it "is a private instance method" do
+ Kernel.should have_private_instance_method(:initialize_dup)
+ end
+
+ it "returns the receiver" do
+ a = Object.new
+ b = Object.new
+ a.send(:initialize_dup, b).should == a
+ end
+
+ it "calls #initialize_copy" do
+ a = Object.new
+ b = Object.new
+ a.should_receive(:initialize_copy).with(b)
+ a.send(:initialize_dup, b)
+ end
+end
diff --git a/spec/ruby/core/kernel/instance_variables_spec.rb b/spec/ruby/core/kernel/instance_variables_spec.rb
index 831f0662a2456b..677d8bb7b2bcf3 100644
--- a/spec/ruby/core/kernel/instance_variables_spec.rb
+++ b/spec/ruby/core/kernel/instance_variables_spec.rb
@@ -25,5 +25,16 @@
a.instance_variable_set("@test", 1)
a.instance_variables.should == [:@test]
end
+
+ it "returns the instances variables in the order declared" do
+ c = Class.new do
+ def initialize
+ @c = 1
+ @a = 2
+ @b = 3
+ end
+ end
+ c.new.instance_variables.should == [:@c, :@a, :@b]
+ end
end
end
diff --git a/spec/ruby/core/kernel/print_spec.rb b/spec/ruby/core/kernel/print_spec.rb
index c8c4453d1e703f..7e7c9b822db4fe 100644
--- a/spec/ruby/core/kernel/print_spec.rb
+++ b/spec/ruby/core/kernel/print_spec.rb
@@ -5,6 +5,18 @@
it "is a private method" do
Kernel.should have_private_instance_method(:print)
end
+
+ it "delegates to $stdout" do
+ -> { print :arg }.should output("arg")
+ end
+
+ it "prints $_ when no arguments are given" do
+ orig_value = $_
+ $_ = 'foo'
+ -> { print }.should output("foo")
+ ensure
+ $_ = orig_value
+ end
end
describe "Kernel.print" do
diff --git a/spec/ruby/core/kernel/warn_spec.rb b/spec/ruby/core/kernel/warn_spec.rb
index 511e741f3293ee..7df6fa72d16926 100644
--- a/spec/ruby/core/kernel/warn_spec.rb
+++ b/spec/ruby/core/kernel/warn_spec.rb
@@ -212,6 +212,70 @@ def o.to_sym; :deprecated; end
-> { warn('foo', **h) }.should complain("foo\n")
end
+ ruby_version_is '3.0' do
+ it "calls Warning.warn without keyword arguments if Warning.warn does not accept keyword arguments" do
+ verbose = $VERBOSE
+ $VERBOSE = false
+ class << Warning
+ alias_method :_warn, :warn
+ def warn(message)
+ ScratchPad.record(message)
+ end
+ end
+
+ begin
+ ScratchPad.clear
+ Kernel.warn("Chunky bacon!")
+ ScratchPad.recorded.should == "Chunky bacon!\n"
+
+ Kernel.warn("Deprecated bacon!", category: :deprecated)
+ ScratchPad.recorded.should == "Deprecated bacon!\n"
+ ensure
+ class << Warning
+ remove_method :warn
+ alias_method :warn, :_warn
+ remove_method :_warn
+ end
+ $VERBOSE = verbose
+ end
+ end
+
+ it "calls Warning.warn with category: nil if Warning.warn accepts keyword arguments" do
+ Warning.should_receive(:warn).with("Chunky bacon!\n", category: nil)
+ verbose = $VERBOSE
+ $VERBOSE = false
+ begin
+ Kernel.warn("Chunky bacon!")
+ ensure
+ $VERBOSE = verbose
+ end
+ end
+
+ it "calls Warning.warn with given category keyword converted to a symbol" do
+ Warning.should_receive(:warn).with("Chunky bacon!\n", category: :deprecated)
+ verbose = $VERBOSE
+ $VERBOSE = false
+ begin
+ Kernel.warn("Chunky bacon!", category: 'deprecated')
+ ensure
+ $VERBOSE = verbose
+ end
+ end
+ end
+
+ ruby_version_is ''...'3.0' do
+ it "calls Warning.warn with no keyword arguments" do
+ Warning.should_receive(:warn).with("Chunky bacon!\n")
+ verbose = $VERBOSE
+ $VERBOSE = false
+ begin
+ Kernel.warn("Chunky bacon!")
+ ensure
+ $VERBOSE = verbose
+ end
+ end
+ end
+
it "does not call Warning.warn if self is the Warning module" do
# RubyGems redefines Kernel#warn so we need to use a subprocess and disable RubyGems here
code = <<-RUBY
diff --git a/spec/ruby/core/matchdata/captures_spec.rb b/spec/ruby/core/matchdata/captures_spec.rb
index 8c0d2978b717df..58d46207091203 100644
--- a/spec/ruby/core/matchdata/captures_spec.rb
+++ b/spec/ruby/core/matchdata/captures_spec.rb
@@ -1,7 +1,15 @@
require_relative '../../spec_helper'
+require_relative 'fixtures/classes'
describe "MatchData#captures" do
it "returns an array of the match captures" do
/(.)(.)(\d+)(\d)/.match("THX1138.").captures.should == ["H","X","113","8"]
end
+
+ ruby_version_is "3.0" do
+ it "returns instances of String when given a String subclass" do
+ str = MatchDataSpecs::MyString.new("THX1138: The Movie")
+ /(.)(.)(\d+)(\d)/.match(str).captures.each { |c| c.should be_an_instance_of(String) }
+ end
+ end
end
diff --git a/spec/ruby/core/matchdata/element_reference_spec.rb b/spec/ruby/core/matchdata/element_reference_spec.rb
index 26550ac94d0b42..3b976cb1c4a8b1 100644
--- a/spec/ruby/core/matchdata/element_reference_spec.rb
+++ b/spec/ruby/core/matchdata/element_reference_spec.rb
@@ -1,4 +1,5 @@
require_relative '../../spec_helper'
+require_relative 'fixtures/classes'
describe "MatchData#[]" do
it "acts as normal array indexing [index]" do
@@ -20,6 +21,13 @@
it "supports ranges [start..end]" do
/(.)(.)(\d+)(\d)/.match("THX1138.")[1..3].should == %w|H X 113|
end
+
+ ruby_version_is "3.0" do
+ it "returns instances of String when given a String subclass" do
+ str = MatchDataSpecs::MyString.new("THX1138.")
+ /(.)(.)(\d+)(\d)/.match(str)[0..-1].each { |m| m.should be_an_instance_of(String) }
+ end
+ end
end
describe "MatchData#[Symbol]" do
diff --git a/spec/ruby/core/matchdata/fixtures/classes.rb b/spec/ruby/core/matchdata/fixtures/classes.rb
new file mode 100644
index 00000000000000..54795636e5a603
--- /dev/null
+++ b/spec/ruby/core/matchdata/fixtures/classes.rb
@@ -0,0 +1,3 @@
+module MatchDataSpecs
+ class MyString < String; end
+end
diff --git a/spec/ruby/core/matchdata/post_match_spec.rb b/spec/ruby/core/matchdata/post_match_spec.rb
index 4ae51f107e3c80..1a4ca0a83f07c5 100644
--- a/spec/ruby/core/matchdata/post_match_spec.rb
+++ b/spec/ruby/core/matchdata/post_match_spec.rb
@@ -1,4 +1,5 @@
require_relative '../../spec_helper'
+require_relative 'fixtures/classes'
describe "MatchData#post_match" do
it "returns the string after the match equiv. special var $'" do
@@ -33,4 +34,11 @@
str = "abc".force_encoding Encoding::ISO_8859_1
str.match(/c/).post_match.encoding.should equal(Encoding::ISO_8859_1)
end
+
+ ruby_version_is "3.0" do
+ it "returns an instance of String when given a String subclass" do
+ str = MatchDataSpecs::MyString.new("THX1138: The Movie")
+ /(.)(.)(\d+)(\d)/.match(str).post_match.should be_an_instance_of(String)
+ end
+ end
end
diff --git a/spec/ruby/core/matchdata/pre_match_spec.rb b/spec/ruby/core/matchdata/pre_match_spec.rb
index 824612c84cb880..9b50336c7d4be7 100644
--- a/spec/ruby/core/matchdata/pre_match_spec.rb
+++ b/spec/ruby/core/matchdata/pre_match_spec.rb
@@ -1,4 +1,5 @@
require_relative '../../spec_helper'
+require_relative 'fixtures/classes'
describe "MatchData#pre_match" do
it "returns the string before the match, equiv. special var $`" do
@@ -33,4 +34,11 @@
str = "abc".force_encoding Encoding::ISO_8859_1
str.match(/a/).pre_match.encoding.should equal(Encoding::ISO_8859_1)
end
+
+ ruby_version_is "3.0" do
+ it "returns an instance of String when given a String subclass" do
+ str = MatchDataSpecs::MyString.new("THX1138: The Movie")
+ /(.)(.)(\d+)(\d)/.match(str).pre_match.should be_an_instance_of(String)
+ end
+ end
end
diff --git a/spec/ruby/core/matchdata/to_a_spec.rb b/spec/ruby/core/matchdata/to_a_spec.rb
index 6231d096fbd893..50f5a161a5bcb5 100644
--- a/spec/ruby/core/matchdata/to_a_spec.rb
+++ b/spec/ruby/core/matchdata/to_a_spec.rb
@@ -1,7 +1,15 @@
require_relative '../../spec_helper'
+require_relative 'fixtures/classes'
describe "MatchData#to_a" do
it "returns an array of matches" do
/(.)(.)(\d+)(\d)/.match("THX1138.").to_a.should == ["HX1138", "H", "X", "113", "8"]
end
+
+ ruby_version_is "3.0" do
+ it "returns instances of String when given a String subclass" do
+ str = MatchDataSpecs::MyString.new("THX1138.")
+ /(.)(.)(\d+)(\d)/.match(str)[0..-1].to_a.each { |m| m.should be_an_instance_of(String) }
+ end
+ end
end
diff --git a/spec/ruby/core/matchdata/to_s_spec.rb b/spec/ruby/core/matchdata/to_s_spec.rb
index 9e213bb342d019..aab0955ae19fab 100644
--- a/spec/ruby/core/matchdata/to_s_spec.rb
+++ b/spec/ruby/core/matchdata/to_s_spec.rb
@@ -1,7 +1,15 @@
require_relative '../../spec_helper'
+require_relative 'fixtures/classes'
describe "MatchData#to_s" do
it "returns the entire matched string" do
/(.)(.)(\d+)(\d)/.match("THX1138.").to_s.should == "HX1138"
end
+
+ ruby_version_is "3.0" do
+ it "returns an instance of String when given a String subclass" do
+ str = MatchDataSpecs::MyString.new("THX1138.")
+ /(.)(.)(\d+)(\d)/.match(str).to_s.should be_an_instance_of(String)
+ end
+ end
end
diff --git a/spec/ruby/core/numeric/clone_spec.rb b/spec/ruby/core/numeric/clone_spec.rb
index e3bf0a9e7c556d..c3b06ca0c903af 100644
--- a/spec/ruby/core/numeric/clone_spec.rb
+++ b/spec/ruby/core/numeric/clone_spec.rb
@@ -22,4 +22,11 @@
it "raises ArgumentError if passed freeze: false" do
-> { 1.clone(freeze: false) }.should raise_error(ArgumentError, /can't unfreeze/)
end
+
+ ruby_version_is "3.0" do
+ it "does not change frozen status if passed freeze: nil" do
+ value = 1
+ value.clone(freeze: nil).should equal(value)
+ end
+ end
end
diff --git a/spec/ruby/core/numeric/quo_spec.rb b/spec/ruby/core/numeric/quo_spec.rb
index 5c952b11a97e42..b4a23fd4766254 100644
--- a/spec/ruby/core/numeric/quo_spec.rb
+++ b/spec/ruby/core/numeric/quo_spec.rb
@@ -52,4 +52,13 @@
obj.quo(19).should == 1.quo(20)
end
+
+ it "raises a ZeroDivisionError if the given argument is zero and not a Float" do
+ -> { 1.quo(0) }.should raise_error(ZeroDivisionError)
+ end
+
+ it "returns infinity if the given argument is zero and is a Float" do
+ (1.quo(0.0)).to_s.should == 'Infinity'
+ (-1.quo(0.0)).to_s.should == '-Infinity'
+ end
end
diff --git a/spec/ruby/core/range/step_spec.rb b/spec/ruby/core/range/step_spec.rb
index 624fa71f5fb7e6..4c6907385487f7 100644
--- a/spec/ruby/core/range/step_spec.rb
+++ b/spec/ruby/core/range/step_spec.rb
@@ -481,6 +481,32 @@
end
end
+ ruby_version_is "2.7" do
+ context "when begin is not defined and end is numeric" do
+ it "returns an instance of Enumerator::ArithmeticSequence" do
+ eval("(..10)").step.class.should == Enumerator::ArithmeticSequence
+ end
+ end
+ end
+
+ context "when range is endless" do
+ it "returns an instance of Enumerator::ArithmeticSequence when begin is numeric" do
+ (1..).step.class.should == Enumerator::ArithmeticSequence
+ end
+
+ it "returns an instance of Enumerator when begin is not numeric" do
+ ("a"..).step.class.should == Enumerator
+ end
+ end
+
+ ruby_version_is "2.7" do
+ context "when range is beginless and endless" do
+ it "returns an instance of Enumerator" do
+ Range.new(nil, nil).step.class.should == Enumerator
+ end
+ end
+ end
+
context "when begin and end are not numerics" do
it "returns an instance of Enumerator" do
("a".."z").step.class.should == Enumerator
diff --git a/spec/ruby/core/string/each_grapheme_cluster_spec.rb b/spec/ruby/core/string/each_grapheme_cluster_spec.rb
index 632f2337f1cd50..b45d89ecb0485a 100644
--- a/spec/ruby/core/string/each_grapheme_cluster_spec.rb
+++ b/spec/ruby/core/string/each_grapheme_cluster_spec.rb
@@ -6,4 +6,12 @@
it_behaves_like :string_chars, :each_grapheme_cluster
it_behaves_like :string_grapheme_clusters, :each_grapheme_cluster
it_behaves_like :string_each_char_without_block, :each_grapheme_cluster
+
+ ruby_version_is '3.0' do
+ it "yields String instances for subclasses" do
+ a = []
+ StringSpecs::MyString.new("abc").each_grapheme_cluster { |s| a << s.class }
+ a.should == [String, String, String]
+ end
+ end
end
diff --git a/spec/ruby/core/string/force_encoding_spec.rb b/spec/ruby/core/string/force_encoding_spec.rb
index 2fe5f79c0fa840..f37aaf9eb4319b 100644
--- a/spec/ruby/core/string/force_encoding_spec.rb
+++ b/spec/ruby/core/string/force_encoding_spec.rb
@@ -60,7 +60,7 @@
end
it "does not transcode self" do
- str = "\u{8612}"
+ str = "é"
str.dup.force_encoding('utf-16le').should_not == str.encode('utf-16le')
end
diff --git a/spec/ruby/core/string/scan_spec.rb b/spec/ruby/core/string/scan_spec.rb
index 024e97022a3d5c..5f86dbbecc9628 100644
--- a/spec/ruby/core/string/scan_spec.rb
+++ b/spec/ruby/core/string/scan_spec.rb
@@ -198,4 +198,12 @@
third.should == 'c';
end
end
+
+ ruby_version_is '3.0' do
+ it "yields String instances for subclasses" do
+ a = []
+ StringSpecs::MyString.new("abc").scan(/./) { |s| a << s.class }
+ a.should == [String, String, String]
+ end
+ end
end
diff --git a/spec/ruby/core/string/scrub_spec.rb b/spec/ruby/core/string/scrub_spec.rb
index 4da44a79924c6a..3137399291c1f1 100644
--- a/spec/ruby/core/string/scrub_spec.rb
+++ b/spec/ruby/core/string/scrub_spec.rb
@@ -56,7 +56,9 @@
it "replaces invalid byte sequences in frozen strings" do
x81 = [0x81].pack('C').force_encoding('utf-8')
(-"abc\u3042#{x81}").scrub("*").should == "abc\u3042*"
- utf16_str = ("abc".encode('UTF-16LE').bytes + [0x81]).pack('c*').force_encoding('UTF-16LE')
+
+ leading_surrogate = [0x00, 0xD8]
+ utf16_str = ("abc".encode('UTF-16LE').bytes + leading_surrogate).pack('c*').force_encoding('UTF-16LE')
(-(utf16_str)).scrub("*".encode('UTF-16LE')).should == "abc*".encode('UTF-16LE')
end
diff --git a/spec/ruby/core/string/shared/eql.rb b/spec/ruby/core/string/shared/eql.rb
index 85b861f4f162ba..b57d6895ff1faf 100644
--- a/spec/ruby/core/string/shared/eql.rb
+++ b/spec/ruby/core/string/shared/eql.rb
@@ -21,7 +21,7 @@
end
it "considers encoding compatibility" do
- "hello".force_encoding("utf-8").send(@method, "hello".force_encoding("utf-32le")).should be_false
+ "abcd".force_encoding("utf-8").send(@method, "abcd".force_encoding("utf-32le")).should be_false
end
it "ignores subclass differences" do
diff --git a/spec/ruby/core/string/shared/length.rb b/spec/ruby/core/string/shared/length.rb
index b9eae5170fadf6..e9319614551c4c 100644
--- a/spec/ruby/core/string/shared/length.rb
+++ b/spec/ruby/core/string/shared/length.rb
@@ -36,4 +36,20 @@
concat.force_encoding(Encoding::ASCII_8BIT)
concat.size.should == 4
end
+
+ it "adds 1 for every invalid byte in UTF-8" do
+ "\xF4\x90\x80\x80".size.should == 4
+ "a\xF4\x90\x80\x80b".size.should == 6
+ "é\xF4\x90\x80\x80è".size.should == 6
+ end
+
+ it "adds 1 (and not 2) for a incomplete surrogate in UTF-16" do
+ "\x00\xd8".force_encoding("UTF-16LE").size.should == 1
+ "\xd8\x00".force_encoding("UTF-16BE").size.should == 1
+ end
+
+ it "adds 1 for a broken sequence in UTF-32" do
+ "\x04\x03\x02\x01".force_encoding("UTF-32LE").size.should == 1
+ "\x01\x02\x03\x04".force_encoding("UTF-32BE").size.should == 1
+ end
end
diff --git a/spec/ruby/core/string/valid_encoding_spec.rb b/spec/ruby/core/string/valid_encoding_spec.rb
index d5bf31710f7027..be7cef7a8e7df8 100644
--- a/spec/ruby/core/string/valid_encoding_spec.rb
+++ b/spec/ruby/core/string/valid_encoding_spec.rb
@@ -43,10 +43,10 @@
str.force_encoding('KOI8-R').valid_encoding?.should be_true
str.force_encoding('KOI8-U').valid_encoding?.should be_true
str.force_encoding('Shift_JIS').valid_encoding?.should be_false
- str.force_encoding('UTF-16BE').valid_encoding?.should be_false
- str.force_encoding('UTF-16LE').valid_encoding?.should be_false
- str.force_encoding('UTF-32BE').valid_encoding?.should be_false
- str.force_encoding('UTF-32LE').valid_encoding?.should be_false
+ "\xD8\x00".force_encoding('UTF-16BE').valid_encoding?.should be_false
+ "\x00\xD8".force_encoding('UTF-16LE').valid_encoding?.should be_false
+ "\x04\x03\x02\x01".force_encoding('UTF-32BE').valid_encoding?.should be_false
+ "\x01\x02\x03\x04".force_encoding('UTF-32LE').valid_encoding?.should be_false
str.force_encoding('Windows-1251').valid_encoding?.should be_true
str.force_encoding('IBM437').valid_encoding?.should be_true
str.force_encoding('IBM737').valid_encoding?.should be_true
diff --git a/spec/ruby/core/warning/element_reference_spec.rb b/spec/ruby/core/warning/element_reference_spec.rb
index a346cf535b04e4..f51cc87de5095e 100644
--- a/spec/ruby/core/warning/element_reference_spec.rb
+++ b/spec/ruby/core/warning/element_reference_spec.rb
@@ -12,5 +12,11 @@
it "raises for unknown category" do
-> { Warning[:noop] }.should raise_error(ArgumentError, /unknown category: noop/)
end
+
+ it "raises for non-Symbol category" do
+ -> { Warning[42] }.should raise_error(TypeError)
+ -> { Warning[false] }.should raise_error(TypeError)
+ -> { Warning["noop"] }.should raise_error(TypeError)
+ end
end
end
diff --git a/spec/ruby/core/warning/element_set_spec.rb b/spec/ruby/core/warning/element_set_spec.rb
index 3b0ea45c9b324c..611060fb3a525d 100644
--- a/spec/ruby/core/warning/element_set_spec.rb
+++ b/spec/ruby/core/warning/element_set_spec.rb
@@ -27,5 +27,11 @@
it "raises for unknown category" do
-> { Warning[:noop] = false }.should raise_error(ArgumentError, /unknown category: noop/)
end
+
+ it "raises for non-Symbol category" do
+ -> { Warning[42] = false }.should raise_error(TypeError)
+ -> { Warning[false] = false }.should raise_error(TypeError)
+ -> { Warning["noop"] = false }.should raise_error(TypeError)
+ end
end
end
diff --git a/spec/ruby/core/warning/warn_spec.rb b/spec/ruby/core/warning/warn_spec.rb
index 2ded6a109d6a31..5ccff3aa2b5359 100644
--- a/spec/ruby/core/warning/warn_spec.rb
+++ b/spec/ruby/core/warning/warn_spec.rb
@@ -51,7 +51,6 @@ def Warning.warn(msg)
end
end
-
ruby_version_is '3.0' do
it "is called by Kernel.warn with nil category keyword" do
Warning.should_receive(:warn).with("Chunky bacon!\n", category: nil)
@@ -69,7 +68,7 @@ def Warning.warn(msg)
verbose = $VERBOSE
$VERBOSE = false
begin
- Kernel.warn("Chunky bacon!", category: 'deprecated')
+ Kernel.warn("Chunky bacon!", category: "deprecated")
ensure
$VERBOSE = verbose
end
diff --git a/spec/ruby/language/class_variable_spec.rb b/spec/ruby/language/class_variable_spec.rb
index 9a4b36e82b9438..f98deaa081a6e8 100644
--- a/spec/ruby/language/class_variable_spec.rb
+++ b/spec/ruby/language/class_variable_spec.rb
@@ -94,6 +94,12 @@
}.should raise_error(RuntimeError, 'class variable access from toplevel')
end
+ it "does not raise an error when checking if defined from the toplevel scope" do
+ -> {
+ eval "defined?(@@cvar_toplevel1)"
+ }.should_not raise_error
+ end
+
it "raises a RuntimeError when a class variable is overtaken in an ancestor class" do
parent = Class.new()
subclass = Class.new(parent)
diff --git a/spec/ruby/language/predefined_spec.rb b/spec/ruby/language/predefined_spec.rb
index 417afea5370b25..d3117502005508 100644
--- a/spec/ruby/language/predefined_spec.rb
+++ b/spec/ruby/language/predefined_spec.rb
@@ -1208,13 +1208,24 @@ def obj.foo2; yield; end
end
describe "STDIN" do
- it "has the same external encoding as Encoding.default_external" do
- STDIN.external_encoding.should equal(Encoding.default_external)
- end
+ platform_is_not :windows do
+ it "has the same external encoding as Encoding.default_external" do
+ STDIN.external_encoding.should equal(Encoding.default_external)
+ end
+
+ it "has the same external encoding as Encoding.default_external when that encoding is changed" do
+ Encoding.default_external = Encoding::ISO_8859_16
+ STDIN.external_encoding.should equal(Encoding::ISO_8859_16)
+ end
- it "has the same external encoding as Encoding.default_external when that encoding is changed" do
- Encoding.default_external = Encoding::ISO_8859_16
- STDIN.external_encoding.should equal(Encoding::ISO_8859_16)
+ it "has nil for the internal encoding" do
+ STDIN.internal_encoding.should be_nil
+ end
+
+ it "has nil for the internal encoding despite Encoding.default_internal being changed" do
+ Encoding.default_internal = Encoding::IBM437
+ STDIN.internal_encoding.should be_nil
+ end
end
it "has the encodings set by #set_encoding" do
@@ -1229,15 +1240,6 @@ def obj.foo2; yield; end
"p [STDIN.external_encoding.name, STDIN.internal_encoding.name]"
ruby_exe(code).chomp.should == %{["IBM775", "IBM866"]}
end
-
- it "has nil for the internal encoding" do
- STDIN.internal_encoding.should be_nil
- end
-
- it "has nil for the internal encoding despite Encoding.default_internal being changed" do
- Encoding.default_internal = Encoding::IBM437
- STDIN.internal_encoding.should be_nil
- end
end
describe "STDOUT" do
diff --git a/spec/ruby/language/regexp/encoding_spec.rb b/spec/ruby/language/regexp/encoding_spec.rb
index 8e2a294b9581a4..febc3fdb3726f9 100644
--- a/spec/ruby/language/regexp/encoding_spec.rb
+++ b/spec/ruby/language/regexp/encoding_spec.rb
@@ -38,6 +38,10 @@
/#{/./}/n.match("\303\251").to_a.should == ["\303"]
end
+ it "warns when using /n with a match string with non-ASCII characters and an encoding other than ASCII-8BIT" do
+ -> { /./n.match("\303\251".force_encoding('utf-8')) }.should complain(%r{historical binary regexp match /.../n against UTF-8 string})
+ end
+
it 'uses US-ASCII as /n encoding if all chars are 7-bit' do
/./n.encoding.should == Encoding::US_ASCII
end
@@ -117,6 +121,19 @@
-> { /\A[[:space:]]*\z/ =~ " ".encode("UTF-16LE") }.should raise_error(Encoding::CompatibilityError)
end
+ it "raises Encoding::CompatibilityError when the regexp has a fixed, non-ASCII-compatible encoding" do
+ -> { Regexp.new("".force_encoding("UTF-16LE"), Regexp::FIXEDENCODING) =~ " ".encode("UTF-8") }.should raise_error(Encoding::CompatibilityError)
+ end
+
+ it "raises Encoding::CompatibilityError when the regexp has a fixed encoding and the match string has non-ASCII characters" do
+ -> { Regexp.new("".force_encoding("US-ASCII"), Regexp::FIXEDENCODING) =~ "\303\251".force_encoding('UTF-8') }.should raise_error(Encoding::CompatibilityError)
+ end
+
+ it "raises ArgumentError when trying to match a broken String" do
+ s = "\x80".force_encoding('UTF-8')
+ -> { s =~ /./ }.should raise_error(ArgumentError, "invalid byte sequence in UTF-8")
+ end
+
it "computes the Regexp Encoding for each interpolated Regexp instance" do
make_regexp = -> str { /#{str}/ }
diff --git a/spec/ruby/library/fiber/resume_spec.rb b/spec/ruby/library/fiber/resume_spec.rb
index 39d14bdda0d6bf..8b7c104a6ff8d9 100644
--- a/spec/ruby/library/fiber/resume_spec.rb
+++ b/spec/ruby/library/fiber/resume_spec.rb
@@ -10,6 +10,12 @@
fiber2.resume
-> { fiber2.resume }.should raise_error(FiberError)
end
+
+ it "raises a FiberError if the Fiber attempts to resume a resuming fiber" do
+ root_fiber = Fiber.current
+ fiber1 = Fiber.new { root_fiber.resume }
+ -> { fiber1.resume }.should raise_error(FiberError, /double resume/)
+ end
end
ruby_version_is '3.0' do
@@ -19,5 +25,11 @@
fiber2.resume.should == 10
fiber2.resume.should == 20
end
+
+ it "raises a FiberError if the Fiber attempts to resume a resuming fiber" do
+ root_fiber = Fiber.current
+ fiber1 = Fiber.new { root_fiber.resume }
+ -> { fiber1.resume }.should raise_error(FiberError, /attempt to resume a resuming fiber/)
+ end
end
end
diff --git a/spec/ruby/library/rexml/element/each_element_with_attribute_spec.rb b/spec/ruby/library/rexml/element/each_element_with_attribute_spec.rb
index f2d779e577484d..dcc6dbbf17d37f 100644
--- a/spec/ruby/library/rexml/element/each_element_with_attribute_spec.rb
+++ b/spec/ruby/library/rexml/element/each_element_with_attribute_spec.rb
@@ -12,23 +12,23 @@
@son.attributes["name"] = "Fred"
@document.root << @father
@document.root << @son
- @childs = []
+ @children = []
end
- it "returns childs with attribute" do
- @document.each_element_with_attribute("name") { |elem| @childs << elem }
- @childs[0].should == @father
- @childs[1].should == @son
+ it "returns children with attribute" do
+ @document.each_element_with_attribute("name") { |elem| @children << elem }
+ @children[0].should == @father
+ @children[1].should == @son
end
it "takes attribute value as second argument" do
@document.each_element_with_attribute("name", "Fred"){ |elem| elem.should == @son }
end
- it "takes max number of childs as third argument" do
- @document.each_element_with_attribute("name", nil, 1) { |elem| @childs << elem }
- @childs.size.should == 1
- @childs[0].should == @father
+ it "takes max number of children as third argument" do
+ @document.each_element_with_attribute("name", nil, 1) { |elem| @children << elem }
+ @children.size.should == 1
+ @children[0].should == @father
end
it "takes XPath filter as fourth argument" do
diff --git a/spec/ruby/library/rexml/element/each_element_with_text_spec.rb b/spec/ruby/library/rexml/element/each_element_with_text_spec.rb
index 8f9d062c995da5..a4a200d2378e1d 100644
--- a/spec/ruby/library/rexml/element/each_element_with_text_spec.rb
+++ b/spec/ruby/library/rexml/element/each_element_with_text_spec.rb
@@ -16,10 +16,10 @@
@document.root << @joe
@document.root << @fred
@document.root << @another
- @childs = []
+ @children = []
end
- it "returns childs with text" do
+ it "returns children with text" do
@document.each_element_with_text("Joe"){|c| c.should == @joe}
end
diff --git a/spec/ruby/library/rexml/element/has_text_spec.rb b/spec/ruby/library/rexml/element/has_text_spec.rb
index de19fe07637290..206c167ae61ac4 100644
--- a/spec/ruby/library/rexml/element/has_text_spec.rb
+++ b/spec/ruby/library/rexml/element/has_text_spec.rb
@@ -11,7 +11,7 @@
e.has_text?.should be_true
end
- it "returns false if it has no Text childs" do
+ it "returns false if it has no Text children" do
e = REXML::Element.new("Person")
e.has_text?.should be_false
end
diff --git a/spec/ruby/library/rexml/node/parent_spec.rb b/spec/ruby/library/rexml/node/parent_spec.rb
index 07425e8f36f331..43c3a747e0b152 100644
--- a/spec/ruby/library/rexml/node/parent_spec.rb
+++ b/spec/ruby/library/rexml/node/parent_spec.rb
@@ -14,7 +14,7 @@
e.should.parent?
end
- # This includes attributes, CDatas and declarations.
+ # This includes attributes, CData and declarations.
it "returns false for Texts" do
e = REXML::Text.new("foo")
e.should_not.parent?
diff --git a/spec/ruby/library/rexml/shared/elements_to_a.rb b/spec/ruby/library/rexml/shared/elements_to_a.rb
index 388250d8b3afde..b7169f0b2e3249 100644
--- a/spec/ruby/library/rexml/shared/elements_to_a.rb
+++ b/spec/ruby/library/rexml/shared/elements_to_a.rb
@@ -19,7 +19,7 @@
# always needs the first param (even if it's nil).
# A patch was submitted:
# http://rubyforge.org/tracker/index.php?func=detail&aid=19354&group_id=426&atid=1698
- it "returns all childs if xpath is nil" do
+ it "returns all children if xpath is nil" do
@e.elements.send(@method).should == [@first, @second]
end
diff --git a/spec/ruby/library/stringio/ungetbyte_spec.rb b/spec/ruby/library/stringio/ungetbyte_spec.rb
index 2f082acbf673b5..87b27b837ece43 100644
--- a/spec/ruby/library/stringio/ungetbyte_spec.rb
+++ b/spec/ruby/library/stringio/ungetbyte_spec.rb
@@ -12,7 +12,7 @@
io.string.should == 'Shis is a simple string.'
end
- it "ungets a single byte from a string in the middle of a multibyte characte" do
+ it "ungets a single byte from a string in the middle of a multibyte character" do
str = "\u01a9"
io = StringIO.new(str)
b = io.getbyte
diff --git a/spec/ruby/library/stringscanner/check_until_spec.rb b/spec/ruby/library/stringscanner/check_until_spec.rb
index e92ae5a2e9e2d0..ad222fd76b3e9d 100644
--- a/spec/ruby/library/stringscanner/check_until_spec.rb
+++ b/spec/ruby/library/stringscanner/check_until_spec.rb
@@ -12,4 +12,10 @@
@s.matched.should == "a"
@s.check_until(/test/).should == "This is a test"
end
+
+ it "raises TypeError if given a String" do
+ -> {
+ @s.check_until('T')
+ }.should raise_error(TypeError, 'wrong argument type String (expected Regexp)')
+ end
end
diff --git a/spec/ruby/library/stringscanner/exist_spec.rb b/spec/ruby/library/stringscanner/exist_spec.rb
index beafadc07b0814..ff860a0d3e35dc 100644
--- a/spec/ruby/library/stringscanner/exist_spec.rb
+++ b/spec/ruby/library/stringscanner/exist_spec.rb
@@ -21,4 +21,10 @@
@s.scan(/This is/)
@s.exist?(/i/).should == nil
end
+
+ it "raises TypeError if given a String" do
+ -> {
+ @s.exist?('T')
+ }.should raise_error(TypeError, 'wrong argument type String (expected Regexp)')
+ end
end
diff --git a/spec/ruby/library/stringscanner/matched_size_spec.rb b/spec/ruby/library/stringscanner/matched_size_spec.rb
index a36bd3aafe4840..d9c338a07e976f 100644
--- a/spec/ruby/library/stringscanner/matched_size_spec.rb
+++ b/spec/ruby/library/stringscanner/matched_size_spec.rb
@@ -1,7 +1,24 @@
require_relative '../../spec_helper'
-require_relative 'shared/matched_size'
require 'strscan'
describe "StringScanner#matched_size" do
- it_behaves_like :strscan_matched_size, :matched_size
+ before :each do
+ @s = StringScanner.new("This is a test")
+ end
+
+ it "returns the size of the most recent match" do
+ @s.check(/This/)
+ @s.matched_size.should == 4
+ @s.matched_size.should == 4
+ @s.scan(//)
+ @s.matched_size.should == 0
+ end
+
+ it "returns nil if there was no recent match" do
+ @s.matched_size.should == nil
+ @s.check(/\d+/)
+ @s.matched_size.should == nil
+ @s.terminate
+ @s.matched_size.should == nil
+ end
end
diff --git a/spec/ruby/library/stringscanner/scan_until_spec.rb b/spec/ruby/library/stringscanner/scan_until_spec.rb
index 94239db50ed3ba..6b7782572d381f 100644
--- a/spec/ruby/library/stringscanner/scan_until_spec.rb
+++ b/spec/ruby/library/stringscanner/scan_until_spec.rb
@@ -20,4 +20,10 @@
@s.scan(/T/)
@s.scan_until(/^h/).should == "h"
end
+
+ it "raises TypeError if given a String" do
+ -> {
+ @s.scan_until('T')
+ }.should raise_error(TypeError, 'wrong argument type String (expected Regexp)')
+ end
end
diff --git a/spec/ruby/library/stringscanner/search_full_spec.rb b/spec/ruby/library/stringscanner/search_full_spec.rb
index da9067e012eac1..7d2a714fa56799 100644
--- a/spec/ruby/library/stringscanner/search_full_spec.rb
+++ b/spec/ruby/library/stringscanner/search_full_spec.rb
@@ -27,4 +27,10 @@
@s.search_full(/This/, true, true).should == "This"
@s.pos.should == 4
end
+
+ it "raises TypeError if given a String" do
+ -> {
+ @s.search_full('T', true, true)
+ }.should raise_error(TypeError, 'wrong argument type String (expected Regexp)')
+ end
end
diff --git a/spec/ruby/library/stringscanner/shared/matched_size.rb b/spec/ruby/library/stringscanner/shared/matched_size.rb
deleted file mode 100644
index 92174733f738cf..00000000000000
--- a/spec/ruby/library/stringscanner/shared/matched_size.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-describe :strscan_matched_size, shared: true do
- before :each do
- @s = StringScanner.new("This is a test")
- end
-
- it "returns the size of the most recent match" do
- @s.check(/This/)
- @s.send(@method).should == 4
- @s.send(@method).should == 4
- @s.scan(//)
- @s.send(@method).should == 0
- end
-
- it "returns nil if there was no recent match" do
- @s.send(@method).should == nil
- @s.check(/\d+/)
- @s.send(@method).should == nil
- @s.terminate
- @s.send(@method).should == nil
- end
-end
diff --git a/spec/ruby/library/stringscanner/size_spec.rb b/spec/ruby/library/stringscanner/size_spec.rb
new file mode 100644
index 00000000000000..3e475489e3b68d
--- /dev/null
+++ b/spec/ruby/library/stringscanner/size_spec.rb
@@ -0,0 +1,17 @@
+require_relative '../../spec_helper'
+require 'strscan'
+
+describe "StringScanner#size" do
+ before :each do
+ @s = StringScanner.new("This is a test")
+ end
+
+ it "returns the number of captures groups of the last match" do
+ @s.scan(/(.)(.)(.)/)
+ @s.size.should == 4
+ end
+
+ it "returns nil if there is no last match" do
+ @s.size.should == nil
+ end
+end
diff --git a/spec/ruby/library/stringscanner/skip_until_spec.rb b/spec/ruby/library/stringscanner/skip_until_spec.rb
index 73eb91b8ad95a6..7b56f13e4f6ebc 100644
--- a/spec/ruby/library/stringscanner/skip_until_spec.rb
+++ b/spec/ruby/library/stringscanner/skip_until_spec.rb
@@ -15,4 +15,10 @@
it "returns nil if no match was found" do
@s.skip_until(/d+/).should == nil
end
+
+ it "raises TypeError if given a String" do
+ -> {
+ @s.skip_until('T')
+ }.should raise_error(TypeError, 'wrong argument type String (expected Regexp)')
+ end
end
diff --git a/spec/ruby/optional/capi/class_spec.rb b/spec/ruby/optional/capi/class_spec.rb
index c2424668b91f53..a2d8b3e38a6363 100644
--- a/spec/ruby/optional/capi/class_spec.rb
+++ b/spec/ruby/optional/capi/class_spec.rb
@@ -12,6 +12,7 @@
describe :rb_path_to_class, shared: true do
it "returns a class or module from a scoped String" do
@s.send(@method, "CApiClassSpecs::A::B").should equal(CApiClassSpecs::A::B)
+ @s.send(@method, "CApiClassSpecs::A::M").should equal(CApiClassSpecs::A::M)
end
it "resolves autoload constants" do
@@ -27,7 +28,9 @@
end
it "raises a TypeError if the constant is not a class or module" do
- -> { @s.send(@method, "CApiClassSpecs::A::C") }.should raise_error(TypeError)
+ -> {
+ @s.send(@method, "CApiClassSpecs::A::C")
+ }.should raise_error(TypeError, 'CApiClassSpecs::A::C does not refer to class/module')
end
it "raises an ArgumentError even if a constant in the path exists on toplevel" do
diff --git a/spec/ruby/optional/capi/ext/string_spec.c b/spec/ruby/optional/capi/ext/string_spec.c
index 099363c9517858..2a21304a10798b 100644
--- a/spec/ruby/optional/capi/ext/string_spec.c
+++ b/spec/ruby/optional/capi/ext/string_spec.c
@@ -577,6 +577,14 @@ static VALUE string_spec_rb_str_catf(VALUE self, VALUE mesg) {
return rb_str_catf(mesg, "fmt %d %d number", 41, 6);
}
+static VALUE string_spec_rb_str_locktmp(VALUE self, VALUE str) {
+ return rb_str_locktmp(str);
+}
+
+static VALUE string_spec_rb_str_unlocktmp(VALUE self, VALUE str) {
+ return rb_str_unlocktmp(str);
+}
+
void Init_string_spec(void) {
VALUE cls = rb_define_class("CApiStringSpecs", rb_cObject);
rb_define_method(cls, "rb_cstr2inum", string_spec_rb_cstr2inum, 2);
@@ -672,6 +680,8 @@ void Init_string_spec(void) {
rb_define_method(cls, "rb_utf8_str_new_cstr", string_spec_rb_utf8_str_new_cstr, 0);
rb_define_method(cls, "rb_str_vcatf", string_spec_rb_str_vcatf, 1);
rb_define_method(cls, "rb_str_catf", string_spec_rb_str_catf, 1);
+ rb_define_method(cls, "rb_str_locktmp", string_spec_rb_str_locktmp, 1);
+ rb_define_method(cls, "rb_str_unlocktmp", string_spec_rb_str_unlocktmp, 1);
}
#ifdef __cplusplus
diff --git a/spec/ruby/optional/capi/fixtures/class.rb b/spec/ruby/optional/capi/fixtures/class.rb
index dbb0b6996701ac..193c7174e0d85d 100644
--- a/spec/ruby/optional/capi/fixtures/class.rb
+++ b/spec/ruby/optional/capi/fixtures/class.rb
@@ -87,5 +87,8 @@ class A
class B
end
+
+ module M
+ end
end
end
diff --git a/spec/ruby/optional/capi/string_spec.rb b/spec/ruby/optional/capi/string_spec.rb
index 3cd88a73904d2b..ce387ffa496cba 100644
--- a/spec/ruby/optional/capi/string_spec.rb
+++ b/spec/ruby/optional/capi/string_spec.rb
@@ -1209,4 +1209,31 @@ def inspect
str.should == "test fmt 41 6 number"
end
end
+
+ describe "rb_str_locktmp" do
+ it "raises an error when trying to lock an already locked string" do
+ str = "test"
+ @s.rb_str_locktmp(str).should == str
+ -> { @s.rb_str_locktmp(str) }.should raise_error(RuntimeError, 'temporal locking already locked string')
+ end
+
+ it "locks a string so that modifications would raise an error" do
+ str = "test"
+ @s.rb_str_locktmp(str).should == str
+ -> { str.upcase! }.should raise_error(RuntimeError, 'can\'t modify string; temporarily locked')
+ end
+ end
+
+ describe "rb_str_unlocktmp" do
+ it "unlocks a locked string" do
+ str = "test"
+ @s.rb_str_locktmp(str)
+ @s.rb_str_unlocktmp(str).should == str
+ str.upcase!.should == "TEST"
+ end
+
+ it "raises an error when trying to unlock an already unlocked string" do
+ -> { @s.rb_str_unlocktmp("test") }.should raise_error(RuntimeError, 'temporal unlocking already unlocked string')
+ end
+ end
end
diff --git a/string.c b/string.c
index 2746d882f1a88d..503977cf533375 100644
--- a/string.c
+++ b/string.c
@@ -868,7 +868,9 @@ static inline VALUE
empty_str_alloc(VALUE klass)
{
RUBY_DTRACE_CREATE_HOOK(STRING, 0);
- return str_alloc_embed(klass, 0);
+ VALUE str = str_alloc_embed(klass, 0);
+ memset(RSTRING(str)->as.embed.ary, 0, str_embed_capa(str));
+ return str;
}
static VALUE
@@ -1732,11 +1734,11 @@ str_duplicate_setup(VALUE klass, VALUE str, VALUE dup)
VALUE flags = FL_TEST_RAW(str, flag_mask);
int encidx = 0;
if (STR_EMBED_P(str)) {
- assert(str_embed_capa(dup) >= RSTRING_EMBED_LEN(str));
- STR_SET_EMBED_LEN(dup, RSTRING_EMBED_LEN(str));
- MEMCPY(RSTRING(dup)->as.embed.ary, RSTRING(str)->as.embed.ary,
- char, RSTRING_EMBED_LEN(str));
- flags &= ~RSTRING_NOEMBED;
+ long len = RSTRING_EMBED_LEN(str);
+
+ assert(str_embed_capa(dup) >= len + 1);
+ STR_SET_EMBED_LEN(dup, len);
+ MEMCPY(RSTRING(dup)->as.embed.ary, RSTRING(str)->as.embed.ary, char, len + 1);
}
else {
VALUE root = str;
@@ -1778,7 +1780,7 @@ static inline VALUE
ec_str_duplicate(struct rb_execution_context_struct *ec, VALUE klass, VALUE str)
{
VALUE dup;
- if (FL_TEST(str, STR_NOEMBED)) {
+ if (!USE_RVARGC || FL_TEST(str, STR_NOEMBED)) {
dup = ec_str_alloc_heap(ec, klass);
}
else {
@@ -1792,7 +1794,7 @@ static inline VALUE
str_duplicate(VALUE klass, VALUE str)
{
VALUE dup;
- if (FL_TEST(str, STR_NOEMBED)) {
+ if (!USE_RVARGC || FL_TEST(str, STR_NOEMBED)) {
dup = str_alloc_heap(klass);
}
else {
@@ -2321,6 +2323,7 @@ rb_str_times(VALUE str, VALUE times)
if (RSTRING_LEN(str) == 1 && RSTRING_PTR(str)[0] == 0) {
if (STR_EMBEDDABLE_P(len, 1)) {
str2 = str_alloc_embed(rb_cString, len + 1);
+ memset(RSTRING_PTR(str2), 0, len + 1);
}
else {
str2 = str_alloc_heap(rb_cString);
@@ -11149,15 +11152,18 @@ rb_str_unicode_normalized_p(int argc, VALUE *argv, VALUE str)
/**********************************************************************
* Document-class: Symbol
*
- * Symbol objects represent named identifiers inside the Ruby interpreter. They
- * are generated using the :name
and
- * :"string"
literals syntax, and by the various
- * to_sym
methods. The same Symbol object will be
- * created for a given name or string for the duration of a program's
- * execution, regardless of the context or meaning of that name. Thus
- * if Fred
is a constant in one context, a method in
- * another, and a class in a third, the Symbol :Fred
- * will be the same object in all three contexts.
+ * Symbol objects represent named identifiers inside the Ruby interpreter.
+ *
+ * You can create a \Symbol object explicitly with:
+ *
+ * - A {symbol literal}[doc/syntax/literals_rdoc.html#label-Symbol+Literals].
+ *
+ * The same Symbol object will be
+ * created for a given name or string for the duration of a program's
+ * execution, regardless of the context or meaning of that name. Thus
+ * if Fred
is a constant in one context, a method in
+ * another, and a class in a third, the Symbol :Fred
+ * will be the same object in all three contexts.
*
* module One
* class Fred
@@ -11792,6 +11798,15 @@ rb_enc_interned_str_cstr(const char *ptr, rb_encoding *enc)
* String objects differ from Symbol objects in that Symbol objects are
* designed to be used as identifiers, instead of text or data.
*
+ * You can create a \String object explicitly with:
+ *
+ * - A {string literal}[doc/syntax/literals_rdoc.html#label-String+Literals].
+ * - A {heredoc literal}[doc/syntax/literals_rdoc.html#label-Here+Document+Literals].
+ *
+ * You can convert certain objects to Strings with:
+ *
+ * - \Method {String}[Kernel.html#method-i-String].
+ *
* Some \String methods modify +self+.
* Typically, a method whose name ends with ! modifies +self+
* and returns +self+;
@@ -11876,7 +11891,7 @@ rb_enc_interned_str_cstr(const char *ptr, rb_encoding *enc)
* Note that \\\\ is interpreted as an escape, i.e., a single backslash.
*
* Note also that a string literal consumes backslashes.
- * See rdoc-ref:syntax/literals.rdoc for details about string literals.
+ * See {String Literals}[doc/syntax/literals_rdoc.html#label-String+Literals] for details about string literals.
*
* A back-reference is typically preceded by an additional backslash.
* For example, if you want to write a back-reference \& in
diff --git a/struct.c b/struct.c
index 2f296b34f62540..d1a7d1db8c7be5 100644
--- a/struct.c
+++ b/struct.c
@@ -263,14 +263,6 @@ new_struct(VALUE name, VALUE super)
NORETURN(static void invalid_struct_pos(VALUE s, VALUE idx));
-static inline long
-struct_pos_num(VALUE s, VALUE idx)
-{
- long i = NUM2INT(idx);
- if (i < 0 || i >= RSTRUCT_LEN(s)) invalid_struct_pos(s, idx);
- return i;
-}
-
static void
define_aref_method(VALUE nstr, VALUE name, VALUE off)
{
diff --git a/symbol.c b/symbol.c
index 79ec4de502945e..5ce95f5b07afd4 100644
--- a/symbol.c
+++ b/symbol.c
@@ -952,6 +952,17 @@ rb_make_internal_id(void)
return next_id_base() | ID_INTERNAL | ID_STATIC_SYM;
}
+ID
+rb_make_temporary_id(size_t n)
+{
+ const ID max_id = RB_ID_SERIAL_MAX & ~0xffff;
+ const ID id = max_id - (ID)n;
+ if (id <= ruby_global_symbols.last_id) {
+ rb_raise(rb_eRuntimeError, "too big to make temporary ID: %" PRIdSIZE, n);
+ }
+ return (id << ID_SCOPE_SHIFT) | ID_STATIC_SYM | ID_INTERNAL;
+}
+
static int
symbols_i(st_data_t key, st_data_t value, st_data_t arg)
{
diff --git a/template/Makefile.in b/template/Makefile.in
index 445f14ebdd3f1b..9e6d6fe0e3646e 100644
--- a/template/Makefile.in
+++ b/template/Makefile.in
@@ -318,7 +318,6 @@ $(LIBRUBY_$(LIBRUBY_WITH_EXT)): $(LIBRUBY_SO_UPDATE)
PKG_CONFIG = @PKG_CONFIG@
ruby_pc = @ruby_pc@
-ruby.pc: $(ruby_pc)
$(ruby_pc): config.status Makefile
$(Q)./config.status --file=-:$(srcdir)/template/ruby.pc.in | \
sed -e 's/\$$(\([A-Za-z_][A-Za-z0-9_]*\))/$${\1}/g' \
diff --git a/test/-ext-/postponed_job/test_postponed_job.rb b/test/-ext-/postponed_job/test_postponed_job.rb
index 7dc28776d0c502..fee0172d114fbd 100644
--- a/test/-ext-/postponed_job/test_postponed_job.rb
+++ b/test/-ext-/postponed_job/test_postponed_job.rb
@@ -25,4 +25,11 @@ def test_register
Bug.postponed_job_register_one(ary = [])
assert_equal [1], ary
end
+
+ if Bug.respond_to?(:postponed_job_register_in_c_thread)
+ def test_register_in_c_thread
+ assert Bug.postponed_job_register_in_c_thread(ary = [])
+ assert_equal [1], ary
+ end
+ end
end
diff --git a/test/cgi/test_cgi_cookie.rb b/test/cgi/test_cgi_cookie.rb
index 115a57e4a1002d..985cc0d7a1afb9 100644
--- a/test/cgi/test_cgi_cookie.rb
+++ b/test/cgi/test_cgi_cookie.rb
@@ -101,6 +101,11 @@ def test_cgi_cookie_parse
end
end
+ def test_cgi_cookie_parse_not_decode_name
+ cookie_str = "%66oo=baz;foo=bar"
+ cookies = CGI::Cookie.parse(cookie_str)
+ assert_equal({"%66oo" => ["baz"], "foo" => ["bar"]}, cookies)
+ end
def test_cgi_cookie_arrayinterface
cookie = CGI::Cookie.new('name1', 'a', 'b', 'c')
diff --git a/test/fiber/scheduler.rb b/test/fiber/scheduler.rb
index 8c2fdcb0e06a0d..a6e1325259f96d 100644
--- a/test/fiber/scheduler.rb
+++ b/test/fiber/scheduler.rb
@@ -14,6 +14,14 @@
end
class Scheduler
+ experimental = Warning[:experimental]
+ begin
+ Warning[:experimental] = false
+ IO::Buffer.new(0)
+ ensure
+ Warning[:experimental] = experimental
+ end
+
def initialize
@readable = {}
@writable = {}
diff --git a/test/irb/test_ruby_lex.rb b/test/irb/test_ruby_lex.rb
index e02370d3f74dc9..47435d675eaf03 100644
--- a/test/irb/test_ruby_lex.rb
+++ b/test/irb/test_ruby_lex.rb
@@ -399,6 +399,23 @@ def test_corresponding_syntax_to_keyword_for_with_do
end
end
+ def test_corresponding_syntax_to_keyword_in
+ input_with_correct_indents = [
+ Row.new(%q(module E), nil, 2, 1),
+ Row.new(%q(end), 0, 0, 0),
+ Row.new(%q(class A), nil, 2, 1),
+ Row.new(%q( in), nil, 4, 1)
+ ]
+
+ lines = []
+ input_with_correct_indents.each do |row|
+ lines << row.content
+ assert_indenting(lines, row.current_line_spaces, false)
+ assert_indenting(lines, row.new_line_spaces, true)
+ assert_nesting_level(lines, row.nesting_level)
+ end
+ end
+
def test_bracket_corresponding_to_times
input_with_correct_indents = [
Row.new(%q(3.times { |i|), nil, 2, 1),
@@ -581,8 +598,8 @@ def test_broken_percent_literal
tokens = RubyLex.ripper_lex_without_warning('%wwww')
pos_to_index = {}
tokens.each_with_index { |t, i|
- assert_nil(pos_to_index[t[0]], "There is already another token in the position of #{t.inspect}.")
- pos_to_index[t[0]] = i
+ assert_nil(pos_to_index[t.pos], "There is already another token in the position of #{t.inspect}.")
+ pos_to_index[t.pos] = i
}
end
@@ -598,8 +615,8 @@ def foo
EOC
pos_to_index = {}
tokens.each_with_index { |t, i|
- assert_nil(pos_to_index[t[0]], "There is already another token in the position of #{t.inspect}.")
- pos_to_index[t[0]] = i
+ assert_nil(pos_to_index[t.pos], "There is already another token in the position of #{t.inspect}.")
+ pos_to_index[t.pos] = i
}
end
end
diff --git a/test/reline/yamatanooroti/multiline_repl b/test/reline/yamatanooroti/multiline_repl
index da886b8f06f8a6..1f2a023724304d 100755
--- a/test/reline/yamatanooroti/multiline_repl
+++ b/test/reline/yamatanooroti/multiline_repl
@@ -137,6 +137,28 @@ opt.on('--autocomplete-super-long') {
2000.times.map{ s = "Str_#{c}"; c.succ!; s }.select{ |c| c.start_with?(target) }
}
}
+
+opt.on('--autocomplete-width-long') {
+ Reline.autocompletion = true
+ Reline.completion_proc = lambda { |target, preposing = nil, postposing = nil|
+ %w{
+ remove_instance_variable
+ respond_to?
+ ruby2_keywords
+ rand
+ readline
+ readlines
+ require
+ require_relative
+ raise
+ respond_to_missing?
+ redo
+ rescue
+ retry
+ return
+ }.select{ |c| c.start_with?(target) }
+ }
+}
opt.parse!(ARGV)
begin
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb
index e1dde8358968d0..f68b614327b718 100644
--- a/test/reline/yamatanooroti/test_rendering.rb
+++ b/test/reline/yamatanooroti/test_rendering.rb
@@ -1172,6 +1172,21 @@ def test_rerender_argument_prompt_after_pasting
EOC
end
+ def test_autocomplete_old_dialog_width_greater_than_dialog_width
+ start_terminal(40, 40, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete-width-long}, startup_message: 'Multiline REPL.')
+ write("0+ \n12345678901234")
+ write("\C-p")
+ write("r")
+ write("a")
+ close
+ assert_screen(<<~'EOC')
+ Multiline REPL.
+ prompt> 0+ ra
+ prompt> 123rand 901234
+ raise
+ EOC
+ end
+
def write_inputrc(content)
File.open(@inputrc_file, 'w') do |f|
f.write content
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index eb448e952a89ac..28285705bf3069 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -770,6 +770,44 @@ def test_descendants_gc_stress
end
end
+ def test_subclasses
+ c = Class.new
+ sc = Class.new(c)
+ ssc = Class.new(sc)
+ [c, sc, ssc].each do |k|
+ k.include Module.new
+ k.new.define_singleton_method(:force_singleton_class){}
+ end
+ assert_equal([sc], c.subclasses)
+ assert_equal([ssc], sc.subclasses)
+ assert_equal([], ssc.subclasses)
+
+ object_subclasses = Object.subclasses
+ assert_include(object_subclasses, c)
+ assert_not_include(object_subclasses, sc)
+ assert_not_include(object_subclasses, ssc)
+ object_subclasses.each do |subclass|
+ assert_equal Object, subclass.superclass, "Expected #{subclass}.superclass to be Object"
+ end
+ end
+
+ def test_subclass_gc
+ c = Class.new
+ 10_000.times do
+ cc = Class.new(c)
+ 100.times { Class.new(cc) }
+ end
+ assert(c.subclasses.size <= 10_000)
+ end
+
+ def test_subclass_gc_stress
+ 10000.times do
+ c = Class.new
+ 100.times { Class.new(c) }
+ assert(c.subclasses.size <= 100)
+ end
+ end
+
def test_classext_memory_leak
assert_no_memory_leak([], <<-PREP, <<-CODE, rss: true)
code = proc { Class.new }
diff --git a/test/ruby/test_env.rb b/test/ruby/test_env.rb
index ea0f367334f519..5bc974d6b25c09 100644
--- a/test/ruby/test_env.rb
+++ b/test/ruby/test_env.rb
@@ -503,7 +503,7 @@ def test_update
end
def test_huge_value
- if /mswin/ =~ RUBY_PLATFORM || /ucrt/ =~ RbConfig::CONFIG['sitearch']
+ if /mswin|ucrt/ =~ RUBY_PLATFORM
# On Windows >= Vista each environment variable can be max 32768 characters
huge_value = "bar" * 10900
else
diff --git a/test/ruby/test_eval.rb b/test/ruby/test_eval.rb
index bf551c6845693d..d55977c986f36d 100644
--- a/test/ruby/test_eval.rb
+++ b/test/ruby/test_eval.rb
@@ -219,6 +219,12 @@ def test_instance_eval_cvar
end
end
+ def test_instance_exec_cvar
+ [Object.new, [], 7, :sym, true, false, nil].each do |obj|
+ assert_equal(13, obj.instance_exec{@@cvar})
+ end
+ end
+
def test_instance_eval_method
bug2788 = '[ruby-core:28324]'
[Object.new, [], nil, true, false].each do |o|
@@ -253,6 +259,70 @@ def test_instance_eval_const
assert_equal(2, bar)
end
+ def test_instance_exec_block_basic
+ forall_TYPE do |o|
+ assert_equal nil, o.instance_exec { nil }
+ assert_equal true, o.instance_exec { true }
+ assert_equal false, o.instance_exec { false }
+ assert_equal o, o.instance_exec { self }
+ assert_equal 1, o.instance_exec { 1 }
+ assert_equal :sym, o.instance_exec { :sym }
+
+ assert_equal 11, o.instance_exec { 11 }
+ assert_equal 12, o.instance_exec { @ivar } unless o.frozen?
+ assert_equal 13, o.instance_exec { @@cvar }
+ assert_equal 14, o.instance_exec { $gvar__eval }
+ assert_equal 15, o.instance_exec { Const }
+ assert_equal 16, o.instance_exec { 7 + 9 }
+ assert_equal 17, o.instance_exec { 17.to_i }
+ assert_equal "18", o.instance_exec { "18" }
+ assert_equal "19", o.instance_exec { "1#{9}" }
+
+ 1.times {
+ assert_equal 12, o.instance_exec { @ivar } unless o.frozen?
+ assert_equal 13, o.instance_exec { @@cvar }
+ assert_equal 14, o.instance_exec { $gvar__eval }
+ assert_equal 15, o.instance_exec { Const }
+ }
+ end
+ end
+
+ def test_instance_exec_method_definition
+ klass = Class.new
+ o = klass.new
+
+ o.instance_exec do
+ def foo
+ :foo_result
+ end
+ end
+
+ assert_respond_to o, :foo
+ refute_respond_to klass, :foo
+ refute_respond_to klass.new, :foo
+
+ assert_equal :foo_result, o.foo
+ end
+
+ def test_instance_exec_eval_method_definition
+ klass = Class.new
+ o = klass.new
+
+ o.instance_exec do
+ eval %{
+ def foo
+ :foo_result
+ end
+ }
+ end
+
+ assert_respond_to o, :foo
+ refute_respond_to klass, :foo
+ refute_respond_to klass.new, :foo
+
+ assert_equal :foo_result, o.foo
+ end
+
#
# From ruby/test/ruby/test_eval.rb
#
diff --git a/test/ruby/test_integer.rb b/test/ruby/test_integer.rb
index 9354514df07dc9..a2b181c6422c84 100644
--- a/test/ruby/test_integer.rb
+++ b/test/ruby/test_integer.rb
@@ -299,6 +299,31 @@ def test_times
end
end
+ def test_times_bignum_redefine_plus_lt
+ assert_separately([], "#{<<-"begin;"}\n#{<<~"end;"}")
+ begin;
+ called = false
+ Integer.class_eval do
+ alias old_plus +
+ undef +
+ define_method(:+){|x| called = true; 1}
+ alias old_lt <
+ undef <
+ define_method(:<){|x| called = true}
+ end
+ big = 2**65
+ big.times{break 0}
+ Integer.class_eval do
+ undef +
+ alias + old_plus
+ undef <
+ alias < old_lt
+ end
+ bug18377 = "[ruby-core:106361]"
+ assert_equal(false, called, bug18377)
+ end;
+ end
+
def assert_int_equal(expected, result, mesg = nil)
assert_kind_of(Integer, result, mesg)
assert_equal(expected, result, mesg)
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 96e572b98d7000..71a8911fbd0e97 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -476,6 +476,18 @@ def test_copy_stream_append
}
end
+ def test_copy_stream_append_to_nonempty
+ with_srccontent("foobar") {|src, content|
+ preface = 'preface'
+ File.write('dst', preface)
+ File.open('dst', 'ab') do |dst|
+ ret = IO.copy_stream(src, dst)
+ assert_equal(content.bytesize, ret)
+ assert_equal(preface + content, File.read("dst"))
+ end
+ }
+ end
+
def test_copy_stream_smaller
with_srccontent {|src, content|
diff --git a/test/ruby/test_io_buffer.rb b/test/ruby/test_io_buffer.rb
index 57d1867b25cb5f..f7c175b589cad0 100644
--- a/test/ruby/test_io_buffer.rb
+++ b/test/ruby/test_io_buffer.rb
@@ -1,6 +1,14 @@
# frozen_string_literal: false
class TestIOBuffer < Test::Unit::TestCase
+ experimental = Warning[:experimental]
+ begin
+ Warning[:experimental] = false
+ IO::Buffer.new(0)
+ ensure
+ Warning[:experimental] = experimental
+ end
+
def assert_negative(value)
assert(value < 0, "Expected #{value} to be negative!")
end
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb
index 816875e6fc8858..ac191531dec00e 100644
--- a/test/ruby/test_iseq.rb
+++ b/test/ruby/test_iseq.rb
@@ -10,13 +10,16 @@ def test_no_linenum
end
def compile(src, line = nil, opt = nil)
+ unless line
+ line = caller_locations(1).first.lineno
+ end
EnvUtil.suppress_warning do
ISeq.new(src, __FILE__, __FILE__, line, opt)
end
end
- def lines src
- body = compile(src).to_a[13]
+ def lines src, lines = nil
+ body = compile(src, lines).to_a[13]
body.find_all{|e| e.kind_of? Integer}
end
@@ -25,24 +28,22 @@ def test_allocate
end
def test_to_a_lines
- src = <<-EOS
+ assert_equal [__LINE__+1, __LINE__+2, __LINE__+4], lines(<<-EOS, __LINE__+1)
p __LINE__ # 1
p __LINE__ # 2
# 3
p __LINE__ # 4
EOS
- assert_equal [1, 2, 4], lines(src)
- src = <<-EOS
+ assert_equal [__LINE__+2, __LINE__+4], lines(<<-EOS, __LINE__+1)
# 1
p __LINE__ # 2
# 3
p __LINE__ # 4
# 5
EOS
- assert_equal [2, 4], lines(src)
- src = <<-EOS
+ assert_equal [__LINE__+3, __LINE__+4, __LINE__+7, __LINE__+9], lines(<<~EOS, __LINE__+1)
1 # should be optimized out
2 # should be optimized out
p __LINE__ # 3
@@ -53,7 +54,6 @@ def test_to_a_lines
8 # should be optimized out
9
EOS
- assert_equal [3, 4, 7, 9], lines(src)
end
def test_unsupported_type
@@ -86,7 +86,7 @@ def test_cdhash_after_roundtrip
# CDHASH was not built properly when loading from binary and
# was causing opt_case_dispatch to clobber its stack canary
# for its "leaf" instruction attribute.
- iseq = compile(<<~EOF)
+ iseq = compile(<<~EOF, __LINE__+1)
case Class.new(String).new("foo")
when "foo"
42
@@ -96,8 +96,19 @@ def test_cdhash_after_roundtrip
end
def test_super_with_block
- iseq = compile(<<~EOF)
- def touch(*) # :nodoc:
+ iseq = compile(<<~EOF, __LINE__+1)
+ def (Object.new).touch(*) # :nodoc:
+ foo { super }
+ end
+ 42
+ EOF
+ assert_equal(42, ISeq.load_from_binary(iseq.to_binary).eval)
+ end
+
+ def test_super_with_block_hash_0
+ iseq = compile(<<~EOF, __LINE__+1)
+ # [Bug #18250] `req` specifically cause `Assertion failed: (key != 0), function hash_table_raw_insert`
+ def (Object.new).touch(req, *)
foo { super }
end
42
@@ -106,8 +117,8 @@ def touch(*) # :nodoc:
end
def test_super_with_block_and_kwrest
- iseq = compile(<<~EOF)
- def touch2(**) # :nodoc:
+ iseq = compile(<<~EOF, __LINE__+1)
+ def (Object.new).touch(**) # :nodoc:
foo { super }
end
42
@@ -116,7 +127,7 @@ def touch2(**) # :nodoc:
end
def test_lambda_with_ractor_roundtrip
- iseq = compile(<<~EOF)
+ iseq = compile(<<~EOF, __LINE__+1)
x = 42
y = lambda { x }
Ractor.make_shareable(y)
@@ -126,8 +137,8 @@ def test_lambda_with_ractor_roundtrip
end
def test_super_with_anonymous_block
- iseq = compile(<<~EOF)
- def touch3(&) # :nodoc:
+ iseq = compile(<<~EOF, __LINE__+1)
+ def (Object.new).touch(&) # :nodoc:
foo { super }
end
42
@@ -194,16 +205,16 @@ def method_test_line_trace
end
def test_line_trace
- iseq = compile \
- %q{ a = 1
+ iseq = compile(<<~EOF, __LINE__+1)
+ a = 1
b = 2
c = 3
# d = 4
e = 5
# f = 6
g = 7
+ EOF
- }
assert_equal([1, 2, 3, 5, 7], iseq.line_trace_all)
iseq.line_trace_specify(1, true) # line 2
iseq.line_trace_specify(3, true) # line 5
@@ -703,4 +714,11 @@ def test_iseq_option_debug_level
RubyVM::InstructionSequence.compile("", debug_level: 5)
end;
end
+
+ def test_mandatory_only
+ assert_separately [], <<~RUBY
+ at0 = Time.at(0)
+ assert_equal at0, Time.public_send(:at, 0, 0)
+ RUBY
+ end
end
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index 4a374265313f82..d737c84af5e46f 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -393,7 +393,7 @@ def test_trace_defined_method
[["c-return", 3, :set_trace_func, Kernel],
["line", 6, __method__, self.class],
["call", 1, :foobar, FooBar],
- ["return", 6, :foobar, FooBar],
+ ["return", 1, :foobar, FooBar],
["line", 7, __method__, self.class],
["c-call", 7, :set_trace_func, Kernel]].each{|e|
assert_equal(e, events.shift)
@@ -1951,7 +1951,7 @@ def test_return_value_with_rescue
end
define_method(:f_break_defined) do
- return :f_break_defined
+ break :f_break_defined
end
define_method(:f_raise_defined) do
@@ -1972,27 +1972,44 @@ def test_return_value_with_rescue_and_defined_methods
tp_return_value(:f_last_defined),
'[Bug #13369]'
- assert_equal [[:b_return, :f_return_defined, nil], # current limitation
+ assert_equal [[:b_return, :f_return_defined, :f_return_defined],
[:return, :f_return_defined, :f_return_defined]],
tp_return_value(:f_return_defined),
'[Bug #13369]'
- assert_equal [[:b_return, :f_break_defined, nil],
+ assert_equal [[:b_return, :f_break_defined, :f_break_defined],
[:return, :f_break_defined, :f_break_defined]],
tp_return_value(:f_break_defined),
'[Bug #13369]'
- assert_equal [[:b_return, :f_raise_defined, nil],
+ assert_equal [[:b_return, :f_raise_defined, f_raise_defined],
[:return, :f_raise_defined, f_raise_defined]],
tp_return_value(:f_raise_defined),
'[Bug #13369]'
- assert_equal [[:b_return, :f_break_in_rescue_defined, nil],
+ assert_equal [[:b_return, :f_break_in_rescue_defined, f_break_in_rescue_defined],
[:return, :f_break_in_rescue_defined, f_break_in_rescue_defined]],
tp_return_value(:f_break_in_rescue_defined),
'[Bug #13369]'
end
+ define_method(:just_yield) do |&block|
+ block.call
+ end
+
+ define_method(:unwind_multiple_bmethods) do
+ just_yield { return :unwind_multiple_bmethods }
+ end
+
+ def test_non_local_return_across_multiple_define_methods
+ assert_equal [[:b_return, :unwind_multiple_bmethods, nil],
+ [:b_return, :just_yield, nil],
+ [:return, :just_yield, nil],
+ [:b_return, :unwind_multiple_bmethods, :unwind_multiple_bmethods],
+ [:return, :unwind_multiple_bmethods, :unwind_multiple_bmethods]],
+ tp_return_value(:unwind_multiple_bmethods)
+ end
+
def f_iter
yield
end
@@ -2403,6 +2420,99 @@ def test_enable_target_thread
assert_equal Array.new(2){th}, events
end
+ def test_return_bmethod_location
+ bug13392 = "[ruby-core:80515] incorrect bmethod return location"
+ actual = nil
+ obj = Object.new
+ expected = __LINE__ + 1
+ obj.define_singleton_method(:t){}
+ tp = TracePoint.new(:return) do
+ next unless target_thread?
+ actual = tp.lineno
+ end
+ tp.enable {obj.t}
+ assert_equal(expected, actual, bug13392)
+ end
+
+ def test_b_tracepoints_going_away
+ # test that call and return TracePoints continue to work
+ # when b_call and b_return TracePoints stop
+ events = []
+ record_events = ->(tp) do
+ next unless target_thread?
+ events << [tp.event, tp.method_id]
+ end
+
+ call_ret_tp = TracePoint.new(:call, :return, &record_events)
+ block_call_ret_tp = TracePoint.new(:b_call, :b_return, &record_events)
+
+ obj = Object.new
+ obj.define_singleton_method(:foo) {} # a bmethod
+
+ foo = obj.method(:foo)
+ call_ret_tp.enable(target: foo) do
+ block_call_ret_tp.enable(target: foo) do
+ obj.foo
+ end
+ obj.foo
+ end
+
+ assert_equal(
+ [
+ [:call, :foo],
+ [:b_call, :foo],
+ [:b_return, :foo],
+ [:return, :foo],
+ [:call, :foo],
+ [:return, :foo],
+ ],
+ events,
+ )
+ end
+
+ def test_target_different_bmethod_same_iseq
+ # make two bmethods that share the same block iseq
+ block = Proc.new {}
+ obj = Object.new
+ obj.define_singleton_method(:one, &block)
+ obj.define_singleton_method(:two, &block)
+
+ events = []
+ record_events = ->(tp) do
+ next unless target_thread?
+ events << [tp.event, tp.method_id]
+ end
+ tp_one = TracePoint.new(:call, :return, &record_events)
+ tp_two = TracePoint.new(:call, :return, &record_events)
+
+ tp_one.enable(target: obj.method(:one)) do
+ obj.one
+ obj.two # not targeted
+ end
+ assert_equal([[:call, :one], [:return, :one]], events)
+ events.clear
+
+ tp_one.enable(target: obj.method(:one)) do
+ obj.one
+ tp_two.enable(target: obj.method(:two)) do
+ obj.two
+ end
+ obj.two
+ obj.one
+ end
+ assert_equal(
+ [
+ [:call, :one],
+ [:return, :one],
+ [:call, :two],
+ [:return, :two],
+ [:call, :one],
+ [:return, :one],
+ ],
+ events
+ )
+ end
+
def test_return_event_with_rescue
obj = Object.new
def obj.example
diff --git a/test/ruby/test_struct.rb b/test/ruby/test_struct.rb
index 19577266c74093..03016123953567 100644
--- a/test/ruby/test_struct.rb
+++ b/test/ruby/test_struct.rb
@@ -489,6 +489,14 @@ def test_deconstruct_keys
}
end
+ def test_public_send
+ klass = @Struct.new(:a)
+ x = klass.new(1)
+ assert_equal(1, x.public_send("a"))
+ assert_equal(42, x.public_send("a=", 42))
+ assert_equal(42, x.public_send("a"))
+ end
+
class TopStruct < Test::Unit::TestCase
include TestStruct
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb
index c6736750d54619..c629a59c02acb9 100644
--- a/test/ruby/test_time.rb
+++ b/test/ruby/test_time.rb
@@ -37,6 +37,8 @@ def get_t2000
end
def test_new
+ assert_equal(Time.new(2000,1,1,0,0,0), Time.new(2000))
+ assert_equal(Time.new(2000,2,1,0,0,0), Time.new("2000", "Feb"))
assert_equal(Time.utc(2000,2,10), Time.new(2000,2,10, 11,0,0, 3600*11))
assert_equal(Time.utc(2000,2,10), Time.new(2000,2,9, 13,0,0, -3600*11))
assert_equal(Time.utc(2000,2,29,23,0,0), Time.new(2000, 3, 1, 0, 0, 0, 3600))
diff --git a/test/ruby/test_undef.rb b/test/ruby/test_undef.rb
index e0add7c3abae7c..074b92be558380 100644
--- a/test/ruby/test_undef.rb
+++ b/test/ruby/test_undef.rb
@@ -35,4 +35,20 @@ def test_special_const_undef
end
end
end
+
+ def test_singleton_undef
+ klass = Class.new do
+ def foo
+ :ok
+ end
+ end
+
+ klass.new.foo
+
+ klass.new.instance_eval do
+ undef foo
+ end
+
+ klass.new.foo
+ end
end
diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb
index a571432ccdcc81..0106a091661ae6 100644
--- a/test/ruby/test_yjit.rb
+++ b/test/ruby/test_yjit.rb
@@ -52,6 +52,11 @@ def test_enable_from_env_var
assert_in_out_err([yjit_child_env, '-e p RubyVM::YJIT.enabled?'], '', ['true'])
end
+ def test_compile_setclassvariable
+ script = 'class Foo; def self.foo; @@foo = 1; end; end; Foo.foo'
+ assert_compiles(script, insns: %i[setclassvariable], result: 1)
+ end
+
def test_compile_getclassvariable
script = 'class Foo; @@foo = 1; def self.foo; @@foo; end; end; Foo.foo'
assert_compiles(script, insns: %i[getclassvariable], result: 1)
@@ -407,9 +412,20 @@ def foo(foo: 1+1)
RUBY
end
- def test_invokebuiltin
- skip "Struct's getter/setter doesn't use invokebuiltin and YJIT doesn't support new logic"
+ def test_struct_aref
+ assert_compiles(<<~RUBY)
+ def foo(obj)
+ obj.foo
+ obj.bar
+ end
+
+ Foo = Struct.new(:foo, :bar)
+ foo(Foo.new(123))
+ foo(Foo.new(123))
+ RUBY
+ end
+ def test_struct_aset
assert_compiles(<<~RUBY)
def foo(obj)
obj.foo = 123
diff --git a/test/rubygems/test_gem_command_manager.rb b/test/rubygems/test_gem_command_manager.rb
index f6a82908b3383f..c2e11d20029497 100644
--- a/test/rubygems/test_gem_command_manager.rb
+++ b/test/rubygems/test_gem_command_manager.rb
@@ -36,6 +36,18 @@ def test_find_alias_command
assert_kind_of Gem::Commands::InstallCommand, command
end
+ def test_find_login_alias_command
+ command = @command_manager.find_command 'login'
+
+ assert_kind_of Gem::Commands::SigninCommand, command
+ end
+
+ def test_find_logout_alias_comamnd
+ command = @command_manager.find_command 'logout'
+
+ assert_kind_of Gem::Commands::SignoutCommand, command
+ end
+
def test_find_command_ambiguous_exact
ins_command = Class.new
Gem::Commands.send :const_set, :InsCommand, ins_command
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index 50f99bc419889d..5cf94a1dc990a8 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -156,6 +156,21 @@ def test_env_shebang_flag
assert_match %r{\A#!\s*#{bin_env}#{ruby_exec}}, File.read(gem_bin_path)
end
+ def test_destdir_flag_does_not_try_to_write_to_the_default_gem_home
+ FileUtils.chmod "-w", File.join(@gemhome, "plugins")
+
+ destdir = File.join(@tempdir, 'foo')
+
+ @cmd.options[:destdir] = destdir
+ @cmd.execute
+
+ spec = Gem::Specification.load("bundler/bundler.gemspec")
+
+ spec.executables.each do |e|
+ assert_path_exist File.join destdir, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'gems', spec.full_name, spec.bindir, e
+ end
+ end
+
def test_files_in
assert_equal %w[rubygems.rb rubygems/requirement.rb rubygems/ssl_certs/rubygems.org/foo.pem],
@cmd.files_in('lib').sort
@@ -245,6 +260,8 @@ def test_install_default_bundler_gem_with_force_flag
def test_install_default_bundler_gem_with_destdir_flag
@cmd.extend FileUtils
+ FileUtils.chmod "-w", @gemhome
+
destdir = File.join(@tempdir, 'foo')
bin_dir = File.join(destdir, 'bin')
diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb
index 988f14146d7e09..dae2b070d57db7 100644
--- a/test/rubygems/test_gem_installer.rb
+++ b/test/rubygems/test_gem_installer.rb
@@ -288,6 +288,33 @@ def test_ensure_loadable_spec
"(SyntaxError)", e.message
end
+ def test_ensure_no_race_conditions_between_installing_and_loading_gemspecs
+ a, a_gem = util_gem 'a', 2
+
+ Gem::Installer.at(a_gem).install
+
+ t1 = Thread.new do
+ 5.times do
+ Gem::Installer.at(a_gem).install
+ sleep 0.1
+ end
+ end
+
+ t2 = Thread.new do
+ _, err = capture_output do
+ 20.times do
+ Gem::Specification.load(a.spec_file)
+ Gem::Specification.send(:clear_load_cache)
+ end
+ end
+
+ assert_empty err
+ end
+
+ t1.join
+ t2.join
+ end
+
def test_ensure_loadable_spec_security_policy
pend 'openssl is missing' unless Gem::HAVE_OPENSSL
@@ -948,7 +975,6 @@ def test_install
Gem.pre_install do
assert_path_not_exist cache_file, 'cache file must not exist yet'
- assert_path_not_exist spec_file, 'spec file must not exist yet'
true
end
@@ -956,13 +982,11 @@ def test_install
assert_path_exist gemdir, 'gem install dir must exist'
assert_path_exist rakefile, 'gem executable must exist'
assert_path_not_exist stub_exe, 'gem executable must not exist'
- assert_path_not_exist spec_file, 'spec file must not exist yet'
true
end
Gem.post_install do
assert_path_exist cache_file, 'cache file must exist'
- assert_path_exist spec_file, 'spec file must exist'
end
@newspec = nil
@@ -1237,7 +1261,11 @@ def test_install_missing_dirs
end
def test_install_post_build_false
- installer = setup_base_installer
+ @spec = util_spec 'a'
+
+ util_build_gem @spec
+
+ installer = util_installer @spec, @gemhome
Gem.post_build do
false
@@ -1279,7 +1307,11 @@ def test_install_post_build_nil
end
def test_install_pre_install_false
- installer = setup_base_installer
+ @spec = util_spec 'a'
+
+ util_build_gem @spec
+
+ installer = util_installer @spec, @gemhome
Gem.pre_install do
false
diff --git a/test/rubygems/test_gem_security.rb b/test/rubygems/test_gem_security.rb
index d04bd4a8bd8100..415ec2b5f648f5 100644
--- a/test/rubygems/test_gem_security.rb
+++ b/test/rubygems/test_gem_security.rb
@@ -196,7 +196,7 @@ def test_class_reset
def test_class_sign
issuer = PUBLIC_CERT.subject
- signee = OpenSSL::X509::Name.parse "/CN=signee/DC=example"
+ signee = OpenSSL::X509::Name.new([["CN", "signee"], ["DC", "example"]])
key = PRIVATE_KEY
cert = OpenSSL::X509::Certificate.new
diff --git a/test/rubygems/test_project_sanity.rb b/test/rubygems/test_project_sanity.rb
index e9e3bfd1bad1d6..4324c997bdbc99 100644
--- a/test/rubygems/test_project_sanity.rb
+++ b/test/rubygems/test_project_sanity.rb
@@ -13,7 +13,19 @@ def test_manifest_is_up_to_date
end
def test_require_rubygems_package
- err, status = Open3.capture2e(*ruby_with_rubygems_in_load_path, "--disable-gems", "-e", "'require \"rubygems/package\"'")
+ err, status = Open3.capture2e(*ruby_with_rubygems_in_load_path, "--disable-gems", "-e", "require \"rubygems/package\"")
+
+ assert status.success?, err
+ end
+
+ def test_require_and_use_rubygems_version
+ err, status = Open3.capture2e(
+ *ruby_with_rubygems_in_load_path,
+ "--disable-gems",
+ "-rrubygems/version",
+ "-e",
+ "Gem::Version.new('2.7.0.preview1') >= Gem::Version.new(RUBY_VERSION)"
+ )
assert status.success?, err
end
diff --git a/test/rubygems/test_require.rb b/test/rubygems/test_require.rb
index 07e412cc765e70..56774116a92314 100644
--- a/test/rubygems/test_require.rb
+++ b/test/rubygems/test_require.rb
@@ -24,16 +24,6 @@ def await
end
end
- def setup
- super
-
- @old_loaded_features = $LOADED_FEATURES.dup
- assert_raise LoadError do
- require 'test_gem_require_a'
- end
- $LOADED_FEATURES.replace @old_loaded_features
- end
-
def assert_require(path)
assert require(path), "'#{path}' was already required"
end
@@ -88,8 +78,6 @@ def test_dash_i_beats_gems
FileUtils.mkdir_p File.dirname c_rb
File.open(c_rb, 'w') {|f| f.write "class Object; HELLO = 'world' end" }
- lp = $LOAD_PATH.dup
-
# Pretend to provide a commandline argument that overrides a file in gem b
$LOAD_PATH.unshift dash_i_arg
@@ -98,7 +86,6 @@ def test_dash_i_beats_gems
assert_equal "world", ::Object::HELLO
assert_equal %w[a-1 b-1], loaded_spec_names
ensure
- $LOAD_PATH.replace lp
Object.send :remove_const, :HELLO if Object.const_defined? :HELLO
end
@@ -132,8 +119,6 @@ def test_dash_i_beats_default_gems
assert_require 'test_gem_require_a'
- lp = $LOAD_PATH.dup
-
# Pretend to provide a commandline argument that overrides a file in gem b
$LOAD_PATH.unshift dash_i_arg
@@ -142,7 +127,6 @@ def test_dash_i_beats_default_gems
assert_equal "world", ::Object::HELLO
assert_equal %w[a-1 b-1], loaded_spec_names
ensure
- $LOAD_PATH.replace lp
Object.send :remove_const, :HELLO if Object.const_defined? :HELLO
end
@@ -153,16 +137,10 @@ def test_dash_i_respects_default_library_extension_priority
dash_i_ext_arg = util_install_extension_file('a')
dash_i_lib_arg = util_install_ruby_file('a')
- lp = $LOAD_PATH.dup
-
- begin
- $LOAD_PATH.unshift dash_i_lib_arg
- $LOAD_PATH.unshift dash_i_ext_arg
- assert_require 'a'
- assert_match(/a\.rb$/, $LOADED_FEATURES.last)
- ensure
- $LOAD_PATH.replace lp
- end
+ $LOAD_PATH.unshift dash_i_lib_arg
+ $LOAD_PATH.unshift dash_i_ext_arg
+ assert_require 'a'
+ assert_match(/a\.rb$/, $LOADED_FEATURES.last)
end
def test_concurrent_require
@@ -466,8 +444,7 @@ def test_second_gem_require_does_not_resolve_path_manually_before_going_through_
end
def test_realworld_default_gem
- testing_ruby_repo = !ENV["GEM_COMMAND"].nil?
- pend "this test can't work under ruby-core setup" if testing_ruby_repo || java_platform?
+ omit "this test can't work under ruby-core setup" if testing_ruby_repo?
cmd = <<-RUBY
$stderr = $stdout
@@ -480,8 +457,7 @@ def test_realworld_default_gem
end
def test_realworld_upgraded_default_gem
- testing_ruby_repo = !ENV["GEM_COMMAND"].nil?
- pend "this test can't work under ruby-core setup" if testing_ruby_repo
+ omit "this test can't work under ruby-core setup" if testing_ruby_repo?
newer_json = util_spec("json", "999.99.9", nil, ["lib/json.rb"])
install_gem newer_json
@@ -720,6 +696,10 @@ def deprecated
private
+ def testing_ruby_repo?
+ !ENV["GEM_COMMAND"].nil?
+ end
+
def silence_warnings
old_verbose, $VERBOSE = $VERBOSE, false
yield
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb
index 9807db36743d00..16c359eca153a2 100644
--- a/test/socket/test_socket.rb
+++ b/test/socket/test_socket.rb
@@ -1,9 +1,5 @@
# frozen_string_literal: true
-# tentatively disabled due to IPv6 configuration issue on Solaris CI
-# http://rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20210729T040002Z.fail.html.gz
-return if /solaris/ =~ RUBY_PLATFORM
-
begin
require "socket"
require "tmpdir"
diff --git a/test/test_securerandom.rb b/test/test_securerandom.rb
index ab96952e370532..f9130ab81e2244 100644
--- a/test/test_securerandom.rb
+++ b/test/test_securerandom.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: false
require 'test/unit'
require 'securerandom'
-require 'tempfile'
# This testcase does NOT aim to test cryptographically strongness and randomness.
class TestSecureRandom < Test::Unit::TestCase
@@ -156,24 +155,6 @@ def test_alphanumeric
end
end
- def protect
- begin
- yield
- rescue NotImplementedError
- # ignore
- end
- end
-
- def remove_feature(basename)
- $LOADED_FEATURES.delete_if { |path|
- if File.basename(path) == basename
- $LOAD_PATH.any? { |dir|
- File.exist?(File.join(dir, basename))
- }
- end
- }
- end
-
def assert_in_range(range, result, mesg = nil)
assert(range.cover?(result), build_message(mesg, "Expected #{result} to be in #{range}"))
end
diff --git a/test/win32ole/test_win32ole.rb b/test/win32ole/test_win32ole.rb
index 39417805285ebd..e5f9d35e249331 100644
--- a/test/win32ole/test_win32ole.rb
+++ b/test/win32ole/test_win32ole.rb
@@ -101,7 +101,7 @@ def test_ole_get_methods
assert_include(mnames, 'Count')
end
- def test_ole_mehtod_help
+ def test_ole_method_help
minfo = @dict1.ole_method_help("Add")
assert_equal(2, minfo.size_params)
end
diff --git a/test/win32ole/test_win32ole_event.rb b/test/win32ole/test_win32ole_event.rb
index 742bff4f7a5be4..fa9e7b5b080fef 100644
--- a/test/win32ole/test_win32ole_event.rb
+++ b/test/win32ole/test_win32ole_event.rb
@@ -65,12 +65,13 @@ def message_loop(watch_ivar = nil)
if watch_ivar
# wait until event is proceeded
tries = 0
+ seconds = EnvUtil.apply_timeout_scale(1)
while tries < 5 && instance_variable_get(watch_ivar) == orig_ivar
- seconds = 2 ** tries # sleep at most 31s in total
$stderr.puts "test_win32ole_event.rb: retrying and sleeping #{seconds}s until #{watch_ivar} is changed from #{orig_ivar.inspect}..."
WIN32OLE_EVENT.message_loop
sleep(seconds)
tries += 1
+ seconds *= 2 # sleep at most 31s in total
end
end
end
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb
index a629c0c902a05d..1e57c5aa8c62f5 100644
--- a/test/zlib/test_zlib.rb
+++ b/test/zlib/test_zlib.rb
@@ -538,30 +538,36 @@ def test_multithread_inflate
end
def test_recursive_deflate
+ original_gc_stress = GC.stress
+ GC.stress = true
zd = Zlib::Deflate.new
s = SecureRandom.random_bytes(1024**2)
- assert_raise(Zlib::BufError) do
+ assert_raise(Zlib::InProgressError) do
zd.deflate(s) do
zd.deflate(s)
end
end
ensure
+ GC.stress = original_gc_stress
zd&.finish
zd&.close
end
def test_recursive_inflate
+ original_gc_stress = GC.stress
+ GC.stress = true
zi = Zlib::Inflate.new
s = Zlib.deflate(SecureRandom.random_bytes(1024**2))
- assert_raise(Zlib::DataError) do
+ assert_raise(Zlib::InProgressError) do
zi.inflate(s) do
zi.inflate(s)
end
end
ensure
+ GC.stress = original_gc_stress
zi&.close
end
end
diff --git a/thread_sync.c b/thread_sync.c
index 98d95ff0093c24..33a0d5e9ca2c9a 100644
--- a/thread_sync.c
+++ b/thread_sync.c
@@ -1011,7 +1011,9 @@ queue_do_pop(VALUE self, struct rb_queue *q, int should_block)
.as = {.q = q}
};
- list_add_tail(queue_waitq(queue_waiter.as.q), &queue_waiter.w.node);
+ struct list_head *waitq = queue_waitq(q);
+
+ list_add_tail(waitq, &queue_waiter.w.node);
queue_waiter.as.q->num_waiting++;
rb_ensure(queue_sleep, self, queue_sleep_done, (VALUE)&queue_waiter);
diff --git a/timev.rb b/timev.rb
index 675b54faf6452e..52056f4e591d0a 100644
--- a/timev.rb
+++ b/timev.rb
@@ -275,7 +275,7 @@ def self.at(time, subsec = false, unit = :microsecond, in: nil)
end
end
- # Returns a new \Time object based the on given arguments.
+ # Returns a new \Time object based on the given arguments.
#
# With no positional arguments, returns the value of Time.now:
#
diff --git a/tool/bundler/rubocop_gems.rb.lock b/tool/bundler/rubocop_gems.rb.lock
index a4d2446902559e..8d1e9c759c25b2 100644
--- a/tool/bundler/rubocop_gems.rb.lock
+++ b/tool/bundler/rubocop_gems.rb.lock
@@ -26,20 +26,20 @@ GEM
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
- rspec-support (3.10.2)
- rubocop (1.21.0)
+ rspec-support (3.10.3)
+ rubocop (1.23.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
- rubocop-ast (>= 1.9.1, < 2.0)
+ rubocop-ast (>= 1.12.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
- rubocop-ast (1.11.0)
+ rubocop-ast (1.13.0)
parser (>= 3.0.1.1)
ruby-progressbar (1.11.0)
- test-unit (3.4.7)
+ test-unit (3.5.1)
power_assert
unicode-display_width (2.1.0)
@@ -47,6 +47,7 @@ PLATFORMS
arm64-darwin-20
universal-java-11
x86_64-darwin-19
+ x86_64-darwin-20
x86_64-linux
DEPENDENCIES
diff --git a/tool/bundler/standard_gems.rb.lock b/tool/bundler/standard_gems.rb.lock
index 326d88b5a7a7cc..68186165c3b2b3 100644
--- a/tool/bundler/standard_gems.rb.lock
+++ b/tool/bundler/standard_gems.rb.lock
@@ -26,26 +26,26 @@ GEM
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
- rspec-support (3.10.2)
- rubocop (1.20.0)
+ rspec-support (3.10.3)
+ rubocop (1.22.3)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
- rubocop-ast (>= 1.9.1, < 2.0)
+ rubocop-ast (>= 1.12.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
- rubocop-ast (1.11.0)
+ rubocop-ast (1.13.0)
parser (>= 3.0.1.1)
rubocop-performance (1.11.5)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.11.0)
- standard (1.3.0)
- rubocop (= 1.20.0)
+ standard (1.4.0)
+ rubocop (= 1.22.3)
rubocop-performance (= 1.11.5)
- test-unit (3.4.7)
+ test-unit (3.5.1)
power_assert
unicode-display_width (2.1.0)
@@ -53,6 +53,7 @@ PLATFORMS
arm64-darwin-20
universal-java-11
x86_64-darwin-19
+ x86_64-darwin-20
x86_64-linux
DEPENDENCIES
diff --git a/tool/bundler/test_gems.rb.lock b/tool/bundler/test_gems.rb.lock
index f8fa01b59cd294..2f1dab91e20c87 100644
--- a/tool/bundler/test_gems.rb.lock
+++ b/tool/bundler/test_gems.rb.lock
@@ -13,7 +13,7 @@ GEM
rack-test (1.1.0)
rack (>= 1.0, < 3)
rake (13.0.1)
- ruby2_keywords (0.0.2)
+ ruby2_keywords (0.0.5)
sinatra (2.0.8.1)
mustermann (~> 1.0)
rack (~> 2.0)
@@ -27,6 +27,7 @@ PLATFORMS
ruby
universal-java-11
x64-mingw32
+ x86_64-darwin-20
x86_64-linux
DEPENDENCIES
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb
index 47d711f4fae77d..3cc1ea11b5cad2 100644
--- a/tool/lib/core_assertions.rb
+++ b/tool/lib/core_assertions.rb
@@ -33,6 +33,7 @@ def message msg = nil, ending = nil, &default
module CoreAssertions
require_relative 'envutil'
require 'pp'
+ nil.pretty_inspect
def mu_pp(obj) #:nodoc:
obj.pretty_inspect.chomp
diff --git a/tool/lib/leakchecker.rb b/tool/lib/leakchecker.rb
index 052bea5e537fb1..ed507969402cec 100644
--- a/tool/lib/leakchecker.rb
+++ b/tool/lib/leakchecker.rb
@@ -209,13 +209,28 @@ def check_thread_leak(test_name)
return leaked
end
- def find_env
- ENV.to_h
+ e = ENV["_Ruby_Env_Ignorecase_"], ENV["_RUBY_ENV_IGNORECASE_"]
+ begin
+ ENV["_Ruby_Env_Ignorecase_"] = ENV["_RUBY_ENV_IGNORECASE_"] = nil
+ ENV["_RUBY_ENV_IGNORECASE_"] = "ENV_CASE_TEST"
+ ENV_IGNORECASE = ENV["_Ruby_Env_Ignorecase_"] == "ENV_CASE_TEST"
+ ensure
+ ENV["_Ruby_Env_Ignorecase_"], ENV["_RUBY_ENV_IGNORECASE_"] = e
+ end
+
+ if ENV_IGNORECASE
+ def find_env
+ ENV.to_h {|k, v| [k.upcase, v]}
+ end
+ else
+ def find_env
+ ENV.to_h
+ end
end
def check_env(test_name)
old_env = @env_info
- new_env = ENV.to_h
+ new_env = find_env
return false if old_env == new_env
(old_env.keys | new_env.keys).sort.each {|k|
if old_env.has_key?(k)
diff --git a/tool/mkrunnable.rb b/tool/mkrunnable.rb
index 62ace2898069c5..ca1295c7fb8d30 100755
--- a/tool/mkrunnable.rb
+++ b/tool/mkrunnable.rb
@@ -54,7 +54,7 @@ def ln_safe(src, dest)
alias ln_dir_safe ln_safe
case RUBY_PLATFORM
-when /linux/
+when /linux/, /darwin/, /solaris/
def ln_exe(src, dest)
ln(src, dest, force: true)
end
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 0f86850db7c2bd..852ff8f6983dc7 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -429,7 +429,6 @@ def CONFIG.[](name, mandatory = false)
install_recursive("#{$extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "*.h", :mode => $data_mode)
install_recursive("#{$extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "rb_mjit_header-*.obj", :mode => $data_mode)
install_recursive("#{$extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "rb_mjit_header-*.pch", :mode => $data_mode)
- install_recursive("#{$extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "rb_mjit_header-*.pdb", :mode => $data_mode)
end
install?(:ext, :comm, :'ext-comm') do
prepare "extension scripts", rubylibdir
diff --git a/tool/ruby_vm/views/_insn_entry.erb b/tool/ruby_vm/views/_insn_entry.erb
index bdd0fa3c7cb2c9..f34afddb1f3041 100644
--- a/tool/ruby_vm/views/_insn_entry.erb
+++ b/tool/ruby_vm/views/_insn_entry.erb
@@ -24,7 +24,7 @@ INSN_ENTRY(<%= insn.name %>)
<%= ope[:decl] %> = (<%= ope[:type] %>)GET_OPERAND(<%= i + 1 %>);
% end
# define INSN_ATTR(x) <%= insn.call_attribute(' ## x ## ') %>
- bool leaf = INSN_ATTR(leaf);
+ const bool leaf = INSN_ATTR(leaf);
% insn.pops.reverse_each.with_index.reverse_each do |pop, i|
<%= pop[:decl] %> = <%= insn.cast_from_VALUE pop, "TOPN(#{i})"%>;
% end
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index 2bf505fd88827e..95574580074fc5 100755
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -74,6 +74,7 @@
digest: "ruby/digest",
error_highlight: "ruby/error_highlight",
un: "ruby/un",
+ win32ole: "ruby/win32ole",
}
# We usually don't use this. Please consider using #sync_default_gems_with_commits instead.
@@ -353,6 +354,12 @@ def sync_default_gems(gem)
cp_r(Dir.glob("#{upstream}/lib/error_highlight*"), "lib")
cp_r("#{upstream}/error_highlight.gemspec", "lib/error_highlight")
cp_r("#{upstream}/test", "test/error_highlight")
+ when "win32ole"
+ sync_lib gem, upstream
+ rm_rf(%w[ext/win32ole/lib])
+ Dir.mkdir(*%w[ext/win32ole/lib])
+ move("lib/win32ole/win32ole.gemspec", "ext/win32ole")
+ move(Dir.glob("lib/win32ole*"), "ext/win32ole/lib")
else
sync_lib gem, upstream
end
@@ -373,6 +380,8 @@ def message_filter(repo, sha)
url = "https://github.com/#{repo}"
print "[#{repo}] ", log.gsub(/fix +#\d+|\(#\d+\)/i) {
$&.sub(/#/) {"#{url}/pull/"}
+ }.gsub(%r{(?method_visi, visi->module_func, next_cref, pushed_by_eval);
+ new_cref = vm_cref_new(cref->klass_or_self, visi->method_visi, visi->module_func, next_cref, pushed_by_eval, singleton);
if (!NIL_P(CREF_REFINEMENTS(cref))) {
VALUE ref = rb_hash_dup(CREF_REFINEMENTS(cref));
rb_hash_foreach(ref, ref_delete_symkey, Qnil);
CREF_REFINEMENTS_SET(new_cref, ref);
- CREF_OMOD_SHARED_UNSET(new_cref);
+ CREF_OMOD_SHARED_UNSET(new_cref);
}
return new_cref;
@@ -298,12 +301,12 @@ vm_cref_dup(const rb_cref_t *cref)
rb_cref_t *
rb_vm_cref_dup_without_refinements(const rb_cref_t *cref)
{
- VALUE klass = CREF_CLASS(cref);
const rb_scope_visibility_t *visi = CREF_SCOPE_VISI(cref);
rb_cref_t *next_cref = CREF_NEXT(cref), *new_cref;
int pushed_by_eval = CREF_PUSHED_BY_EVAL(cref);
+ int singleton = CREF_SINGLETON(cref);
- new_cref = vm_cref_new(klass, visi->method_visi, visi->module_func, next_cref, pushed_by_eval);
+ new_cref = vm_cref_new(cref->klass_or_self, visi->method_visi, visi->module_func, next_cref, pushed_by_eval, singleton);
if (!NIL_P(CREF_REFINEMENTS(cref))) {
CREF_REFINEMENTS_SET(new_cref, Qnil);
@@ -316,11 +319,11 @@ rb_vm_cref_dup_without_refinements(const rb_cref_t *cref)
static rb_cref_t *
vm_cref_new_toplevel(rb_execution_context_t *ec)
{
- rb_cref_t *cref = vm_cref_new(rb_cObject, METHOD_VISI_PRIVATE /* toplevel visibility is private */, FALSE, NULL, FALSE);
+ rb_cref_t *cref = vm_cref_new(rb_cObject, METHOD_VISI_PRIVATE /* toplevel visibility is private */, FALSE, NULL, FALSE, FALSE);
VALUE top_wrapper = rb_ec_thread_ptr(ec)->top_wrapper;
if (top_wrapper) {
- cref = vm_cref_new(top_wrapper, METHOD_VISI_PRIVATE, FALSE, cref, FALSE);
+ cref = vm_cref_new(top_wrapper, METHOD_VISI_PRIVATE, FALSE, cref, FALSE, FALSE);
}
return cref;
@@ -1256,18 +1259,17 @@ rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const I
const rb_iseq_t *base_iseq, *iseq;
rb_ast_body_t ast;
NODE tmp_node;
- ID minibuf[4], *dyns = minibuf;
- VALUE idtmp = 0;
if (dyncount < 0) return 0;
base_block = &bind->block;
base_iseq = vm_block_iseq(base_block);
- if (dyncount >= numberof(minibuf)) dyns = ALLOCV_N(ID, idtmp, dyncount + 1);
+ VALUE idtmp = 0;
+ rb_ast_id_table_t *dyns = ALLOCV(idtmp, sizeof(rb_ast_id_table_t) + dyncount * sizeof(ID));
+ dyns->size = dyncount;
+ MEMCPY(dyns->ids, dynvars, ID, dyncount);
- dyns[0] = dyncount;
- MEMCPY(dyns + 1, dynvars, ID, dyncount);
rb_node_init(&tmp_node, NODE_SCOPE, (VALUE)dyns, 0, 0);
ast.root = &tmp_node;
ast.compile_option = 0;
@@ -1314,7 +1316,6 @@ invoke_bmethod(rb_execution_context_t *ec, const rb_iseq_t *iseq, VALUE self, co
/* bmethod */
int arg_size = iseq->body->param.size;
VALUE ret;
- rb_hook_list_t *hooks;
VM_ASSERT(me->def->type == VM_METHOD_TYPE_BMETHOD);
@@ -1326,24 +1327,9 @@ invoke_bmethod(rb_execution_context_t *ec, const rb_iseq_t *iseq, VALUE self, co
iseq->body->local_table_size - arg_size,
iseq->body->stack_max);
- RUBY_DTRACE_METHOD_ENTRY_HOOK(ec, me->owner, me->def->original_id);
- EXEC_EVENT_HOOK(ec, RUBY_EVENT_CALL, self, me->def->original_id, me->called_id, me->owner, Qnil);
-
- if (UNLIKELY((hooks = me->def->body.bmethod.hooks) != NULL) &&
- hooks->events & RUBY_EVENT_CALL) {
- rb_exec_event_hook_orig(ec, hooks, RUBY_EVENT_CALL, self,
- me->def->original_id, me->called_id, me->owner, Qnil, FALSE);
- }
VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH);
ret = vm_exec(ec, true);
- EXEC_EVENT_HOOK(ec, RUBY_EVENT_RETURN, self, me->def->original_id, me->called_id, me->owner, ret);
- if ((hooks = me->def->body.bmethod.hooks) != NULL &&
- hooks->events & RUBY_EVENT_RETURN) {
- rb_exec_event_hook_orig(ec, hooks, RUBY_EVENT_RETURN, self,
- me->def->original_id, me->called_id, me->owner, ret, FALSE);
- }
- RUBY_DTRACE_METHOD_RETURN_HOOK(ec, me->owner, me->def->original_id);
return ret;
}
@@ -2034,9 +2020,11 @@ frame_name(const rb_control_frame_t *cfp)
}
#endif
+// cfp_returning_with_value:
+// Whether cfp is the last frame in the unwinding process for a non-local return.
static void
hook_before_rewind(rb_execution_context_t *ec, const rb_control_frame_t *cfp,
- int will_finish_vm_exec, int state, struct vm_throw_data *err)
+ bool cfp_returning_with_value, int state, struct vm_throw_data *err)
{
if (state == TAG_RAISE && RBASIC(err)->klass == rb_eSysStackError) {
return;
@@ -2059,32 +2047,36 @@ hook_before_rewind(rb_execution_context_t *ec, const rb_control_frame_t *cfp,
break;
case VM_FRAME_MAGIC_BLOCK:
if (VM_FRAME_BMETHOD_P(ec->cfp)) {
- EXEC_EVENT_HOOK(ec, RUBY_EVENT_B_RETURN, ec->cfp->self, 0, 0, 0, frame_return_value(err));
+ VALUE bmethod_return_value = frame_return_value(err);
+ if (cfp_returning_with_value) {
+ // Non-local return terminating at a BMETHOD control frame.
+ bmethod_return_value = THROW_DATA_VAL(err);
+ }
+
+
+ EXEC_EVENT_HOOK(ec, RUBY_EVENT_B_RETURN, ec->cfp->self, 0, 0, 0, bmethod_return_value);
if (UNLIKELY(local_hooks && local_hooks->events & RUBY_EVENT_B_RETURN)) {
rb_exec_event_hook_orig(ec, local_hooks, RUBY_EVENT_B_RETURN,
- ec->cfp->self, 0, 0, 0, frame_return_value(err), FALSE);
+ ec->cfp->self, 0, 0, 0, bmethod_return_value, FALSE);
}
- if (!will_finish_vm_exec) {
- const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(ec->cfp);
-
- /* kick RUBY_EVENT_RETURN at invoke_block_from_c() for bmethod */
- EXEC_EVENT_HOOK_AND_POP_FRAME(ec, RUBY_EVENT_RETURN, ec->cfp->self,
- rb_vm_frame_method_entry(ec->cfp)->def->original_id,
- rb_vm_frame_method_entry(ec->cfp)->called_id,
- rb_vm_frame_method_entry(ec->cfp)->owner,
- frame_return_value(err));
-
- VM_ASSERT(me->def->type == VM_METHOD_TYPE_BMETHOD);
- local_hooks = me->def->body.bmethod.hooks;
-
- if (UNLIKELY(local_hooks && local_hooks->events & RUBY_EVENT_RETURN)) {
- rb_exec_event_hook_orig(ec, local_hooks, RUBY_EVENT_RETURN, ec->cfp->self,
- rb_vm_frame_method_entry(ec->cfp)->def->original_id,
- rb_vm_frame_method_entry(ec->cfp)->called_id,
- rb_vm_frame_method_entry(ec->cfp)->owner,
- frame_return_value(err), TRUE);
- }
+ const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(ec->cfp);
+
+ EXEC_EVENT_HOOK_AND_POP_FRAME(ec, RUBY_EVENT_RETURN, ec->cfp->self,
+ rb_vm_frame_method_entry(ec->cfp)->def->original_id,
+ rb_vm_frame_method_entry(ec->cfp)->called_id,
+ rb_vm_frame_method_entry(ec->cfp)->owner,
+ bmethod_return_value);
+
+ VM_ASSERT(me->def->type == VM_METHOD_TYPE_BMETHOD);
+ local_hooks = me->def->body.bmethod.hooks;
+
+ if (UNLIKELY(local_hooks && local_hooks->events & RUBY_EVENT_RETURN)) {
+ rb_exec_event_hook_orig(ec, local_hooks, RUBY_EVENT_RETURN, ec->cfp->self,
+ rb_vm_frame_method_entry(ec->cfp)->def->original_id,
+ rb_vm_frame_method_entry(ec->cfp)->called_id,
+ rb_vm_frame_method_entry(ec->cfp)->owner,
+ bmethod_return_value, TRUE);
}
THROW_DATA_CONSUMED_SET(err);
}
@@ -2285,7 +2277,8 @@ vm_exec_handle_exception(rb_execution_context_t *ec, enum ruby_tag_type state,
if (catch_iseq == NULL) {
ec->errinfo = Qnil;
THROW_DATA_CATCH_FRAME_SET(err, cfp + 1);
- hook_before_rewind(ec, ec->cfp, TRUE, state, err);
+ // cfp == escape_cfp here so calling with cfp_returning_with_value = true
+ hook_before_rewind(ec, ec->cfp, true, state, err);
rb_vm_pop_frame(ec);
return THROW_DATA_VAL(err);
}
@@ -2426,7 +2419,7 @@ vm_exec_handle_exception(rb_execution_context_t *ec, enum ruby_tag_type state,
return Qundef;
}
else {
- hook_before_rewind(ec, ec->cfp, FALSE, state, err);
+ hook_before_rewind(ec, ec->cfp, (cfp == escape_cfp), state, err);
if (VM_FRAME_FINISHED_P(ec->cfp)) {
rb_vm_pop_frame(ec);
@@ -3752,7 +3745,7 @@ Init_VM(void)
th->ec->cfp->self = th->top_self;
VM_ENV_FLAGS_UNSET(th->ec->cfp->ep, VM_FRAME_FLAG_CFRAME);
- VM_STACK_ENV_WRITE(th->ec->cfp->ep, VM_ENV_DATA_INDEX_ME_CREF, (VALUE)vm_cref_new(rb_cObject, METHOD_VISI_PRIVATE, FALSE, NULL, FALSE));
+ VM_STACK_ENV_WRITE(th->ec->cfp->ep, VM_ENV_DATA_INDEX_ME_CREF, (VALUE)vm_cref_new(rb_cObject, METHOD_VISI_PRIVATE, FALSE, NULL, FALSE, FALSE));
/*
* The Binding of the top level scope
diff --git a/vm_callinfo.h b/vm_callinfo.h
index b3aafd6de14ecf..700fd3dc6cad2e 100644
--- a/vm_callinfo.h
+++ b/vm_callinfo.h
@@ -334,7 +334,9 @@ static inline const struct rb_callable_method_entry_struct *
vm_cc_cme(const struct rb_callcache *cc)
{
VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
- VM_ASSERT(!vm_cc_markable(cc) || cc->cme_ != NULL);
+ VM_ASSERT(cc->call_ == NULL || // not initialized yet
+ !vm_cc_markable(cc) ||
+ cc->cme_ != NULL);
return cc->cme_;
}
diff --git a/vm_debug.h b/vm_debug.h
index d8f4fcbe242f4f..230f0f7b16ed8e 100644
--- a/vm_debug.h
+++ b/vm_debug.h
@@ -12,7 +12,6 @@
**********************************************************************/
#include "ruby/ruby.h"
-#include "node.h"
RUBY_SYMBOL_EXPORT_BEGIN
@@ -21,9 +20,11 @@ RUBY_SYMBOL_EXPORT_BEGIN
#define dpi(i) ruby_debug_print_id(-1, 0, "", (i))
#define dpn(n) ruby_debug_print_node(-1, 0, "", (n))
+struct RNode;
+
VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE v);
ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id);
-NODE *ruby_debug_print_node(int level, int debug_level, const char *header, const NODE *node);
+struct RNode *ruby_debug_print_node(int level, int debug_level, const char *header, const struct RNode *node);
int ruby_debug_print_indent(int level, int debug_level, int indent_level);
void ruby_debug_gc_check_func(void);
void ruby_set_debug_option(const char *str);
diff --git a/vm_eval.c b/vm_eval.c
index 140912f218aa2f..0abb4644f9d696 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -275,11 +275,11 @@ vm_call0_body(rb_execution_context_t *ec, struct rb_calling_info *calling, const
}
case OPTIMIZED_METHOD_TYPE_STRUCT_AREF:
vm_call_check_arity(calling, 0, argv);
- ret = vm_call_opt_struct_aref0(ec, ec->cfp, calling);
+ ret = vm_call_opt_struct_aref0(ec, calling);
goto success;
case OPTIMIZED_METHOD_TYPE_STRUCT_ASET:
vm_call_check_arity(calling, 1, argv);
- ret = vm_call_opt_struct_aset0(ec, ec->cfp, calling);
+ ret = vm_call_opt_struct_aset0(ec, calling, argv[0]);
goto success;
default:
rb_bug("vm_call0: unsupported optimized method type (%d)", vm_cc_cme(cc)->def->body.optimized.type);
@@ -382,7 +382,7 @@ static inline enum method_missing_reason rb_method_call_status(rb_execution_cont
static const struct rb_callcache *
cc_new(VALUE klass, ID mid, int argc, const rb_callable_method_entry_t *cme)
{
- const struct rb_callcache *cc;
+ const struct rb_callcache *cc = NULL;
RB_VM_LOCK_ENTER();
{
@@ -399,10 +399,15 @@ cc_new(VALUE klass, ID mid, int argc, const rb_callable_method_entry_t *cme)
rb_id_table_insert(cc_tbl, mid, (VALUE)ccs);
}
- if (ccs->len > 0) {
- cc = ccs->entries[0].cc;
+ for (int i=0; ilen; i++) {
+ cc = ccs->entries[i].cc;
+ if (vm_cc_cme(cc) == cme) {
+ break;
+ }
+ cc = NULL;
}
- else {
+
+ if (cc == NULL) {
const struct rb_callinfo *ci = vm_ci_new(mid, 0, argc, false); // TODO: proper ci
cc = vm_cc_new(klass, cme, vm_call_general);
METHOD_ENTRY_CACHED_SET((struct rb_callable_method_entry_struct *)cme);
@@ -1855,7 +1860,7 @@ eval_string_wrap_protect(VALUE data)
{
const struct eval_string_wrap_arg *const arg = (struct eval_string_wrap_arg*)data;
rb_cref_t *cref = rb_vm_cref_new_toplevel();
- cref->klass = arg->klass;
+ cref->klass_or_self = arg->klass;
return eval_string_with_cref(arg->top_self, rb_str_new_cstr(arg->str), cref, rb_str_new_cstr("eval"), 1);
}
@@ -1917,7 +1922,7 @@ rb_eval_cmd_kw(VALUE cmd, VALUE arg, int kw_splat)
/* block eval under the class/module context */
static VALUE
-yield_under(VALUE under, VALUE self, int argc, const VALUE *argv, int kw_splat)
+yield_under(VALUE self, int singleton, int argc, const VALUE *argv, int kw_splat)
{
rb_execution_context_t *ec = GET_EC();
rb_control_frame_t *cfp = ec->cfp;
@@ -1958,7 +1963,9 @@ yield_under(VALUE under, VALUE self, int argc, const VALUE *argv, int kw_splat)
VM_FORCE_WRITE_SPECIAL_CONST(&VM_CF_LEP(ec->cfp)[VM_ENV_DATA_INDEX_SPECVAL], new_block_handler);
}
- cref = vm_cref_push(ec, under, ep, TRUE);
+ VM_ASSERT(singleton || RB_TYPE_P(self, T_MODULE) || RB_TYPE_P(self, T_CLASS));
+ cref = vm_cref_push(ec, self, ep, TRUE, singleton);
+
return vm_yield_with_cref(ec, argc, argv, kw_splat, cref, is_lambda);
}
@@ -1976,7 +1983,7 @@ rb_yield_refine_block(VALUE refinement, VALUE refinements)
struct rb_captured_block new_captured = *captured;
VALUE new_block_handler = VM_BH_FROM_ISEQ_BLOCK(&new_captured);
const VALUE *ep = captured->ep;
- rb_cref_t *cref = vm_cref_push(ec, refinement, ep, TRUE);
+ rb_cref_t *cref = vm_cref_push(ec, refinement, ep, TRUE, FALSE);
CREF_REFINEMENTS_SET(cref, refinements);
VM_FORCE_WRITE_SPECIAL_CONST(&VM_CF_LEP(ec->cfp)[VM_ENV_DATA_INDEX_SPECVAL], new_block_handler);
new_captured.self = refinement;
@@ -1986,19 +1993,20 @@ rb_yield_refine_block(VALUE refinement, VALUE refinements)
/* string eval under the class/module context */
static VALUE
-eval_under(VALUE under, VALUE self, VALUE src, VALUE file, int line)
+eval_under(VALUE self, int singleton, VALUE src, VALUE file, int line)
{
- rb_cref_t *cref = vm_cref_push(GET_EC(), under, NULL, SPECIAL_CONST_P(self) && !NIL_P(under));
+ rb_cref_t *cref = vm_cref_push(GET_EC(), self, NULL, FALSE, singleton);
SafeStringValue(src);
+
return eval_string_with_cref(self, src, cref, file, line);
}
static VALUE
-specific_eval(int argc, const VALUE *argv, VALUE klass, VALUE self, int kw_splat)
+specific_eval(int argc, const VALUE *argv, VALUE self, int singleton, int kw_splat)
{
if (rb_block_given_p()) {
rb_check_arity(argc, 0, 0);
- return yield_under(klass, self, 1, &self, kw_splat);
+ return yield_under(self, singleton, 1, &self, kw_splat);
}
else {
VALUE file = Qundef;
@@ -2014,23 +2022,7 @@ specific_eval(int argc, const VALUE *argv, VALUE klass, VALUE self, int kw_splat
file = argv[1];
if (!NIL_P(file)) StringValue(file);
}
- return eval_under(klass, self, code, file, line);
- }
-}
-
-static VALUE
-singleton_class_for_eval(VALUE self)
-{
- if (SPECIAL_CONST_P(self)) {
- return rb_special_singleton_class(self);
- }
- switch (BUILTIN_TYPE(self)) {
- case T_FLOAT: case T_BIGNUM: case T_SYMBOL:
- return Qnil;
- case T_STRING:
- if (FL_TEST_RAW(self, RSTRING_FSTR)) return Qnil;
- default:
- return rb_singleton_class(self);
+ return eval_under(self, singleton, code, file, line);
}
}
@@ -2070,15 +2062,13 @@ singleton_class_for_eval(VALUE self)
static VALUE
rb_obj_instance_eval_internal(int argc, const VALUE *argv, VALUE self)
{
- VALUE klass = singleton_class_for_eval(self);
- return specific_eval(argc, argv, klass, self, RB_PASS_CALLED_KEYWORDS);
+ return specific_eval(argc, argv, self, TRUE, RB_PASS_CALLED_KEYWORDS);
}
VALUE
rb_obj_instance_eval(int argc, const VALUE *argv, VALUE self)
{
- VALUE klass = singleton_class_for_eval(self);
- return specific_eval(argc, argv, klass, self, RB_NO_KEYWORDS);
+ return specific_eval(argc, argv, self, TRUE, RB_NO_KEYWORDS);
}
/*
@@ -2102,15 +2092,13 @@ rb_obj_instance_eval(int argc, const VALUE *argv, VALUE self)
static VALUE
rb_obj_instance_exec_internal(int argc, const VALUE *argv, VALUE self)
{
- VALUE klass = singleton_class_for_eval(self);
- return yield_under(klass, self, argc, argv, RB_PASS_CALLED_KEYWORDS);
+ return yield_under(self, TRUE, argc, argv, RB_PASS_CALLED_KEYWORDS);
}
VALUE
rb_obj_instance_exec(int argc, const VALUE *argv, VALUE self)
{
- VALUE klass = singleton_class_for_eval(self);
- return yield_under(klass, self, argc, argv, RB_NO_KEYWORDS);
+ return yield_under(self, TRUE, argc, argv, RB_NO_KEYWORDS);
}
/*
@@ -2143,13 +2131,13 @@ rb_obj_instance_exec(int argc, const VALUE *argv, VALUE self)
static VALUE
rb_mod_module_eval_internal(int argc, const VALUE *argv, VALUE mod)
{
- return specific_eval(argc, argv, mod, mod, RB_PASS_CALLED_KEYWORDS);
+ return specific_eval(argc, argv, mod, FALSE, RB_PASS_CALLED_KEYWORDS);
}
VALUE
rb_mod_module_eval(int argc, const VALUE *argv, VALUE mod)
{
- return specific_eval(argc, argv, mod, mod, RB_NO_KEYWORDS);
+ return specific_eval(argc, argv, mod, FALSE, RB_NO_KEYWORDS);
}
/*
@@ -2177,13 +2165,13 @@ rb_mod_module_eval(int argc, const VALUE *argv, VALUE mod)
static VALUE
rb_mod_module_exec_internal(int argc, const VALUE *argv, VALUE mod)
{
- return yield_under(mod, mod, argc, argv, RB_PASS_CALLED_KEYWORDS);
+ return yield_under(mod, FALSE, argc, argv, RB_PASS_CALLED_KEYWORDS);
}
VALUE
rb_mod_module_exec(int argc, const VALUE *argv, VALUE mod)
{
- return yield_under(mod, mod, argc, argv, RB_NO_KEYWORDS);
+ return yield_under(mod, FALSE, argc, argv, RB_NO_KEYWORDS);
}
/*
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index baf77acb143b09..c6b079e7d50733 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -892,7 +892,7 @@ rb_vm_rewrite_cref(rb_cref_t *cref, VALUE old_klass, VALUE new_klass, rb_cref_t
}
static rb_cref_t *
-vm_cref_push(const rb_execution_context_t *ec, VALUE klass, const VALUE *ep, int pushed_by_eval)
+vm_cref_push(const rb_execution_context_t *ec, VALUE klass, const VALUE *ep, int pushed_by_eval, int singleton)
{
rb_cref_t *prev_cref = NULL;
@@ -907,40 +907,30 @@ vm_cref_push(const rb_execution_context_t *ec, VALUE klass, const VALUE *ep, int
}
}
- return vm_cref_new(klass, METHOD_VISI_PUBLIC, FALSE, prev_cref, pushed_by_eval);
+ return vm_cref_new(klass, METHOD_VISI_PUBLIC, FALSE, prev_cref, pushed_by_eval, singleton);
}
static inline VALUE
vm_get_cbase(const VALUE *ep)
{
const rb_cref_t *cref = vm_get_cref(ep);
- VALUE klass = Qundef;
- while (cref) {
- if ((klass = CREF_CLASS(cref)) != 0) {
- break;
- }
- cref = CREF_NEXT(cref);
- }
-
- return klass;
+ return CREF_CLASS_FOR_DEFINITION(cref);
}
static inline VALUE
vm_get_const_base(const VALUE *ep)
{
const rb_cref_t *cref = vm_get_cref(ep);
- VALUE klass = Qundef;
while (cref) {
- if (!CREF_PUSHED_BY_EVAL(cref) &&
- (klass = CREF_CLASS(cref)) != 0) {
- break;
- }
- cref = CREF_NEXT(cref);
+ if (!CREF_PUSHED_BY_EVAL(cref)) {
+ return CREF_CLASS_FOR_DEFINITION(cref);
+ }
+ cref = CREF_NEXT(cref);
}
- return klass;
+ return Qundef;
}
static inline void
@@ -1060,7 +1050,7 @@ vm_get_cvar_base(const rb_cref_t *cref, const rb_control_frame_t *cfp, int top_l
while (CREF_NEXT(cref) &&
(NIL_P(CREF_CLASS(cref)) || FL_TEST(CREF_CLASS(cref), FL_SINGLETON) ||
- CREF_PUSHED_BY_EVAL(cref))) {
+ CREF_PUSHED_BY_EVAL(cref) || CREF_SINGLETON(cref))) {
cref = CREF_NEXT(cref);
}
if (top_level_raise && !CREF_NEXT(cref)) {
@@ -1367,6 +1357,12 @@ vm_setclassvariable(const rb_iseq_t *iseq, const rb_control_frame_t *reg_cfp, ID
update_classvariable_cache(iseq, klass, id, ic);
}
+void
+rb_vm_setclassvariable(const rb_iseq_t *iseq, const rb_control_frame_t *cfp, ID id, VALUE val, ICVARC ic)
+{
+ vm_setclassvariable(iseq, cfp, id, val, ic);
+}
+
static inline VALUE
vm_getinstancevariable(const rb_iseq_t *iseq, VALUE obj, ID id, IVC ic)
{
@@ -3531,7 +3527,7 @@ vm_call_opt_block_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
}
static VALUE
-vm_call_opt_struct_aref0(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
+vm_call_opt_struct_aref0(rb_execution_context_t *ec, struct rb_calling_info *calling)
{
VALUE recv = calling->recv;
@@ -3548,16 +3544,15 @@ vm_call_opt_struct_aref(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
{
RB_DEBUG_COUNTER_INC(ccf_opt_struct_aref);
- VALUE ret = vm_call_opt_struct_aref0(ec, reg_cfp, calling);
+ VALUE ret = vm_call_opt_struct_aref0(ec, calling);
reg_cfp->sp -= 1;
return ret;
}
static VALUE
-vm_call_opt_struct_aset0(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling)
+vm_call_opt_struct_aset0(rb_execution_context_t *ec, struct rb_calling_info *calling, VALUE val)
{
VALUE recv = calling->recv;
- VALUE val = *(reg_cfp->sp - 1);
VM_ASSERT(RB_TYPE_P(recv, T_STRUCT));
VM_ASSERT(vm_cc_cme(calling->cc)->def->type == VM_METHOD_TYPE_OPTIMIZED);
@@ -3576,7 +3571,7 @@ vm_call_opt_struct_aset(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
{
RB_DEBUG_COUNTER_INC(ccf_opt_struct_aset);
- VALUE ret = vm_call_opt_struct_aset0(ec, reg_cfp, calling);
+ VALUE ret = vm_call_opt_struct_aset0(ec, calling, *(reg_cfp->sp - 1));
reg_cfp->sp -= 2;
return ret;
}
@@ -4652,14 +4647,14 @@ vm_define_method(const rb_execution_context_t *ec, VALUE obj, ID id, VALUE iseqv
rb_method_visibility_t visi;
rb_cref_t *cref = vm_ec_cref(ec);
- if (!is_singleton) {
- klass = CREF_CLASS(cref);
- visi = vm_scope_visibility_get(ec);
- }
- else { /* singleton */
+ if (is_singleton) {
klass = rb_singleton_class(obj); /* class and frozen checked in this API */
visi = METHOD_VISI_PUBLIC;
}
+ else {
+ klass = CREF_CLASS_FOR_DEFINITION(cref);
+ visi = vm_scope_visibility_get(ec);
+ }
if (NIL_P(klass)) {
rb_raise(rb_eTypeError, "no class/module to add method");
@@ -5633,6 +5628,7 @@ vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
{
const VALUE *pc = reg_cfp->pc;
rb_event_flag_t enabled_flags = ruby_vm_event_flags & ISEQ_TRACE_EVENTS;
+ rb_event_flag_t global_events = enabled_flags;
if (enabled_flags == 0 && ruby_vm_event_local_num == 0) {
return;
@@ -5642,12 +5638,25 @@ vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
size_t pos = pc - iseq->body->iseq_encoded;
rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pos);
rb_hook_list_t *local_hooks = iseq->aux.exec.local_hooks;
- rb_event_flag_t local_hook_events = local_hooks != NULL ? local_hooks->events : 0;
- enabled_flags |= local_hook_events;
+ rb_event_flag_t iseq_local_events = local_hooks != NULL ? local_hooks->events : 0;
+ rb_hook_list_t *bmethod_local_hooks = NULL;
+ rb_event_flag_t bmethod_local_events = 0;
+ bool bmethod_frame = VM_FRAME_BMETHOD_P(reg_cfp);
+ enabled_flags |= iseq_local_events;
+
+ VM_ASSERT((iseq_local_events & ~ISEQ_TRACE_EVENTS) == 0);
+
+ if (bmethod_frame) {
+ const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(reg_cfp);
+ VM_ASSERT(me->def->type == VM_METHOD_TYPE_BMETHOD);
+ bmethod_local_hooks = me->def->body.bmethod.hooks;
+ if (bmethod_local_hooks) {
+ bmethod_local_events = bmethod_local_hooks->events;
+ }
+ }
- VM_ASSERT((local_hook_events & ~ISEQ_TRACE_EVENTS) == 0);
- if ((pc_events & enabled_flags) == 0) {
+ if ((pc_events & enabled_flags) == 0 && !bmethod_frame) {
#if 0
/* disable trace */
/* TODO: incomplete */
@@ -5665,6 +5674,9 @@ vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
}
else {
rb_hook_list_t *global_hooks = rb_ec_ractor_hooks(ec);
+ /* Note, not considering iseq local events here since the same
+ * iseq could be used in multiple bmethods. */
+ rb_event_flag_t bmethod_events = global_events | bmethod_local_events;
if (0) {
ruby_debug_printf("vm_trace>>%4d (%4x) - %s:%d %s\n",
@@ -5676,17 +5688,25 @@ vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
}
VM_ASSERT(reg_cfp->pc == pc);
VM_ASSERT(pc_events != 0);
- VM_ASSERT(enabled_flags & pc_events);
/* check traces */
+ if ((pc_events & RUBY_EVENT_B_CALL) && bmethod_frame && (bmethod_events & RUBY_EVENT_CALL)) {
+ /* b_call instruction running as a method. Fire call event. */
+ vm_trace_hook(ec, reg_cfp, pc, RUBY_EVENT_CALL, RUBY_EVENT_CALL, global_hooks, bmethod_local_hooks, Qundef);
+ }
VM_TRACE_HOOK(RUBY_EVENT_CLASS | RUBY_EVENT_CALL | RUBY_EVENT_B_CALL, Qundef);
VM_TRACE_HOOK(RUBY_EVENT_LINE, Qundef);
VM_TRACE_HOOK(RUBY_EVENT_COVERAGE_LINE, Qundef);
VM_TRACE_HOOK(RUBY_EVENT_COVERAGE_BRANCH, Qundef);
VM_TRACE_HOOK(RUBY_EVENT_END | RUBY_EVENT_RETURN | RUBY_EVENT_B_RETURN, TOPN(0));
+ if ((pc_events & RUBY_EVENT_B_RETURN) && bmethod_frame && (bmethod_events & RUBY_EVENT_RETURN)) {
+ /* b_return instruction running as a method. Fire return event. */
+ vm_trace_hook(ec, reg_cfp, pc, RUBY_EVENT_RETURN, RUBY_EVENT_RETURN, global_hooks, bmethod_local_hooks, TOPN(0));
+ }
}
}
}
+#undef VM_TRACE_HOOK
#if VM_CHECK_MODE > 0
NORETURN( NOINLINE( COLDFUNC
diff --git a/vm_trace.c b/vm_trace.c
index 3bc55f2c3ab6cc..3a0f7a7aadee9f 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -1180,8 +1180,9 @@ rb_tracepoint_enable_for_target(VALUE tpval, VALUE target, VALUE target_line)
{
rb_tp_t *tp = tpptr(tpval);
const rb_iseq_t *iseq = iseq_of(target);
- int n;
+ int n = 0;
unsigned int line = 0;
+ bool target_bmethod = false;
if (tp->tracing > 0) {
rb_raise(rb_eArgError, "can't nest-enable a targeting TracePoint");
@@ -1199,10 +1200,6 @@ rb_tracepoint_enable_for_target(VALUE tpval, VALUE target, VALUE target_line)
VM_ASSERT(tp->local_target_set == Qfalse);
tp->local_target_set = rb_obj_hide(rb_ident_hash_new());
- /* iseq */
- n = rb_iseq_add_local_tracepoint_recursively(iseq, tp->events, tpval, line);
- rb_hash_aset(tp->local_target_set, (VALUE)iseq, Qtrue);
-
/* bmethod */
if (rb_obj_is_method(target)) {
rb_method_definition_t *def = (rb_method_definition_t *)rb_method_def(target);
@@ -1211,11 +1208,17 @@ rb_tracepoint_enable_for_target(VALUE tpval, VALUE target, VALUE target_line)
def->body.bmethod.hooks = ZALLOC(rb_hook_list_t);
rb_hook_list_connect_tracepoint(target, def->body.bmethod.hooks, tpval, 0);
rb_hash_aset(tp->local_target_set, target, Qfalse);
+ target_bmethod = true;
n++;
}
}
+ /* iseq */
+ n += rb_iseq_add_local_tracepoint_recursively(iseq, tp->events, tpval, line, target_bmethod);
+ rb_hash_aset(tp->local_target_set, (VALUE)iseq, Qtrue);
+
+
if (n == 0) {
rb_raise(rb_eArgError, "can not enable any hooks");
}
@@ -1585,7 +1588,7 @@ postponed_job_register(rb_execution_context_t *ec, rb_vm_t *vm,
static rb_execution_context_t *
get_valid_ec(rb_vm_t *vm)
{
- rb_execution_context_t *ec = GET_EC();
+ rb_execution_context_t *ec = rb_current_execution_context(false);
if (ec == NULL) ec = rb_vm_main_ractor_ec(vm);
return ec;
}
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index ce8cafe8075a80..b01e05836c0719 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -338,7 +338,8 @@ MJIT_OPTFLAGS = -DMJIT_HEADER $(CFLAGS) $(XCFLAGS) $(CPPFLAGS)
!endif
!ifndef MJIT_DEBUGFLAGS
# TODO: Make this work... Another header for debug build needs to be installed first.
-MJIT_DEBUGFLAGS = $(DEBUGFLAGS)
+MJIT_DEBUGFLAGS = $(empty) $(DEBUGFLAGS) $(empty)
+MJIT_DEBUGFLAGS = $(MJIT_DEBUGFLAGS: -Zi = -Z7 )
!endif
!ifndef MJIT_LDSHARED
MJIT_LDSHARED = $(MJIT_CC) -LD
@@ -915,8 +916,7 @@ EXECUTABLE_EXTS = $(EXECUTABLE_EXTS:"=) # "
EXECUTABLE_EXTS = $(EXECUTABLE_EXTS:,= )
config.status: $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub $(srcdir)/common.mk
- @echo Creating $@
- @exit <<$@
+ @echo Creating <<$@
# Generated automatically by Makefile.sub.
s,@SHELL@,$$(COMSPEC),;t t
s,@BUILD_FILE_SEPARATOR@,\,;t t
@@ -1316,11 +1316,9 @@ clean-local::
$(Q)$(RM) $(MJIT_PRECOMPILED_HEADER_NAME) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT)
$(Q)$(RM) $(TIMESTAMPDIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.time) mjit_config.h
$(Q)$(RM) $(MJIT_HEADER_INSTALL_DIR)/rb_mjit_header-*.pch
- $(Q)$(RM) $(MJIT_HEADER_INSTALL_DIR)/rb_mjit_header-*.pdb
$(Q)$(RM) $(MJIT_HEADER_INSTALL_DIR)/rb_mjit_header-*.$(OBJEXT)
-$(Q) $(RMDIRS) $(MJIT_HEADER_INSTALL_DIR) 2> $(NULL) || exit 0
$(Q)$(RM) $(arch_hdrdir)/rb_mjit_header-*.pch
- $(Q)$(RM) $(arch_hdrdir)/rb_mjit_header-*.pdb
$(Q)$(RM) $(arch_hdrdir)/rb_mjit_header-*.$(OBJEXT)
# Non-mswin environment is not using prebuilt precompiled header because upgrading compiler
@@ -1334,8 +1332,8 @@ clean-local::
# for --jit-debug as well.
$(TIMESTAMPDIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=).time: probes.h vm.$(OBJEXT)
$(ECHO) building $(@F:.time=.pch)
- $(Q) $(CC) -DMJIT_HEADER $(CFLAGS) $(XCFLAGS:-DRUBY_EXPORT =) -URUBY_EXPORT $(CPPFLAGS) $(srcdir)/vm.c -c -Yc \
- $(COUTFLAG)$(@F:.time=.)$(OBJEXT) -Fd$(@F:.time=.pdb) -Fp$(@F:.time=.pch).new
+ $(Q) $(CC) -DMJIT_HEADER $(CFLAGS: -Zi = -Z7 ) $(XCFLAGS:-DRUBY_EXPORT =) -URUBY_EXPORT $(CPPFLAGS) $(srcdir)/vm.c -c -Yc \
+ $(COUTFLAG)$(@F:.time=.)$(OBJEXT) -Fd$(@F:.time=.pdb) -Fp$(@F:.time=.pch).new -Z7
$(Q) $(IFCHANGE) "--timestamp=$@" $(@F:.time=.pch) $(@F:.time=.pch).new
$(MJIT_PRECOMPILED_HEADER_NAME): $(TIMESTAMPDIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=).time
@@ -1344,11 +1342,9 @@ $(MJIT_PRECOMPILED_HEADER): $(MJIT_PRECOMPILED_HEADER_NAME)
$(Q) $(MAKEDIRS) $(MJIT_HEADER_INSTALL_DIR)
$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME) $@
$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT) $(MJIT_HEADER_INSTALL_DIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT)
- $(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.pdb) $(MJIT_HEADER_INSTALL_DIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.pdb)
$(Q) $(MAKEDIRS) $(arch_hdrdir)
$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME) $(arch_hdrdir)/$(MJIT_PRECOMPILED_HEADER_NAME)
$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT) $(arch_hdrdir)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT)
- $(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.pdb) $(arch_hdrdir)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.pdb)
INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \
vmtc.inc vm.inc mjit_compile.inc
diff --git a/yjit.c b/yjit.c
index cef7492e3400a6..2f8ec039ea0a29 100644
--- a/yjit.c
+++ b/yjit.c
@@ -69,6 +69,9 @@ YJIT_DECLARE_COUNTERS(
send_zsuper_method,
send_undef_method,
send_optimized_method,
+ send_optimized_method_send,
+ send_optimized_method_call,
+ send_optimized_method_block_call,
send_missing_method,
send_bmethod,
send_refined_method,
@@ -100,6 +103,7 @@ YJIT_DECLARE_COUNTERS(
getivar_se_self_not_heap,
getivar_idx_out_of_range,
+ getivar_megamorphic,
setivar_se_self_not_heap,
setivar_idx_out_of_range,
@@ -119,6 +123,9 @@ YJIT_DECLARE_COUNTERS(
vm_insns_count,
compiled_iseq_count,
compiled_block_count,
+ compilation_failure,
+
+ exit_from_branch_stub,
invalidation_count,
invalidate_method_lookup,
@@ -180,7 +187,7 @@ void rb_yjit_iseq_mark(const struct rb_iseq_constant_body *body) {}
void rb_yjit_iseq_update_references(const struct rb_iseq_constant_body *body) {}
void rb_yjit_iseq_free(const struct rb_iseq_constant_body *body) {}
void rb_yjit_before_ractor_spawn(void) {}
-void rb_yjit_constant_ic_update(const rb_iseq_t *iseq, IC ic) {}
+void rb_yjit_constant_ic_update(const rb_iseq_t *const iseq, IC ic) {}
void rb_yjit_tracing_invalidate_all(void) {}
#endif // if JIT_ENABLED && PLATFORM_SUPPORTED_P
diff --git a/yjit.h b/yjit.h
index c254c02cd8bd7c..357acdd4b4509e 100644
--- a/yjit.h
+++ b/yjit.h
@@ -60,7 +60,7 @@ void rb_yjit_iseq_mark(const struct rb_iseq_constant_body *body);
void rb_yjit_iseq_update_references(const struct rb_iseq_constant_body *body);
void rb_yjit_iseq_free(const struct rb_iseq_constant_body *body);
void rb_yjit_before_ractor_spawn(void);
-void rb_yjit_constant_ic_update(const rb_iseq_t *iseq, IC ic);
+void rb_yjit_constant_ic_update(const rb_iseq_t *const iseq, IC ic);
void rb_yjit_tracing_invalidate_all(void);
#endif // #ifndef YJIT_H
diff --git a/yjit.rb b/yjit.rb
index 3592e20a7fdd92..d06f0961fadd9d 100644
--- a/yjit.rb
+++ b/yjit.rb
@@ -149,6 +149,10 @@ def self.enabled?
Primitive.cexpr! 'rb_yjit_enabled_p() ? Qtrue : Qfalse'
end
+ def self.simulate_oom!
+ Primitive.simulate_oom_bang
+ end
+
# Avoid calling a method here to not interfere with compilation tests
if Primitive.yjit_stats_enabled_p
at_exit { _print_stats }
@@ -189,8 +193,12 @@ def _print_stats
total_insns_count = retired_in_yjit + stats[:vm_insns_count]
yjit_ratio_pct = 100.0 * retired_in_yjit.to_f / total_insns_count
+ # Number of failed compiler invocations
+ compilation_failure = stats[:compilation_failure]
+
$stderr.puts "bindings_allocations: " + ("%10d" % stats[:binding_allocations])
$stderr.puts "bindings_set: " + ("%10d" % stats[:binding_set])
+ $stderr.puts "compilation_failure: " + ("%10d" % compilation_failure) if compilation_failure != 0
$stderr.puts "compiled_iseq_count: " + ("%10d" % stats[:compiled_iseq_count])
$stderr.puts "compiled_block_count: " + ("%10d" % stats[:compiled_block_count])
$stderr.puts "invalidation_count: " + ("%10d" % stats[:invalidation_count])
diff --git a/yjit_asm.c b/yjit_asm.c
index 2ae50295a9be46..3a43c80ef088c1 100644
--- a/yjit_asm.c
+++ b/yjit_asm.c
@@ -163,7 +163,7 @@ static uint8_t *alloc_exec_mem(uint32_t mem_size)
mem_block = (uint8_t*)mmap(
(void*)req_addr,
mem_size,
- PROT_READ | PROT_WRITE | PROT_EXEC,
+ PROT_READ | PROT_EXEC,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED_NOREPLACE,
-1,
0
@@ -184,7 +184,7 @@ static uint8_t *alloc_exec_mem(uint32_t mem_size)
mem_block = (uint8_t*)mmap(
(void*)alloc_exec_mem,
mem_size,
- PROT_READ | PROT_WRITE | PROT_EXEC,
+ PROT_READ | PROT_EXEC,
MAP_PRIVATE | MAP_ANONYMOUS,
-1,
0
@@ -197,7 +197,7 @@ static uint8_t *alloc_exec_mem(uint32_t mem_size)
mem_block = (uint8_t*)mmap(
NULL,
mem_size,
- PROT_READ | PROT_WRITE | PROT_EXEC,
+ PROT_READ | PROT_EXEC,
MAP_PRIVATE | MAP_ANONYMOUS,
-1,
0
@@ -210,9 +210,17 @@ static uint8_t *alloc_exec_mem(uint32_t mem_size)
exit(-1);
}
- // Fill the executable memory with INT3 (0xCC) so that
- // executing uninitialized memory will fault
- memset(mem_block, 0xCC, mem_size);
+ codeblock_t block;
+ codeblock_t *cb = █
+
+ cb_init(cb, mem_block, mem_size);
+
+ // Fill the executable memory with PUSH DS (0x1E) so that
+ // executing uninitialized memory will fault with #UD in
+ // 64-bit mode.
+ cb_mark_all_writeable(cb);
+ memset(mem_block, 0x1E, mem_size);
+ cb_mark_all_executable(cb);
return mem_block;
#else
@@ -225,49 +233,58 @@ static uint8_t *alloc_exec_mem(uint32_t mem_size)
void cb_init(codeblock_t *cb, uint8_t *mem_block, uint32_t mem_size)
{
assert (mem_block);
- cb->mem_block = mem_block;
+ cb->mem_block_ = mem_block;
cb->mem_size = mem_size;
cb->write_pos = 0;
cb->num_labels = 0;
cb->num_refs = 0;
+ cb->current_aligned_write_pos = ALIGNED_WRITE_POSITION_NONE;
+}
+
+// Set the current write position
+void cb_set_pos(codeblock_t *cb, uint32_t pos)
+{
+ // Assert here since while assembler functions do bounds checking, there is
+ // nothing stopping users from taking out an out-of-bounds pointer and
+ // doing bad accesses with it.
+ assert (pos < cb->mem_size);
+ cb->write_pos = pos;
}
// Align the current write position to a multiple of bytes
void cb_align_pos(codeblock_t *cb, uint32_t multiple)
{
// Compute the pointer modulo the given alignment boundary
- uint8_t *ptr = &cb->mem_block[cb->write_pos];
+ uint8_t *ptr = cb_get_write_ptr(cb);
uint8_t *aligned_ptr = align_ptr(ptr, multiple);
+ const uint32_t write_pos = cb->write_pos;
// Pad the pointer by the necessary amount to align it
ptrdiff_t pad = aligned_ptr - ptr;
- cb->write_pos += (int32_t)pad;
-}
-
-// Set the current write position
-void cb_set_pos(codeblock_t *cb, uint32_t pos)
-{
- assert (pos < cb->mem_size);
- cb->write_pos = pos;
+ cb_set_pos(cb, write_pos + (int32_t)pad);
}
// Set the current write position from a pointer
void cb_set_write_ptr(codeblock_t *cb, uint8_t *code_ptr)
{
- intptr_t pos = code_ptr - cb->mem_block;
+ intptr_t pos = code_ptr - cb->mem_block_;
assert (pos < cb->mem_size);
- cb->write_pos = (uint32_t)pos;
+ cb_set_pos(cb, (uint32_t)pos);
}
// Get a direct pointer into the executable memory block
-uint8_t *cb_get_ptr(codeblock_t *cb, uint32_t index)
+uint8_t *cb_get_ptr(const codeblock_t *cb, uint32_t index)
{
- assert (index < cb->mem_size);
- return &cb->mem_block[index];
+ if (index < cb->mem_size) {
+ return &cb->mem_block_[index];
+ }
+ else {
+ return NULL;
+ }
}
// Get a direct pointer to the current write position
-uint8_t *cb_get_write_ptr(codeblock_t *cb)
+uint8_t *cb_get_write_ptr(const codeblock_t *cb)
{
return cb_get_ptr(cb, cb->write_pos);
}
@@ -275,9 +292,15 @@ uint8_t *cb_get_write_ptr(codeblock_t *cb)
// Write a byte at the current position
void cb_write_byte(codeblock_t *cb, uint8_t byte)
{
- assert (cb->mem_block);
- assert (cb->write_pos + 1 <= cb->mem_size);
- cb->mem_block[cb->write_pos++] = byte;
+ assert (cb->mem_block_);
+ if (cb->write_pos < cb->mem_size) {
+ cb_mark_position_writeable(cb, cb->write_pos);
+ cb->mem_block_[cb->write_pos] = byte;
+ cb->write_pos++;
+ }
+ else {
+ cb->dropped_bytes = true;
+ }
}
// Write multiple bytes starting from the current position
@@ -880,14 +903,18 @@ static void cb_write_jcc_ptr(codeblock_t *cb, const char *mnem, uint8_t op0, uin
cb_write_byte(cb, op1);
// Pointer to the end of this jump instruction
- uint8_t *end_ptr = &cb->mem_block[cb->write_pos] + 4;
+ uint8_t *end_ptr = cb_get_ptr(cb, cb->write_pos + 4);
// Compute the jump offset
int64_t rel64 = (int64_t)(dst_ptr - end_ptr);
- assert (rel64 >= INT32_MIN && rel64 <= INT32_MAX);
-
- // Write the relative 32-bit jump offset
- cb_write_int(cb, (int32_t)rel64, 32);
+ if (rel64 >= INT32_MIN && rel64 <= INT32_MAX) {
+ // Write the relative 32-bit jump offset
+ cb_write_int(cb, (int32_t)rel64, 32);
+ }
+ else {
+ // Offset doesn't fit in 4 bytes. Report error.
+ cb->dropped_bytes = true;
+ }
}
// Encode a conditional move instruction
@@ -961,14 +988,13 @@ void call_ptr(codeblock_t *cb, x86opnd_t scratch_reg, uint8_t *dst_ptr)
assert (scratch_reg.type == OPND_REG);
// Pointer to the end of this call instruction
- uint8_t *end_ptr = &cb->mem_block[cb->write_pos] + 5;
+ uint8_t *end_ptr = cb_get_ptr(cb, cb->write_pos + 5);
// Compute the jump offset
int64_t rel64 = (int64_t)(dst_ptr - end_ptr);
// If the offset fits in 32-bit
- if (rel64 >= INT32_MIN && rel64 <= INT32_MAX)
- {
+ if (rel64 >= INT32_MIN && rel64 <= INT32_MAX) {
call_rel32(cb, (int32_t)rel64);
return;
}
@@ -1771,3 +1797,36 @@ void cb_write_lock_prefix(codeblock_t *cb)
{
cb_write_byte(cb, 0xF0);
}
+
+void cb_mark_all_writeable(codeblock_t * cb)
+{
+ if (mprotect(cb->mem_block_, cb->mem_size, PROT_READ | PROT_WRITE)) {
+ fprintf(stderr, "Couldn't make JIT page (%p) writeable, errno: %s", (void *)cb->mem_block_, strerror(errno));
+ abort();
+ }
+}
+
+void cb_mark_position_writeable(codeblock_t * cb, uint32_t write_pos)
+{
+ uint32_t pagesize = (uint32_t)sysconf(_SC_PAGESIZE);
+ uint32_t aligned_position = (write_pos / pagesize) * pagesize;
+
+ if (cb->current_aligned_write_pos != aligned_position) {
+ cb->current_aligned_write_pos = aligned_position;
+ void *const page_addr = cb_get_ptr(cb, aligned_position);
+ if (mprotect(page_addr, pagesize, PROT_READ | PROT_WRITE)) {
+ fprintf(stderr, "Couldn't make JIT page (%p) writeable, errno: %s", page_addr, strerror(errno));
+ abort();
+ }
+ }
+}
+
+void cb_mark_all_executable(codeblock_t * cb)
+{
+ cb->current_aligned_write_pos = ALIGNED_WRITE_POSITION_NONE;
+ if (mprotect(cb->mem_block_, cb->mem_size, PROT_READ | PROT_EXEC)) {
+ fprintf(stderr, "Couldn't make JIT page (%p) executable, errno: %s", (void *)cb->mem_block_, strerror(errno));
+ abort();
+ }
+}
+
diff --git a/yjit_asm.h b/yjit_asm.h
index b1b2baae2e579b..202f21e7964610 100644
--- a/yjit_asm.h
+++ b/yjit_asm.h
@@ -26,12 +26,13 @@ typedef struct LabelRef
typedef struct CodeBlock
{
// Memory block
- uint8_t *mem_block;
+ // Users are advised to not use this directly.
+ uint8_t *mem_block_;
// Memory block size
uint32_t mem_size;
- /// Current writing position
+ // Current writing position
uint32_t write_pos;
// Table of registered label addresses
@@ -50,13 +51,25 @@ typedef struct CodeBlock
// Number of references to labels
uint32_t num_refs;
- // TODO: system for disassembly/comment strings, indexed by position
+
+ // Keep track of the current aligned write position.
+ // Used for changing protection when writing to the JIT buffer
+ uint32_t current_aligned_write_pos;
+
+ // Set if the assembler is unable to output some instructions,
+ // for example, when there is not enough space or when a jump
+ // target is too far away.
+ bool dropped_bytes;
// Flag to enable or disable comments
bool has_asm;
+
} codeblock_t;
+// 1 is not aligned so this won't match any pages
+#define ALIGNED_WRITE_POSITION_NONE 1
+
enum OpndType
{
OPND_NONE,
@@ -252,8 +265,8 @@ static inline void cb_init(codeblock_t *cb, uint8_t *mem_block, uint32_t mem_siz
static inline void cb_align_pos(codeblock_t *cb, uint32_t multiple);
static inline void cb_set_pos(codeblock_t *cb, uint32_t pos);
static inline void cb_set_write_ptr(codeblock_t *cb, uint8_t *code_ptr);
-static inline uint8_t *cb_get_ptr(codeblock_t *cb, uint32_t index);
-static inline uint8_t *cb_get_write_ptr(codeblock_t *cb);
+static inline uint8_t *cb_get_ptr(const codeblock_t *cb, uint32_t index);
+static inline uint8_t *cb_get_write_ptr(const codeblock_t *cb);
static inline void cb_write_byte(codeblock_t *cb, uint8_t byte);
static inline void cb_write_bytes(codeblock_t *cb, uint32_t num_bytes, ...);
static inline void cb_write_int(codeblock_t *cb, uint64_t val, uint32_t num_bits);
@@ -261,6 +274,9 @@ static inline uint32_t cb_new_label(codeblock_t *cb, const char *name);
static inline void cb_write_label(codeblock_t *cb, uint32_t label_idx);
static inline void cb_label_ref(codeblock_t *cb, uint32_t label_idx);
static inline void cb_link_labels(codeblock_t *cb);
+static inline void cb_mark_all_writeable(codeblock_t *cb);
+static inline void cb_mark_position_writeable(codeblock_t *cb, uint32_t write_pos);
+static inline void cb_mark_all_executable(codeblock_t *cb);
// Encode individual instructions into a code block
static inline void add(codeblock_t *cb, x86opnd_t opnd0, x86opnd_t opnd1);
diff --git a/yjit_codegen.c b/yjit_codegen.c
index 60ddf489e10683..9c603e240bf37a 100644
--- a/yjit_codegen.c
+++ b/yjit_codegen.c
@@ -7,6 +7,7 @@
#include "internal/object.h"
#include "internal/sanitizers.h"
#include "internal/string.h"
+#include "internal/struct.h"
#include "internal/variable.h"
#include "internal/re.h"
#include "probes.h"
@@ -381,6 +382,26 @@ yjit_gen_leave_exit(codeblock_t *cb)
return code_ptr;
}
+// Fill code_for_exit_from_stub. This is used by branch_stub_hit() to exit
+// to the interpreter when it cannot service a stub by generating new code.
+// Before coming here, branch_stub_hit() takes care of fully reconstructing
+// interpreter state.
+static void
+gen_code_for_exit_from_stub(void)
+{
+ codeblock_t *cb = ocb;
+ code_for_exit_from_stub = cb_get_ptr(cb, cb->write_pos);
+
+ GEN_COUNTER_INC(cb, exit_from_branch_stub);
+
+ pop(cb, REG_SP);
+ pop(cb, REG_EC);
+ pop(cb, REG_CFP);
+
+ mov(cb, RAX, imm_opnd(Qundef));
+ ret(cb);
+}
+
// :side-exit:
// Get an exit for the current instruction in the outlined block. The code
// for each instruction often begins with several guards before proceeding
@@ -405,6 +426,26 @@ yjit_side_exit(jitstate_t *jit, ctx_t *ctx)
return jit->side_exit_for_pc;
}
+// Ensure that there is an exit for the start of the block being compiled.
+// Block invalidation uses this exit.
+static void
+jit_ensure_block_entry_exit(jitstate_t *jit)
+{
+ block_t *block = jit->block;
+ if (block->entry_exit) return;
+
+ if (jit->insn_idx == block->blockid.idx) {
+ // We are compiling the first instruction in the block.
+ // Generate the exit with the cache in jitstate.
+ block->entry_exit = yjit_side_exit(jit, &block->ctx);
+ }
+ else {
+ VALUE *pc = yjit_iseq_pc_at_idx(block->blockid.iseq, block->blockid.idx);
+ uint32_t pos = yjit_gen_exit(pc, &block->ctx, ocb);
+ block->entry_exit = cb_get_ptr(ocb, pos);
+ }
+}
+
// Generate a runtime guard that ensures the PC is at the start of the iseq,
// otherwise take a side exit. This is to handle the situation of optional
// parameters. When a function with optional parameters is called, the entry
@@ -504,11 +545,16 @@ yjit_entry_prologue(codeblock_t *cb, const rb_iseq_t *iseq)
{
RUBY_ASSERT(cb != NULL);
- if (cb->write_pos + 1024 >= cb->mem_size) {
- rb_bug("out of executable memory");
+ enum { MAX_PROLOGUE_SIZE = 1024 };
+
+ // Check if we have enough executable memory
+ if (cb->write_pos + MAX_PROLOGUE_SIZE >= cb->mem_size) {
+ return NULL;
}
- // Align the current write positon to cache line boundaries
+ const uint32_t old_write_pos = cb->write_pos;
+
+ // Align the current write position to cache line boundaries
cb_align_pos(cb, 64);
uint8_t *code_ptr = cb_get_ptr(cb, cb->write_pos);
@@ -540,6 +586,9 @@ yjit_entry_prologue(codeblock_t *cb, const rb_iseq_t *iseq)
yjit_pc_guard(cb, iseq);
}
+ // Verify MAX_PROLOGUE_SIZE
+ RUBY_ASSERT_ALWAYS(cb->write_pos - old_write_pos <= MAX_PROLOGUE_SIZE);
+
return code_ptr;
}
@@ -584,32 +633,38 @@ jit_jump_to_next_insn(jitstate_t *jit, const ctx_t *current_context)
);
}
-// Compile a sequence of bytecode instructions for a given basic block version
-static void
-yjit_gen_block(block_t *block, rb_execution_context_t *ec)
+// Compile a sequence of bytecode instructions for a given basic block version.
+// Part of gen_block_version().
+static block_t *
+gen_single_block(blockid_t blockid, const ctx_t *start_ctx, rb_execution_context_t *ec)
{
RUBY_ASSERT(cb != NULL);
- RUBY_ASSERT(block != NULL);
- RUBY_ASSERT(!(block->blockid.idx == 0 && block->ctx.stack_size > 0));
+ verify_blockid(blockid);
+
+ // Allocate the new block
+ block_t *block = calloc(1, sizeof(block_t));
+ if (!block) {
+ return NULL;
+ }
- // Copy the block's context to avoid mutating it
- ctx_t ctx_copy = block->ctx;
+ // Copy the starting context to avoid mutating it
+ ctx_t ctx_copy = *start_ctx;
ctx_t *ctx = &ctx_copy;
+ // Limit the number of specialized versions for this block
+ *ctx = limit_block_versions(blockid, ctx);
+
+ // Save the starting context on the block.
+ block->blockid = blockid;
+ block->ctx = *ctx;
+
+ RUBY_ASSERT(!(blockid.idx == 0 && start_ctx->stack_size > 0));
+
const rb_iseq_t *iseq = block->blockid.iseq;
+ const unsigned int iseq_size = iseq->body->iseq_size;
uint32_t insn_idx = block->blockid.idx;
const uint32_t starting_insn_idx = insn_idx;
- // NOTE: if we are ever deployed in production, we
- // should probably just log an error and return NULL here,
- // so we can fail more gracefully
- if (cb->write_pos + 1024 >= cb->mem_size) {
- rb_bug("out of executable memory");
- }
- if (ocb->write_pos + 1024 >= ocb->mem_size) {
- rb_bug("out of executable memory (outlined block)");
- }
-
// Initialize a JIT state object
jitstate_t jit = {
.cb = cb,
@@ -623,14 +678,14 @@ yjit_gen_block(block_t *block, rb_execution_context_t *ec)
block->start_addr = cb_get_write_ptr(cb);
// For each instruction to compile
- for (;;) {
+ while (insn_idx < iseq_size) {
// Get the current pc and opcode
VALUE *pc = yjit_iseq_pc_at_idx(iseq, insn_idx);
int opcode = yjit_opcode_at_pc(iseq, pc);
RUBY_ASSERT(opcode >= 0 && opcode < VM_INSTRUCTION_SIZE);
// opt_getinlinecache wants to be in a block all on its own. Cut the block short
- // if we run into it. See gen_opt_getinlinecache for details.
+ // if we run into it. See gen_opt_getinlinecache() for details.
if (opcode == BIN(opt_getinlinecache) && insn_idx > starting_insn_idx) {
jit_jump_to_next_insn(&jit, ctx);
break;
@@ -657,32 +712,24 @@ yjit_gen_block(block_t *block, rb_execution_context_t *ec)
// Lookup the codegen function for this instruction
codegen_fn gen_fn = gen_fns[opcode];
- if (!gen_fn) {
- // If we reach an unknown instruction,
- // exit to the interpreter and stop compiling
- yjit_gen_exit(jit.pc, ctx, cb);
- break;
- }
-
- if (0) {
- fprintf(stderr, "compiling %d: %s\n", insn_idx, insn_name(opcode));
- print_str(cb, insn_name(opcode));
- }
-
- // :count-placement:
- // Count bytecode instructions that execute in generated code.
- // Note that the increment happens even when the output takes side exit.
- GEN_COUNTER_INC(cb, exec_instruction);
+ codegen_status_t status = YJIT_CANT_COMPILE;
+ if (gen_fn) {
+ if (0) {
+ fprintf(stderr, "compiling %d: %s\n", insn_idx, insn_name(opcode));
+ print_str(cb, insn_name(opcode));
+ }
- // Add a comment for the name of the YARV instruction
- ADD_COMMENT(cb, insn_name(opcode));
+ // :count-placement:
+ // Count bytecode instructions that execute in generated code.
+ // Note that the increment happens even when the output takes side exit.
+ GEN_COUNTER_INC(cb, exec_instruction);
- // Call the code generation function
- codegen_status_t status = gen_fn(&jit, ctx, cb);
+ // Add a comment for the name of the YARV instruction
+ ADD_COMMENT(cb, insn_name(opcode));
- // For now, reset the chain depth after each instruction as only the
- // first instruction in the block can concern itself with the depth.
- ctx->chain_depth = 0;
+ // Call the code generation function
+ status = gen_fn(&jit, ctx, cb);
+ }
// If we can't compile this instruction
// exit to the interpreter and stop compiling
@@ -690,10 +737,20 @@ yjit_gen_block(block_t *block, rb_execution_context_t *ec)
// TODO: if the codegen function makes changes to ctx and then return YJIT_CANT_COMPILE,
// the exit this generates would be wrong. We could save a copy of the entry context
// and assert that ctx is the same here.
- yjit_gen_exit(jit.pc, ctx, cb);
+ uint32_t exit_off = yjit_gen_exit(jit.pc, ctx, cb);
+
+ // If this is the first instruction in the block, then we can use
+ // the exit for block->entry_exit.
+ if (insn_idx == block->blockid.idx) {
+ block->entry_exit = cb_get_ptr(cb, exit_off);
+ }
break;
}
+ // For now, reset the chain depth after each instruction as only the
+ // first instruction in the block can concern itself with the depth.
+ ctx->chain_depth = 0;
+
// Move to the next instruction to compile
insn_idx += insn_len(opcode);
@@ -713,6 +770,12 @@ yjit_gen_block(block_t *block, rb_execution_context_t *ec)
// doesn't go to the next instruction.
RUBY_ASSERT(!jit.record_boundary_patch_point);
+ // If code for the block doesn't fit, free the block and fail.
+ if (cb->dropped_bytes || ocb->dropped_bytes) {
+ yjit_free_block(block);
+ return NULL;
+ }
+
if (YJIT_DUMP_MODE >= 2) {
// Dump list of compiled instrutions
fprintf(stderr, "Compiled the following for iseq=%p:\n", (void *)iseq);
@@ -722,6 +785,8 @@ yjit_gen_block(block_t *block, rb_execution_context_t *ec)
idx += insn_len(opcode);
}
}
+
+ return block;
}
static codegen_status_t gen_opt_send_without_block(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb);
@@ -1116,56 +1181,55 @@ gen_newhash(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
return YJIT_KEEP_COMPILING;
}
-static codegen_status_t
-gen_putnil(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
+// Push a constant value to the stack, including type information.
+// The constant may be a heap object or a special constant.
+static void
+jit_putobject(jitstate_t *jit, ctx_t *ctx, VALUE arg)
{
- // Write constant at SP
- x86opnd_t stack_top = ctx_stack_push(ctx, TYPE_NIL);
- mov(cb, stack_top, imm_opnd(Qnil));
- return YJIT_KEEP_COMPILING;
-}
+ val_type_t val_type = yjit_type_of_value(arg);
+ x86opnd_t stack_top = ctx_stack_push(ctx, val_type);
-static codegen_status_t
-gen_putobject(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
-{
- VALUE arg = jit_get_arg(jit, 0);
+ if (SPECIAL_CONST_P(arg)) {
+ // Immediates will not move and do not need to be tracked for GC
+ // Thanks to this we can mov directly to memory when possible.
- if (FIXNUM_P(arg))
- {
- // Keep track of the fixnum type tag
- x86opnd_t stack_top = ctx_stack_push(ctx, TYPE_FIXNUM);
+ // NOTE: VALUE -> int64_t cast below is implementation defined.
+ // Hopefully it preserves the the bit pattern or raise a signal.
+ // See N1256 section 6.3.1.3.
x86opnd_t imm = imm_opnd((int64_t)arg);
// 64-bit immediates can't be directly written to memory
- if (imm.num_bits <= 32)
- {
+ if (imm.num_bits <= 32) {
mov(cb, stack_top, imm);
}
- else
- {
+ else {
mov(cb, REG0, imm);
mov(cb, stack_top, REG0);
}
}
- else if (arg == Qtrue || arg == Qfalse)
- {
- x86opnd_t stack_top = ctx_stack_push(ctx, TYPE_IMM);
- mov(cb, stack_top, imm_opnd((int64_t)arg));
- }
- else
- {
+ else {
// Load the value to push into REG0
// Note that this value may get moved by the GC
- VALUE put_val = jit_get_arg(jit, 0);
- jit_mov_gc_ptr(jit, cb, REG0, put_val);
-
- val_type_t val_type = yjit_type_of_value(put_val);
+ jit_mov_gc_ptr(jit, cb, REG0, arg);
// Write argument at SP
- x86opnd_t stack_top = ctx_stack_push(ctx, val_type);
mov(cb, stack_top, REG0);
}
+}
+static codegen_status_t
+gen_putnil(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
+{
+ jit_putobject(jit, ctx, Qnil);
+ return YJIT_KEEP_COMPILING;
+}
+
+static codegen_status_t
+gen_putobject(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
+{
+ VALUE arg = jit_get_arg(jit, 0);
+
+ jit_putobject(jit, ctx, arg);
return YJIT_KEEP_COMPILING;
}
@@ -1193,10 +1257,7 @@ gen_putobject_int2fix(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
int opcode = jit_get_opcode(jit);
int cst_val = (opcode == BIN(putobject_INT2FIX_0_))? 0:1;
- // Write constant at SP
- x86opnd_t stack_top = ctx_stack_push(ctx, TYPE_FIXNUM);
- mov(cb, stack_top, imm_opnd(INT2FIX(cst_val)));
-
+ jit_putobject(jit, ctx, INT2FIX(cst_val));
return YJIT_KEEP_COMPILING;
}
@@ -1338,7 +1399,7 @@ gen_setlocal_wc0(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
x86opnd_t flags_opnd = mem_opnd(64, REG0, sizeof(VALUE) * VM_ENV_DATA_INDEX_FLAGS);
test(cb, flags_opnd, imm_opnd(VM_ENV_FLAG_WB_REQUIRED));
- // Create a size-exit to fall back to the interpreter
+ // Create a side-exit to fall back to the interpreter
uint8_t *side_exit = yjit_side_exit(jit, ctx);
// if (flags & VM_ENV_FLAG_WB_REQUIRED) != 0
@@ -1408,7 +1469,7 @@ gen_setlocal_generic(jitstate_t *jit, ctx_t *ctx, uint32_t local_idx, uint32_t l
x86opnd_t flags_opnd = mem_opnd(64, REG0, sizeof(VALUE) * VM_ENV_DATA_INDEX_FLAGS);
test(cb, flags_opnd, imm_opnd(VM_ENV_FLAG_WB_REQUIRED));
- // Create a size-exit to fall back to the interpreter
+ // Create a side-exit to fall back to the interpreter
uint8_t *side_exit = yjit_side_exit(jit, ctx);
// if (flags & VM_ENV_FLAG_WB_REQUIRED) != 0
@@ -1672,7 +1733,7 @@ gen_get_ivar(jitstate_t *jit, ctx_t *ctx, const int max_chain_depth, VALUE compt
ADD_COMMENT(cb, "guard embedded getivar");
x86opnd_t flags_opnd = member_opnd(REG0, struct RBasic, flags);
test(cb, flags_opnd, imm_opnd(ROBJECT_EMBED));
- jit_chain_guard(JCC_JZ, jit, &starting_context, max_chain_depth, side_exit);
+ jit_chain_guard(JCC_JZ, jit, &starting_context, max_chain_depth, COUNTED_EXIT(jit, side_exit, getivar_megamorphic));
// Load the variable
x86opnd_t ivar_opnd = mem_opnd(64, REG0, offsetof(struct RObject, as.ary) + ivar_index * SIZEOF_VALUE);
@@ -1695,7 +1756,7 @@ gen_get_ivar(jitstate_t *jit, ctx_t *ctx, const int max_chain_depth, VALUE compt
ADD_COMMENT(cb, "guard extended getivar");
x86opnd_t flags_opnd = member_opnd(REG0, struct RBasic, flags);
test(cb, flags_opnd, imm_opnd(ROBJECT_EMBED));
- jit_chain_guard(JCC_JNZ, jit, &starting_context, max_chain_depth, side_exit);
+ jit_chain_guard(JCC_JNZ, jit, &starting_context, max_chain_depth, COUNTED_EXIT(jit, side_exit, getivar_megamorphic));
// check that the extended table is big enough
if (ivar_index >= ROBJECT_EMBED_LEN_MAX + 1) {
@@ -1967,11 +2028,11 @@ gen_fixnum_cmp(jitstate_t *jit, ctx_t *ctx, cmov_fn cmov_op)
VALUE comptime_b = jit_peek_at_stack(jit, ctx, 0);
if (FIXNUM_P(comptime_a) && FIXNUM_P(comptime_b)) {
- // Create a size-exit to fall back to the interpreter
+ // Create a side-exit to fall back to the interpreter
// Note: we generate the side-exit before popping operands from the stack
uint8_t *side_exit = yjit_side_exit(jit, ctx);
- if (!assume_bop_not_redefined(jit->block, INTEGER_REDEFINED_OP_FLAG, BOP_LT)) {
+ if (!assume_bop_not_redefined(jit, INTEGER_REDEFINED_OP_FLAG, BOP_LT)) {
return YJIT_CANT_COMPILE;
}
@@ -2036,7 +2097,7 @@ gen_equality_specialized(jitstate_t *jit, ctx_t *ctx, uint8_t *side_exit)
x86opnd_t b_opnd = ctx_stack_opnd(ctx, 0);
if (FIXNUM_P(comptime_a) && FIXNUM_P(comptime_b)) {
- if (!assume_bop_not_redefined(jit->block, INTEGER_REDEFINED_OP_FLAG, BOP_EQ)) {
+ if (!assume_bop_not_redefined(jit, INTEGER_REDEFINED_OP_FLAG, BOP_EQ)) {
// if overridden, emit the generic version
return false;
}
@@ -2059,7 +2120,7 @@ gen_equality_specialized(jitstate_t *jit, ctx_t *ctx, uint8_t *side_exit)
}
else if (CLASS_OF(comptime_a) == rb_cString &&
CLASS_OF(comptime_b) == rb_cString) {
- if (!assume_bop_not_redefined(jit->block, STRING_REDEFINED_OP_FLAG, BOP_EQ)) {
+ if (!assume_bop_not_redefined(jit, STRING_REDEFINED_OP_FLAG, BOP_EQ)) {
// if overridden, emit the generic version
return false;
}
@@ -2112,7 +2173,7 @@ gen_opt_eq(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
return YJIT_END_BLOCK;
}
- // Create a size-exit to fall back to the interpreter
+ // Create a side-exit to fall back to the interpreter
uint8_t *side_exit = yjit_side_exit(jit, ctx);
if (gen_equality_specialized(jit, ctx, side_exit)) {
@@ -2160,11 +2221,11 @@ gen_opt_aref(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
VALUE comptime_idx = jit_peek_at_stack(jit, ctx, 0);
VALUE comptime_recv = jit_peek_at_stack(jit, ctx, 1);
- // Create a size-exit to fall back to the interpreter
+ // Create a side-exit to fall back to the interpreter
uint8_t *side_exit = yjit_side_exit(jit, ctx);
if (CLASS_OF(comptime_recv) == rb_cArray && RB_FIXNUM_P(comptime_idx)) {
- if (!assume_bop_not_redefined(jit->block, ARRAY_REDEFINED_OP_FLAG, BOP_AREF)) {
+ if (!assume_bop_not_redefined(jit, ARRAY_REDEFINED_OP_FLAG, BOP_AREF)) {
return YJIT_CANT_COMPILE;
}
@@ -2212,7 +2273,7 @@ gen_opt_aref(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
return YJIT_END_BLOCK;
}
else if (CLASS_OF(comptime_recv) == rb_cHash) {
- if (!assume_bop_not_redefined(jit->block, HASH_REDEFINED_OP_FLAG, BOP_AREF)) {
+ if (!assume_bop_not_redefined(jit, HASH_REDEFINED_OP_FLAG, BOP_AREF)) {
return YJIT_CANT_COMPILE;
}
@@ -2343,11 +2404,11 @@ gen_opt_and(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
VALUE comptime_b = jit_peek_at_stack(jit, ctx, 0);
if (FIXNUM_P(comptime_a) && FIXNUM_P(comptime_b)) {
- // Create a size-exit to fall back to the interpreter
+ // Create a side-exit to fall back to the interpreter
// Note: we generate the side-exit before popping operands from the stack
uint8_t *side_exit = yjit_side_exit(jit, ctx);
- if (!assume_bop_not_redefined(jit->block, INTEGER_REDEFINED_OP_FLAG, BOP_AND)) {
+ if (!assume_bop_not_redefined(jit, INTEGER_REDEFINED_OP_FLAG, BOP_AND)) {
return YJIT_CANT_COMPILE;
}
@@ -2387,11 +2448,11 @@ gen_opt_or(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
VALUE comptime_b = jit_peek_at_stack(jit, ctx, 0);
if (FIXNUM_P(comptime_a) && FIXNUM_P(comptime_b)) {
- // Create a size-exit to fall back to the interpreter
+ // Create a side-exit to fall back to the interpreter
// Note: we generate the side-exit before popping operands from the stack
uint8_t *side_exit = yjit_side_exit(jit, ctx);
- if (!assume_bop_not_redefined(jit->block, INTEGER_REDEFINED_OP_FLAG, BOP_OR)) {
+ if (!assume_bop_not_redefined(jit, INTEGER_REDEFINED_OP_FLAG, BOP_OR)) {
return YJIT_CANT_COMPILE;
}
@@ -2431,11 +2492,11 @@ gen_opt_minus(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
VALUE comptime_b = jit_peek_at_stack(jit, ctx, 0);
if (FIXNUM_P(comptime_a) && FIXNUM_P(comptime_b)) {
- // Create a size-exit to fall back to the interpreter
+ // Create a side-exit to fall back to the interpreter
// Note: we generate the side-exit before popping operands from the stack
uint8_t *side_exit = yjit_side_exit(jit, ctx);
- if (!assume_bop_not_redefined(jit->block, INTEGER_REDEFINED_OP_FLAG, BOP_MINUS)) {
+ if (!assume_bop_not_redefined(jit, INTEGER_REDEFINED_OP_FLAG, BOP_MINUS)) {
return YJIT_CANT_COMPILE;
}
@@ -2477,11 +2538,11 @@ gen_opt_plus(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
VALUE comptime_b = jit_peek_at_stack(jit, ctx, 0);
if (FIXNUM_P(comptime_a) && FIXNUM_P(comptime_b)) {
- // Create a size-exit to fall back to the interpreter
+ // Create a side-exit to fall back to the interpreter
// Note: we generate the side-exit before popping operands from the stack
uint8_t *side_exit = yjit_side_exit(jit, ctx);
- if (!assume_bop_not_redefined(jit->block, INTEGER_REDEFINED_OP_FLAG, BOP_PLUS)) {
+ if (!assume_bop_not_redefined(jit, INTEGER_REDEFINED_OP_FLAG, BOP_PLUS)) {
return YJIT_CANT_COMPILE;
}
@@ -2579,7 +2640,7 @@ gen_opt_empty_p(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
static codegen_status_t
gen_opt_str_freeze(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
{
- if (!assume_bop_not_redefined(jit->block, STRING_REDEFINED_OP_FLAG, BOP_FREEZE)) {
+ if (!assume_bop_not_redefined(jit, STRING_REDEFINED_OP_FLAG, BOP_FREEZE)) {
return YJIT_CANT_COMPILE;
}
@@ -2596,7 +2657,7 @@ gen_opt_str_freeze(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
static codegen_status_t
gen_opt_str_uminus(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
{
- if (!assume_bop_not_redefined(jit->block, STRING_REDEFINED_OP_FLAG, BOP_UMINUS)) {
+ if (!assume_bop_not_redefined(jit, STRING_REDEFINED_OP_FLAG, BOP_UMINUS)) {
return YJIT_CANT_COMPILE;
}
@@ -3223,7 +3284,7 @@ gen_send_cfunc(jitstate_t *jit, ctx_t *ctx, const struct rb_callinfo *ci, const
//print_str(cb, "recv");
//print_ptr(cb, recv);
- // Create a size-exit to fall back to the interpreter
+ // Create a side-exit to fall back to the interpreter
uint8_t *side_exit = yjit_side_exit(jit, ctx);
// Check for interrupts
@@ -3595,7 +3656,7 @@ gen_send_iseq(jitstate_t *jit, ctx_t *ctx, const struct rb_callinfo *ci, const r
// Number of locals that are not parameters
const int num_locals = iseq->body->local_table_size - num_params;
- // Create a size-exit to fall back to the interpreter
+ // Create a side-exit to fall back to the interpreter
uint8_t *side_exit = yjit_side_exit(jit, ctx);
// Check for interrupts
@@ -3879,6 +3940,83 @@ gen_send_iseq(jitstate_t *jit, ctx_t *ctx, const struct rb_callinfo *ci, const r
return YJIT_END_BLOCK;
}
+static codegen_status_t
+gen_struct_aref(jitstate_t *jit, ctx_t *ctx, const struct rb_callinfo *ci, const rb_callable_method_entry_t *cme, VALUE comptime_recv, VALUE comptime_recv_klass) {
+ if (vm_ci_argc(ci) != 0) {
+ return YJIT_CANT_COMPILE;
+ }
+
+ const unsigned int off = cme->def->body.optimized.index;
+
+ // Confidence checks
+ RUBY_ASSERT_ALWAYS(RB_TYPE_P(comptime_recv, T_STRUCT));
+ RUBY_ASSERT_ALWAYS((long)off < RSTRUCT_LEN(comptime_recv));
+
+ // We are going to use an encoding that takes a 4-byte immediate which
+ // limits the offset to INT32_MAX.
+ {
+ uint64_t native_off = (uint64_t)off * (uint64_t)SIZEOF_VALUE;
+ if (native_off > (uint64_t)INT32_MAX) {
+ return YJIT_CANT_COMPILE;
+ }
+ }
+
+ // All structs from the same Struct class should have the same
+ // length. So if our comptime_recv is embedded all runtime
+ // structs of the same class should be as well, and the same is
+ // true of the converse.
+ bool embedded = FL_TEST_RAW(comptime_recv, RSTRUCT_EMBED_LEN_MASK);
+
+ ADD_COMMENT(cb, "struct aref");
+
+ x86opnd_t recv = ctx_stack_pop(ctx, 1);
+
+ mov(cb, REG0, recv);
+
+ if (embedded) {
+ mov(cb, REG0, member_opnd_idx(REG0, struct RStruct, as.ary, off));
+ }
+ else {
+ mov(cb, REG0, member_opnd(REG0, struct RStruct, as.heap.ptr));
+ mov(cb, REG0, mem_opnd(64, REG0, SIZEOF_VALUE * off));
+ }
+
+ x86opnd_t ret = ctx_stack_push(ctx, TYPE_UNKNOWN);
+ mov(cb, ret, REG0);
+
+ jit_jump_to_next_insn(jit, ctx);
+ return YJIT_END_BLOCK;
+}
+
+static codegen_status_t
+gen_struct_aset(jitstate_t *jit, ctx_t *ctx, const struct rb_callinfo *ci, const rb_callable_method_entry_t *cme, VALUE comptime_recv, VALUE comptime_recv_klass) {
+ if (vm_ci_argc(ci) != 1) {
+ return YJIT_CANT_COMPILE;
+ }
+
+ const unsigned int off = cme->def->body.optimized.index;
+
+ // Confidence checks
+ RUBY_ASSERT_ALWAYS(RB_TYPE_P(comptime_recv, T_STRUCT));
+ RUBY_ASSERT_ALWAYS((long)off < RSTRUCT_LEN(comptime_recv));
+
+ ADD_COMMENT(cb, "struct aset");
+
+ x86opnd_t val = ctx_stack_pop(ctx, 1);
+ x86opnd_t recv = ctx_stack_pop(ctx, 1);
+
+ mov(cb, C_ARG_REGS[0], recv);
+ mov(cb, C_ARG_REGS[1], imm_opnd(off));
+ mov(cb, C_ARG_REGS[2], val);
+ call_ptr(cb, REG0, (void *)RSTRUCT_SET);
+
+ x86opnd_t ret = ctx_stack_push(ctx, TYPE_UNKNOWN);
+ mov(cb, ret, RAX);
+
+ jit_jump_to_next_insn(jit, ctx);
+ return YJIT_END_BLOCK;
+}
+
const rb_callable_method_entry_t *
rb_aliased_callable_method_entry(const rb_callable_method_entry_t *me);
@@ -3965,7 +4103,7 @@ gen_send_general(jitstate_t *jit, ctx_t *ctx, struct rb_call_data *cd, rb_iseq_t
// Register block for invalidation
RUBY_ASSERT(cme->called_id == mid);
- assume_method_lookup_stable(comptime_recv_klass, cme, jit->block);
+ assume_method_lookup_stable(comptime_recv_klass, cme, jit);
// To handle the aliased method case (VM_METHOD_TYPE_ALIAS)
while (true) {
@@ -4042,8 +4180,24 @@ gen_send_general(jitstate_t *jit, ctx_t *ctx, struct rb_call_data *cd, rb_iseq_t
return YJIT_CANT_COMPILE;
// Send family of methods, e.g. call/apply
case VM_METHOD_TYPE_OPTIMIZED:
- GEN_COUNTER_INC(cb, send_optimized_method);
- return YJIT_CANT_COMPILE;
+ switch (cme->def->body.optimized.type) {
+ case OPTIMIZED_METHOD_TYPE_SEND:
+ GEN_COUNTER_INC(cb, send_optimized_method_send);
+ return YJIT_CANT_COMPILE;
+ case OPTIMIZED_METHOD_TYPE_CALL:
+ GEN_COUNTER_INC(cb, send_optimized_method_call);
+ return YJIT_CANT_COMPILE;
+ case OPTIMIZED_METHOD_TYPE_BLOCK_CALL:
+ GEN_COUNTER_INC(cb, send_optimized_method_block_call);
+ return YJIT_CANT_COMPILE;
+ case OPTIMIZED_METHOD_TYPE_STRUCT_AREF:
+ return gen_struct_aref(jit, ctx, ci, cme, comptime_recv, comptime_recv_klass);
+ case OPTIMIZED_METHOD_TYPE_STRUCT_ASET:
+ return gen_struct_aset(jit, ctx, ci, cme, comptime_recv, comptime_recv_klass);
+ default:
+ rb_bug("unknown optimized method type (%d)", cme->def->body.optimized.type);
+ UNREACHABLE_RETURN(YJIT_CANT_COMPILE);
+ }
case VM_METHOD_TYPE_MISSING:
GEN_COUNTER_INC(cb, send_missing_method);
return YJIT_CANT_COMPILE;
@@ -4191,8 +4345,8 @@ gen_invokesuper(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
// We need to assume that both our current method entry and the super
// method entry we invoke remain stable
- assume_method_lookup_stable(current_defined_class, me, jit->block);
- assume_method_lookup_stable(comptime_superclass, cme, jit->block);
+ assume_method_lookup_stable(current_defined_class, me, jit);
+ assume_method_lookup_stable(comptime_superclass, cme, jit);
// Method calls may corrupt types
ctx_clear_local_types(ctx);
@@ -4215,7 +4369,7 @@ gen_leave(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
// Only the return value should be on the stack
RUBY_ASSERT(ctx->stack_size == 1);
- // Create a size-exit to fall back to the interpreter
+ // Create a side-exit to fall back to the interpreter
uint8_t *side_exit = yjit_side_exit(jit, ctx);
// Load environment pointer EP from CFP
@@ -4325,7 +4479,8 @@ gen_objtostring(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
jit_guard_known_klass(jit, ctx, CLASS_OF(comptime_recv), OPND_STACK(0), comptime_recv, SEND_MAX_DEPTH, side_exit);
// No work needed. The string value is already on the top of the stack.
return YJIT_KEEP_COMPILING;
- } else {
+ }
+ else {
struct rb_call_data *cd = (struct rb_call_data *)jit_get_arg(jit, 0);
return gen_send_general(jit, ctx, cd, NULL);
}
@@ -4466,6 +4621,26 @@ gen_getclassvariable(jitstate_t* jit, ctx_t* ctx, codeblock_t* cb)
return YJIT_KEEP_COMPILING;
}
+VALUE
+rb_vm_setclassvariable(const rb_iseq_t *iseq, const rb_control_frame_t *cfp, ID id, VALUE val, ICVARC ic);
+
+static codegen_status_t
+gen_setclassvariable(jitstate_t* jit, ctx_t* ctx, codeblock_t* cb)
+{
+ // rb_vm_setclassvariable can raise exceptions.
+ jit_prepare_routine_call(jit, ctx, REG0);
+
+ mov(cb, C_ARG_REGS[0], member_opnd(REG_CFP, rb_control_frame_t, iseq));
+ mov(cb, C_ARG_REGS[1], REG_CFP);
+ mov(cb, C_ARG_REGS[2], imm_opnd(jit_get_arg(jit, 0)));
+ mov(cb, C_ARG_REGS[3], ctx_stack_pop(ctx, 1));
+ mov(cb, C_ARG_REGS[4], imm_opnd(jit_get_arg(jit, 1)));
+
+ call_ptr(cb, REG0, (void *)rb_vm_setclassvariable);
+
+ return YJIT_KEEP_COMPILING;
+}
+
static codegen_status_t
gen_opt_getinlinecache(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
{
@@ -4482,6 +4657,10 @@ gen_opt_getinlinecache(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
return YJIT_CANT_COMPILE;
}
+ // Make sure there is an exit for this block as the interpreter might want
+ // to invalidate this block from yjit_constant_ic_update().
+ jit_ensure_block_entry_exit(jit);
+
if (ice->ic_cref) {
// Cache is keyed on a certain lexical scope. Use the interpreter's cache.
uint8_t *side_exit = yjit_side_exit(jit, ctx);
@@ -4506,16 +4685,13 @@ gen_opt_getinlinecache(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb)
else {
// Optimize for single ractor mode.
// FIXME: This leaks when st_insert raises NoMemoryError
- if (!assume_single_ractor_mode(jit->block)) return YJIT_CANT_COMPILE;
+ if (!assume_single_ractor_mode(jit)) return YJIT_CANT_COMPILE;
// Invalidate output code on any and all constant writes
// FIXME: This leaks when st_insert raises NoMemoryError
- assume_stable_global_constant_state(jit->block);
+ assume_stable_global_constant_state(jit);
- val_type_t type = yjit_type_of_value(ice->value);
- x86opnd_t stack_top = ctx_stack_push(ctx, type);
- jit_mov_gc_ptr(jit, cb, REG0, ice->value);
- mov(cb, stack_top, REG0);
+ jit_putobject(jit, ctx, ice->value);
}
// Jump over the code for filling the cache
@@ -4698,6 +4874,8 @@ rb_yjit_tracing_invalidate_all(void)
RUBY_ASSERT_ALWAYS(yjit_codepage_frozen_bytes <= old_pos && "frozen bytes should increase monotonically");
yjit_codepage_frozen_bytes = old_pos;
+ cb_mark_all_executable(ocb);
+ cb_mark_all_executable(cb);
RB_VM_LOCK_LEAVE();
}
@@ -4779,6 +4957,7 @@ yjit_init_codegen(void)
// Generate full exit code for C func
gen_full_cfunc_return();
+ cb_mark_all_executable(cb);
// Map YARV opcodes to the corresponding codegen functions
yjit_reg_op(BIN(nop), gen_nop);
@@ -4860,6 +5039,7 @@ yjit_init_codegen(void)
yjit_reg_op(BIN(toregexp), gen_toregexp);
yjit_reg_op(BIN(getspecial), gen_getspecial);
yjit_reg_op(BIN(getclassvariable), gen_getclassvariable);
+ yjit_reg_op(BIN(setclassvariable), gen_setclassvariable);
yjit_method_codegen_table = st_init_numtable();
diff --git a/yjit_codegen.h b/yjit_codegen.h
index 1e87c853932d9c..e3b971af3fcfd1 100644
--- a/yjit_codegen.h
+++ b/yjit_codegen.h
@@ -10,9 +10,13 @@ typedef enum codegen_status {
// Code generation function signature
typedef codegen_status_t (*codegen_fn)(jitstate_t *jit, ctx_t *ctx, codeblock_t *cb);
+static void jit_ensure_block_entry_exit(jitstate_t *jit);
+
static uint8_t *yjit_entry_prologue(codeblock_t *cb, const rb_iseq_t *iseq);
-static void yjit_gen_block(block_t *block, rb_execution_context_t *ec);
+static block_t *gen_single_block(blockid_t blockid, const ctx_t *start_ctx, rb_execution_context_t *ec);
+
+static void gen_code_for_exit_from_stub(void);
static void yjit_init_codegen(void);
diff --git a/yjit_core.c b/yjit_core.c
index a395285e1cf2e1..d420f0fcab3048 100644
--- a/yjit_core.c
+++ b/yjit_core.c
@@ -9,6 +9,10 @@
#include "yjit_core.h"
#include "yjit_codegen.h"
+// For exiting from YJIT frame from branch_stub_hit().
+// Filled by gen_code_for_exit_from_stub().
+static uint8_t *code_for_exit_from_stub = NULL;
+
/*
Get an operand for the adjusted stack pointer address
*/
@@ -538,9 +542,10 @@ static size_t get_num_versions(blockid_t blockid)
// Keep track of a block version. Block should be fully constructed.
static void
-add_block_version(blockid_t blockid, block_t *block)
+add_block_version(block_t *block)
{
- const rb_iseq_t *iseq = block->blockid.iseq;
+ const blockid_t blockid = block->blockid;
+ const rb_iseq_t *iseq = blockid.iseq;
struct rb_iseq_constant_body *body = iseq->body;
// Function entry blocks must have stack size 0
@@ -597,6 +602,52 @@ add_block_version(blockid_t blockid, block_t *block)
#endif
}
+static ptrdiff_t
+branch_code_size(const branch_t *branch)
+{
+ return branch->end_addr - branch->start_addr;
+}
+
+// Generate code for a branch, possibly rewriting and changing the size of it
+static void
+regenerate_branch(codeblock_t *cb, branch_t *branch)
+{
+ if (branch->start_addr < cb_get_ptr(cb, yjit_codepage_frozen_bytes)) {
+ // Generating this branch would modify frozen bytes. Do nothing.
+ return;
+ }
+
+ const uint32_t old_write_pos = cb->write_pos;
+ const bool branch_terminates_block = branch->end_addr == branch->block->end_addr;
+
+ RUBY_ASSERT(branch->dst_addrs[0] != NULL);
+
+ cb_set_write_ptr(cb, branch->start_addr);
+ branch->gen_fn(cb, branch->dst_addrs[0], branch->dst_addrs[1], branch->shape);
+ branch->end_addr = cb_get_write_ptr(cb);
+
+ if (branch_terminates_block) {
+ // Adjust block size
+ branch->block->end_addr = branch->end_addr;
+ }
+
+ // cb->write_pos is both a write cursor and a marker for the end of
+ // everything written out so far. Leave cb->write_pos at the end of the
+ // block before returning. This function only ever bump or retain the end
+ // of block marker since that's what the majority of callers want. When the
+ // branch sits at the very end of the codeblock and it shrinks after
+ // regeneration, it's up to the caller to drop bytes off the end to
+ // not leave a gap and implement branch->shape.
+ if (old_write_pos > cb->write_pos) {
+ // We rewound cb->write_pos to generate the branch, now restore it.
+ cb_set_pos(cb, old_write_pos);
+ }
+ else {
+ // The branch sits at the end of cb and consumed some memory.
+ // Keep cb->write_pos.
+ }
+}
+
// Create a new outgoing branch entry for a block
static branch_t*
make_branch_entry(block_t *block, const ctx_t *src_ctx, branchgen_fn gen_fn)
@@ -654,57 +705,66 @@ find_block_version(blockid_t blockid, const ctx_t *ctx)
// Produce a generic context when the block version limit is hit for a blockid
// Note that this will mutate the ctx argument
-static void
-limit_block_versions(blockid_t blockid, ctx_t *ctx)
+static ctx_t
+limit_block_versions(blockid_t blockid, const ctx_t *ctx)
{
// Guard chains implement limits separately, do nothing
if (ctx->chain_depth > 0)
- return;
+ return *ctx;
// If this block version we're about to add will hit the version limit
- if (get_num_versions(blockid) + 1 >= rb_yjit_opts.max_versions)
- {
+ if (get_num_versions(blockid) + 1 >= rb_yjit_opts.max_versions) {
// Produce a generic context that stores no type information,
- // but still respects the stack_size and sp_offset constraints
+ // but still respects the stack_size and sp_offset constraints.
// This new context will then match all future requests.
ctx_t generic_ctx = DEFAULT_CTX;
generic_ctx.stack_size = ctx->stack_size;
generic_ctx.sp_offset = ctx->sp_offset;
// Mutate the incoming context
- *ctx = generic_ctx;
+ return generic_ctx;
}
+
+ return *ctx;
}
-// Compile a new block version immediately
+static void yjit_free_block(block_t *block);
+
+// Immediately compile a series of block versions at a starting point and
+// return the starting block.
static block_t *
gen_block_version(blockid_t blockid, const ctx_t *start_ctx, rb_execution_context_t *ec)
{
- // Allocate a new block version object
- block_t *block = calloc(1, sizeof(block_t));
- block->blockid = blockid;
- memcpy(&block->ctx, start_ctx, sizeof(ctx_t));
-
- // Store a pointer to the first block (returned by this function)
- block_t *first_block = block;
-
- // Limit the number of specialized versions for this block
- limit_block_versions(block->blockid, &block->ctx);
+ // Small array to keep track of all the blocks compiled per invocation. We
+ // tend to have small batches since we often break up compilation with lazy
+ // stubs. Compilation is successful only if the whole batch is successful.
+ enum { MAX_PER_BATCH = 64 };
+ block_t *batch[MAX_PER_BATCH];
+ int compiled_count = 0;
+ bool batch_success = true;
+ block_t *block;
// Generate code for the first block
- yjit_gen_block(block, ec);
+ block = gen_single_block(blockid, start_ctx, ec);
+ batch_success = block && compiled_count < MAX_PER_BATCH;
+
+ if (batch_success) {
+ // Track the block
+ add_block_version(block);
- // Keep track of the new block version
- add_block_version(block->blockid, block);
+ batch[compiled_count] = block;
+ compiled_count++;
+ }
// For each successor block to compile
- for (;;) {
+ while (batch_success) {
// If the previous block compiled doesn't have outgoing branches, stop
if (rb_darray_size(block->outgoing) == 0) {
break;
}
- // Get the last outgoing branch from the previous block
+ // Get the last outgoing branch from the previous block. Blocks can use
+ // gen_direct_jump() to request a block to be placed immediately after.
branch_t *last_branch = rb_darray_back(block->outgoing);
// If there is no next block to compile, stop
@@ -716,32 +776,48 @@ gen_block_version(blockid_t blockid, const ctx_t *start_ctx, rb_execution_contex
rb_bug("invalid target for last branch");
}
- // Allocate a new block version object
- // Use the context from the branch
- block = calloc(1, sizeof(block_t));
- block->blockid = last_branch->targets[0];
- block->ctx = last_branch->target_ctxs[0];
- //memcpy(&block->ctx, ctx, sizeof(ctx_t));
+ // Generate code for the current block using context from the last branch.
+ blockid_t requested_id = last_branch->targets[0];
+ const ctx_t *requested_ctx = &last_branch->target_ctxs[0];
+ block = gen_single_block(requested_id, requested_ctx, ec);
+ batch_success = block && compiled_count < MAX_PER_BATCH;
- // Limit the number of specialized versions for this block
- limit_block_versions(block->blockid, &block->ctx);
-
- // Generate code for the current block
- yjit_gen_block(block, ec);
-
- // Keep track of the new block version
- add_block_version(block->blockid, block);
+ // If the batch failed, stop
+ if (!batch_success) {
+ break;
+ }
- // Patch the last branch address
+ // Connect the last branch and the new block
last_branch->dst_addrs[0] = block->start_addr;
rb_darray_append(&block->incoming, last_branch);
last_branch->blocks[0] = block;
// This block should immediately follow the last branch
RUBY_ASSERT(block->start_addr == last_branch->end_addr);
+
+ // Track the block
+ add_block_version(block);
+
+ batch[compiled_count] = block;
+ compiled_count++;
}
- return first_block;
+ if (batch_success) {
+ // Success. Return first block in the batch.
+ RUBY_ASSERT(compiled_count > 0);
+ return batch[0];
+ }
+ else {
+ // The batch failed. Free everything in the batch
+ for (int block_idx = 0; block_idx < compiled_count; block_idx++) {
+ yjit_free_block(batch[block_idx]);
+ }
+
+#if YJIT_STATS
+ yjit_runtime_counters.compilation_failure++;
+#endif
+ return NULL;
+ }
}
// Generate a block version that is an entry point inserted into an iseq
@@ -757,15 +833,18 @@ gen_entry_point(const rb_iseq_t *iseq, uint32_t insn_idx, rb_execution_context_t
// The entry context makes no assumptions about types
blockid_t blockid = { iseq, insn_idx };
- // Write the interpreter entry prologue
+ rb_vm_barrier();
+ // Write the interpreter entry prologue. Might be NULL when out of memory.
uint8_t *code_ptr = yjit_entry_prologue(cb, iseq);
// Try to generate code for the entry block
block_t *block = gen_block_version(blockid, &DEFAULT_CTX, ec);
+ cb_mark_all_executable(ocb);
+ cb_mark_all_executable(cb);
+
// If we couldn't generate any code
- if (block->end_idx == insn_idx)
- {
+ if (!block || block->end_idx == insn_idx) {
return NULL;
}
@@ -777,13 +856,15 @@ gen_entry_point(const rb_iseq_t *iseq, uint32_t insn_idx, rb_execution_context_t
static uint8_t *
branch_stub_hit(branch_t *branch, const uint32_t target_idx, rb_execution_context_t *ec)
{
- uint8_t *dst_addr;
+ uint8_t *dst_addr = NULL;
// Stop other ractors since we are going to patch machine code.
// This is how the GC does it.
RB_VM_LOCK_ENTER();
rb_vm_barrier();
+ const ptrdiff_t branch_size_on_entry = branch_code_size(branch);
+
RUBY_ASSERT(branch != NULL);
RUBY_ASSERT(target_idx < 2);
blockid_t target = branch->targets[target_idx];
@@ -794,18 +875,15 @@ branch_stub_hit(branch_t *branch, const uint32_t target_idx, rb_execution_contex
if (branch->blocks[target_idx]) {
dst_addr = branch->dst_addrs[target_idx];
}
- else
- {
- //fprintf(stderr, "\nstub hit, branch: %p, target idx: %d\n", branch, target_idx);
- //fprintf(stderr, "blockid.iseq=%p, blockid.idx=%d\n", target.iseq, target.idx);
- //fprintf(stderr, "chain_depth=%d\n", target_ctx->chain_depth);
+ else {
+ rb_vm_barrier();
// :stub-sp-flush:
// Generated code do stack operations without modifying cfp->sp, while the
// cfp->sp tells the GC what values on the stack to root. Generated code
// generally takes care of updating cfp->sp when it calls runtime routines that
- // could trigger GC, but for the case of branch stubs, it's inconvenient. So
- // we do it here.
+ // could trigger GC, but it's inconvenient to do it before calling this function.
+ // So we do it here instead.
VALUE *const original_interp_sp = ec->cfp->sp;
ec->cfp->sp += target_ctx->sp_offset;
@@ -818,8 +896,11 @@ branch_stub_hit(branch_t *branch, const uint32_t target_idx, rb_execution_contex
// If this block hasn't yet been compiled
if (!p_block) {
+ const uint8_t branch_old_shape = branch->shape;
+ bool branch_modified = false;
+
// If the new block can be generated right after the branch (at cb->write_pos)
- if (cb_get_write_ptr(cb) == branch->end_addr && branch->start_addr >= cb_get_ptr(cb, yjit_codepage_frozen_bytes)) {
+ if (cb_get_write_ptr(cb) == branch->end_addr) {
// This branch should be terminating its block
RUBY_ASSERT(branch->end_addr == branch->block->end_addr);
@@ -827,43 +908,65 @@ branch_stub_hit(branch_t *branch, const uint32_t target_idx, rb_execution_contex
branch->shape = (uint8_t)target_idx;
// Rewrite the branch with the new, potentially more compact shape
- cb_set_write_ptr(cb, branch->start_addr);
- branch->gen_fn(cb, branch->dst_addrs[0], branch->dst_addrs[1], branch->shape);
- RUBY_ASSERT(cb_get_write_ptr(cb) <= branch->end_addr && "can't enlarge branches");
- branch->end_addr = cb_get_write_ptr(cb);
- branch->block->end_addr = cb_get_write_ptr(cb);
+ regenerate_branch(cb, branch);
+ branch_modified = true;
+
+ // Ensure that the branch terminates the codeblock just like
+ // before entering this if block. This drops bytes off the end
+ // in case we shrank the branch when regenerating.
+ cb_set_write_ptr(cb, branch->end_addr);
}
// Compile the new block version
p_block = gen_block_version(target, target_ctx, ec);
- RUBY_ASSERT(p_block);
- RUBY_ASSERT(!(branch->shape == (uint8_t)target_idx && p_block->start_addr != branch->end_addr));
+
+ if (!p_block && branch_modified) {
+ // We couldn't generate a new block for the branch, but we modified the branch.
+ // Restore the branch by regenerating it.
+ branch->shape = branch_old_shape;
+ regenerate_branch(cb, branch);
+ }
}
- // Add this branch to the list of incoming branches for the target
- rb_darray_append(&p_block->incoming, branch);
+ if (p_block) {
+ // Branch shape should reflect layout
+ RUBY_ASSERT(!(branch->shape == (uint8_t)target_idx && p_block->start_addr != branch->end_addr));
- // Update the branch target address
- dst_addr = p_block->start_addr;
- branch->dst_addrs[target_idx] = dst_addr;
+ // Add this branch to the list of incoming branches for the target
+ rb_darray_append(&p_block->incoming, branch);
- // Rewrite the branch with the new jump target address
- if (branch->start_addr >= cb_get_ptr(cb, yjit_codepage_frozen_bytes)) {
- RUBY_ASSERT(branch->dst_addrs[0] != NULL);
- uint32_t cur_pos = cb->write_pos;
- cb_set_write_ptr(cb, branch->start_addr);
- branch->gen_fn(cb, branch->dst_addrs[0], branch->dst_addrs[1], branch->shape);
- RUBY_ASSERT(cb_get_write_ptr(cb) == branch->end_addr && "branch can't change size");
- cb_set_pos(cb, cur_pos);
- }
+ // Update the branch target address
+ dst_addr = p_block->start_addr;
+ branch->dst_addrs[target_idx] = dst_addr;
- // Mark this branch target as patched (no longer a stub)
- branch->blocks[target_idx] = p_block;
+ // Mark this branch target as patched (no longer a stub)
+ branch->blocks[target_idx] = p_block;
- // Restore interpreter sp, since the code hitting the stub expects the original.
- ec->cfp->sp = original_interp_sp;
+ // Rewrite the branch with the new jump target address
+ regenerate_branch(cb, branch);
+
+ // Restore interpreter sp, since the code hitting the stub expects the original.
+ ec->cfp->sp = original_interp_sp;
+ }
+ else {
+ // Failed to service the stub by generating a new block so now we
+ // need to exit to the interpreter at the stubbed location. We are
+ // intentionally *not* restoring original_interp_sp. At the time of
+ // writing, reconstructing interpreter state only involves setting
+ // cfp->sp and cfp->pc. We set both before trying to generate the
+ // block. All there is left to do to exit is to pop the native
+ // frame. We do that in code_for_exit_from_stub.
+ dst_addr = code_for_exit_from_stub;
+ }
+
+ cb_mark_all_executable(ocb);
+ cb_mark_all_executable(cb);
}
+ const ptrdiff_t new_branch_size = branch_code_size(branch);
+ RUBY_ASSERT_ALWAYS(new_branch_size >= 0);
+ RUBY_ASSERT_ALWAYS(new_branch_size <= branch_size_on_entry && "branch stubs should not enlarge branches");
+
RB_VM_LOCK_LEAVE();
// Return a pointer to the compiled block version
@@ -884,8 +987,7 @@ get_branch_target(
block_t *p_block = find_block_version(target, ctx);
// If the block already exists
- if (p_block)
- {
+ if (p_block) {
// Add an incoming branch for this version
rb_darray_append(&p_block->incoming, branch);
branch->blocks[target_idx] = p_block;
@@ -894,12 +996,18 @@ get_branch_target(
return p_block->start_addr;
}
+ // Do we have enough memory for a stub?
+ const long MAX_CODE_SIZE = 64;
+ if (ocb->write_pos + MAX_CODE_SIZE >= cb->mem_size) {
+ return NULL;
+ }
+
// Generate an outlined stub that will call branch_stub_hit()
uint8_t *stub_addr = cb_get_ptr(ocb, ocb->write_pos);
// Call branch_stub_hit(branch_idx, target_idx, ec)
mov(ocb, C_ARG_REGS[2], REG_EC);
- mov(ocb, C_ARG_REGS[1], imm_opnd(target_idx));
+ mov(ocb, C_ARG_REGS[1], imm_opnd(target_idx));
mov(ocb, C_ARG_REGS[0], const_ptr_opnd(branch));
call_ptr(ocb, REG0, (void *)&branch_stub_hit);
@@ -907,6 +1015,8 @@ get_branch_target(
// branch_stub_hit call
jmp_rm(ocb, RAX);
+ RUBY_ASSERT(cb_get_ptr(ocb, ocb->write_pos) - stub_addr <= MAX_CODE_SIZE);
+
return stub_addr;
}
@@ -935,8 +1045,7 @@ gen_branch(
// Call the branch generation function
branch->start_addr = cb_get_write_ptr(cb);
- gen_fn(cb, branch->dst_addrs[0], branch->dst_addrs[1], SHAPE_DEFAULT);
- branch->end_addr = cb_get_write_ptr(cb);
+ regenerate_branch(cb, branch);
}
static void
@@ -1096,14 +1205,26 @@ block_array_remove(rb_yjit_block_array_t block_array, block_t *block)
RUBY_ASSERT(false);
}
+// Some runtime checks for integrity of a program location
+static void
+verify_blockid(const blockid_t blockid)
+{
+ const rb_iseq_t *const iseq = blockid.iseq;
+ RUBY_ASSERT_ALWAYS(IMEMO_TYPE_P(iseq, imemo_iseq));
+ RUBY_ASSERT_ALWAYS(blockid.idx < iseq->body->iseq_size);
+}
+
// Invalidate one specific block version
static void
invalidate_block_version(block_t *block)
{
ASSERT_vm_locking();
+
// TODO: want to assert that all other ractors are stopped here. Can't patch
// machine code that some other thread is running.
+ verify_blockid(block->blockid);
+
const rb_iseq_t *iseq = block->blockid.iseq;
//fprintf(stderr, "invalidating block (%p, %d)\n", block->blockid.iseq, block->blockid.idx);
@@ -1116,6 +1237,29 @@ invalidate_block_version(block_t *block)
// Get a pointer to the generated code for this block
uint8_t *code_ptr = block->start_addr;
+ // Make the the start of the block do an exit. This handles OOM situations
+ // and some cases where we can't efficiently patch incoming branches.
+ // Do this first, since in case there is a fallthrough branch into this
+ // block, the patching loop below can overwrite the start of the block.
+ // In those situations, there is hopefully no jumps to the start of the block
+ // after patching as the start of the block would be in the middle of something
+ // generated by branch_t::gen_fn.
+ {
+ RUBY_ASSERT_ALWAYS(block->entry_exit && "block invalidation requires an exit");
+ if (block->entry_exit == block->start_addr) {
+ // Some blocks exit on entry. Patching a jump to the entry at the
+ // entry makes an infinite loop.
+ }
+ else if (block->start_addr >= cb_get_ptr(cb, yjit_codepage_frozen_bytes)) { // Don't patch frozen code region
+ // Patch in a jump to block->entry_exit.
+ uint32_t cur_pos = cb->write_pos;
+ cb_set_write_ptr(cb, block->start_addr);
+ jmp_ptr(cb, block->entry_exit);
+ RUBY_ASSERT_ALWAYS(cb_get_ptr(cb, cb->write_pos) < block->end_addr && "invalidation wrote past end of block");
+ cb_set_pos(cb, cur_pos);
+ }
+ }
+
// For each incoming branch
rb_darray_for(block->incoming, incoming_idx) {
branch_t *branch = rb_darray_get(block->incoming, incoming_idx);
@@ -1132,29 +1276,36 @@ invalidate_block_version(block_t *block)
}
// Create a stub for this branch target
- branch->dst_addrs[target_idx] = get_branch_target(
+ uint8_t *branch_target = get_branch_target(
block->blockid,
&block->ctx,
branch,
target_idx
);
+ if (!branch_target) {
+ // We were unable to generate a stub (e.g. OOM). Use the block's
+ // exit instead of a stub for the block. It's important that we
+ // still patch the branch in this situation so stubs are unique
+ // to branches. Think about what could go wrong if we run out of
+ // memory in the middle of this loop.
+ branch_target = block->entry_exit;
+ }
+
+ branch->dst_addrs[target_idx] = branch_target;
+
// Check if the invalidated block immediately follows
bool target_next = (block->start_addr == branch->end_addr);
if (target_next) {
- // The new block will no longer be adjacent
+ // The new block will no longer be adjacent.
+ // Note that we could be enlarging the branch and writing into the
+ // start of the block being invalidated.
branch->shape = SHAPE_DEFAULT;
}
// Rewrite the branch with the new jump target address
- RUBY_ASSERT(branch->dst_addrs[0] != NULL);
- uint32_t cur_pos = cb->write_pos;
- cb_set_write_ptr(cb, branch->start_addr);
- branch->gen_fn(cb, branch->dst_addrs[0], branch->dst_addrs[1], branch->shape);
- branch->end_addr = cb_get_write_ptr(cb);
- branch->block->end_addr = cb_get_write_ptr(cb);
- cb_set_pos(cb, cur_pos);
+ regenerate_branch(cb, branch);
if (target_next && branch->end_addr > block->end_addr) {
fprintf(stderr, "branch_block_idx=%u block_idx=%u over=%ld block_size=%ld\n",
@@ -1194,11 +1345,14 @@ invalidate_block_version(block_t *block)
yjit_runtime_counters.invalidation_count++;
#endif
+ cb_mark_all_executable(ocb);
+ cb_mark_all_executable(cb);
+
// fprintf(stderr, "invalidation done\n");
}
static void
yjit_init_core(void)
{
- // Nothing yet
+ gen_code_for_exit_from_stub();
}
diff --git a/yjit_core.h b/yjit_core.h
index 6cd3ec00959c38..299dae81f55d0c 100644
--- a/yjit_core.h
+++ b/yjit_core.h
@@ -192,8 +192,8 @@ typedef struct yjit_branch_entry
struct yjit_block_version *block;
// Positions where the generated code starts and ends
- uint8_t* start_addr;
- uint8_t* end_addr;
+ uint8_t *start_addr;
+ uint8_t *end_addr;
// Context right after the branch instruction
ctx_t src_ctx;
@@ -204,7 +204,7 @@ typedef struct yjit_branch_entry
struct yjit_block_version *blocks[2];
// Jump target addresses
- uint8_t* dst_addrs[2];
+ uint8_t *dst_addrs[2];
// Branch code generation function
branchgen_fn gen_fn;
@@ -241,8 +241,8 @@ typedef struct yjit_block_version
ctx_t ctx;
// Positions where the generated code starts and ends
- uint8_t* start_addr;
- uint8_t* end_addr;
+ uint8_t *start_addr;
+ uint8_t *end_addr;
// List of incoming branches (from predecessors)
branch_array_t incoming;
@@ -258,6 +258,10 @@ typedef struct yjit_block_version
// block in the system.
cme_dependency_array_t cme_dependencies;
+ // Code address of an exit for `ctx` and `blockid`. Used for block
+ // invalidation.
+ uint8_t *entry_exit;
+
// Index one past the last instruction in the iseq
uint32_t end_idx;
diff --git a/yjit_iface.c b/yjit_iface.c
index a880a870eddb2f..dee0c42500c379 100644
--- a/yjit_iface.c
+++ b/yjit_iface.c
@@ -115,12 +115,13 @@ struct yjit_root_struct {
static st_table *blocks_assuming_bops;
static bool
-assume_bop_not_redefined(block_t *block, int redefined_flag, enum ruby_basic_operators bop)
+assume_bop_not_redefined(jitstate_t *jit, int redefined_flag, enum ruby_basic_operators bop)
{
if (BASIC_OP_UNREDEFINED_P(bop, redefined_flag)) {
- if (blocks_assuming_bops) {
- st_insert(blocks_assuming_bops, (st_data_t)block, 0);
- }
+ RUBY_ASSERT(blocks_assuming_bops);
+
+ jit_ensure_block_entry_exit(jit);
+ st_insert(blocks_assuming_bops, (st_data_t)jit->block, 0);
return true;
}
else {
@@ -206,7 +207,7 @@ add_lookup_dependency_i(st_data_t *key, st_data_t *value, st_data_t data, int ex
//
// @raise NoMemoryError
static void
-assume_method_lookup_stable(VALUE receiver_klass, const rb_callable_method_entry_t *cme, block_t *block)
+assume_method_lookup_stable(VALUE receiver_klass, const rb_callable_method_entry_t *cme, jitstate_t *jit)
{
RUBY_ASSERT(cme_validity_dependency);
RUBY_ASSERT(method_lookup_dependency);
@@ -214,6 +215,10 @@ assume_method_lookup_stable(VALUE receiver_klass, const rb_callable_method_entry
RUBY_ASSERT_ALWAYS(RB_TYPE_P(receiver_klass, T_CLASS) || RB_TYPE_P(receiver_klass, T_ICLASS));
RUBY_ASSERT_ALWAYS(!rb_objspace_garbage_object_p(receiver_klass));
+ jit_ensure_block_entry_exit(jit);
+
+ block_t *block = jit->block;
+
cme_dependency_t cme_dep = { receiver_klass, (VALUE)cme };
rb_darray_append(&block->cme_dependencies, cme_dep);
@@ -228,10 +233,13 @@ static st_table *blocks_assuming_single_ractor_mode;
// Can raise NoMemoryError.
RBIMPL_ATTR_NODISCARD()
static bool
-assume_single_ractor_mode(block_t *block) {
+assume_single_ractor_mode(jitstate_t *jit)
+{
if (rb_multi_ractor_p()) return false;
- st_insert(blocks_assuming_single_ractor_mode, (st_data_t)block, 1);
+ jit_ensure_block_entry_exit(jit);
+
+ st_insert(blocks_assuming_single_ractor_mode, (st_data_t)jit->block, 1);
return true;
}
@@ -240,9 +248,10 @@ static st_table *blocks_assuming_stable_global_constant_state;
// Assume that the global constant state has not changed since call to this function.
// Can raise NoMemoryError.
static void
-assume_stable_global_constant_state(block_t *block)
+assume_stable_global_constant_state(jitstate_t *jit)
{
- st_insert(blocks_assuming_stable_global_constant_state, (st_data_t)block, 1);
+ jit_ensure_block_entry_exit(jit);
+ st_insert(blocks_assuming_stable_global_constant_state, (st_data_t)jit->block, 1);
}
static int
@@ -469,13 +478,12 @@ rb_yjit_compile_iseq(const rb_iseq_t *iseq, rb_execution_context_t *ec)
#if (OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE) && JIT_ENABLED
bool success = true;
RB_VM_LOCK_ENTER();
- // TODO: I think we need to stop all other ractors here
+ rb_vm_barrier();
// Compile a block version starting at the first instruction
uint8_t *code_ptr = gen_entry_point(iseq, 0, ec);
- if (code_ptr)
- {
+ if (code_ptr) {
iseq->body->jit_func = (yjit_func_t)code_ptr;
}
else {
@@ -596,7 +604,7 @@ rb_yjit_constant_state_changed(void)
// Invalidate the block for the matching opt_getinlinecache so it could regenerate code
// using the new value in the constant cache.
void
-rb_yjit_constant_ic_update(const rb_iseq_t *iseq, IC ic)
+rb_yjit_constant_ic_update(const rb_iseq_t *const iseq, IC ic)
{
if (!rb_yjit_enabled_p()) return;
@@ -609,27 +617,40 @@ rb_yjit_constant_ic_update(const rb_iseq_t *iseq, IC ic)
RB_VM_LOCK_ENTER();
rb_vm_barrier(); // Stop other ractors since we are going to patch machine code.
{
-
const struct rb_iseq_constant_body *const body = iseq->body;
VALUE *code = body->iseq_encoded;
+ const unsigned get_insn_idx = ic->get_insn_idx;
// This should come from a running iseq, so direct threading translation
// should have been done
RUBY_ASSERT(FL_TEST((VALUE)iseq, ISEQ_TRANSLATED));
- RUBY_ASSERT(ic->get_insn_idx < body->iseq_size);
- RUBY_ASSERT(rb_vm_insn_addr2insn((const void *)code[ic->get_insn_idx]) == BIN(opt_getinlinecache));
+ RUBY_ASSERT(get_insn_idx < body->iseq_size);
+ RUBY_ASSERT(rb_vm_insn_addr2insn((const void *)code[get_insn_idx]) == BIN(opt_getinlinecache));
// Find the matching opt_getinlinecache and invalidate all the blocks there
RUBY_ASSERT(insn_op_type(BIN(opt_getinlinecache), 1) == TS_IC);
- if (ic == (IC)code[ic->get_insn_idx + 1 + 1]) {
- rb_yjit_block_array_t getinlinecache_blocks = yjit_get_version_array(iseq, ic->get_insn_idx);
- rb_darray_for(getinlinecache_blocks, i) {
- block_t *block = rb_darray_get(getinlinecache_blocks, i);
- invalidate_block_version(block);
+ if (ic == (IC)code[get_insn_idx + 1 + 1]) {
+ rb_yjit_block_array_t getinlinecache_blocks = yjit_get_version_array(iseq, get_insn_idx);
+
+ // Put a bound for loop below to be defensive
+ const int32_t initial_version_count = rb_darray_size(getinlinecache_blocks);
+ for (int32_t iteration=0; iteration 0) {
+ block_t *block = rb_darray_get(getinlinecache_blocks, 0);
+ invalidate_block_version(block);
#if YJIT_STATS
- yjit_runtime_counters.invalidate_constant_ic_fill++;
+ yjit_runtime_counters.invalidate_constant_ic_fill++;
#endif
+ }
+ else {
+ break;
+ }
}
+
+ // All versions at get_insn_idx should now be gone
+ RUBY_ASSERT(0 == rb_darray_size(yjit_get_version_array(iseq, get_insn_idx)));
}
else {
RUBY_ASSERT(false && "ic->get_insn_diex not set properly");
@@ -819,6 +840,18 @@ reset_stats_bang(rb_execution_context_t *ec, VALUE self)
return Qnil;
}
+// Primitive for yjit.rb. For testing running out of executable memory
+static VALUE
+simulate_oom_bang(rb_execution_context_t *ec, VALUE self)
+{
+ if (RUBY_DEBUG && cb && ocb) {
+ // Only simulate in debug builds for paranoia.
+ cb_set_pos(cb, cb->mem_size-1);
+ cb_set_pos(ocb, ocb->mem_size-1);
+ }
+ return Qnil;
+}
+
#include "yjit.rbinc"
#if YJIT_STATS
@@ -894,6 +927,8 @@ rb_yjit_iseq_mark(const struct rb_iseq_constant_body *body)
void
rb_yjit_iseq_update_references(const struct rb_iseq_constant_body *body)
{
+ rb_vm_barrier();
+
rb_darray_for(body->yjit_blocks, version_array_idx) {
rb_yjit_block_array_t version_array = rb_darray_get(body->yjit_blocks, version_array_idx);
@@ -927,6 +962,11 @@ rb_yjit_iseq_update_references(const struct rb_iseq_constant_body *body)
VALUE possibly_moved = rb_gc_location(object);
// Only write when the VALUE moves, to be CoW friendly.
if (possibly_moved != object) {
+ // Possibly unlock the page we need to update
+ cb_mark_position_writeable(cb, offset_to_value);
+
+ // Object could cross a page boundary, so unlock there as well
+ cb_mark_position_writeable(cb, offset_to_value + SIZEOF_VALUE - 1);
memcpy(value_address, &possibly_moved, SIZEOF_VALUE);
}
}
@@ -935,6 +975,15 @@ rb_yjit_iseq_update_references(const struct rb_iseq_constant_body *body)
//block->code_page = rb_gc_location(block->code_page);
}
}
+
+ /* If YJIT isn't initialized, then cb or ocb could be NULL. */
+ if (cb) {
+ cb_mark_all_executable(cb);
+ }
+
+ if (ocb) {
+ cb_mark_all_executable(ocb);
+ }
}
// Free the yjit resources associated with an iseq
@@ -1114,7 +1163,7 @@ yjit_get_code_page(uint32_t cb_bytes_needed, uint32_t ocb_bytes_needed)
code_page_t *new_code_page = rb_yjit_code_page_unwrap(yjit_cur_code_page);
// Jump to the new code page
- jmp_ptr(&code_page->cb, new_code_page->cb.mem_block);
+ jmp_ptr(&code_page->cb, cb_get_ptr(&new_code_page->cb, 0));
return yjit_cur_code_page;
}
@@ -1211,8 +1260,7 @@ rb_yjit_init(struct rb_yjit_options *options)
}
// If type propagation is disabled, max 1 version per block
- if (rb_yjit_opts.no_type_prop)
- {
+ if (rb_yjit_opts.no_type_prop) {
rb_yjit_opts.max_versions = 1;
}
@@ -1220,8 +1268,8 @@ rb_yjit_init(struct rb_yjit_options *options)
blocks_assuming_single_ractor_mode = st_init_numtable();
blocks_assuming_bops = st_init_numtable();
- yjit_init_core();
yjit_init_codegen();
+ yjit_init_core();
// YJIT Ruby module
mYjit = rb_define_module_under(rb_cRubyVM, "YJIT");
diff --git a/yjit_utils.c b/yjit_utils.c
index ce89c5dd961e53..cbc50a49325414 100644
--- a/yjit_utils.c
+++ b/yjit_utils.c
@@ -101,13 +101,9 @@ print_str(codeblock_t *cb, const char *str)
cb_write_byte(cb, (uint8_t)str[i]);
cb_write_byte(cb, 0);
- push(cb, RSP); // Alignment
-
// Call the print function
mov(cb, RAX, const_ptr_opnd((void*)&print_str_cfun));
call(cb, RAX);
- pop(cb, RSP); // Alignment
-
pop_regs(cb);
}