diff --git a/.github/actions/setup/directories/action.yml b/.github/actions/setup/directories/action.yml
index 8389ef54b78e5e..916e8b5acd0c4c 100644
--- a/.github/actions/setup/directories/action.yml
+++ b/.github/actions/setup/directories/action.yml
@@ -95,7 +95,7 @@ runs:
git config --global init.defaultBranch garbage
- if: inputs.checkout
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
path: ${{ inputs.srcdir }}
fetch-depth: ${{ inputs.fetch-depth }}
diff --git a/.github/workflows/annocheck.yml b/.github/workflows/annocheck.yml
index c1d227181a7c6b..a2958fc00971dc 100644
--- a/.github/workflows/annocheck.yml
+++ b/.github/workflows/annocheck.yml
@@ -61,7 +61,7 @@ jobs:
- run: id
working-directory:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
diff --git a/.github/workflows/auto_review_pr.yml b/.github/workflows/auto_review_pr.yml
index 34081cfdf7bc7f..1351e78b98abef 100644
--- a/.github/workflows/auto_review_pr.yml
+++ b/.github/workflows/auto_review_pr.yml
@@ -19,7 +19,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v6.0.0
+ uses: actions/checkout@v6.0.1
- uses: ruby/setup-ruby@ab177d40ee5483edb974554986f56b33477e21d0 # v1.265.0
with:
diff --git a/.github/workflows/baseruby.yml b/.github/workflows/baseruby.yml
index 68d65dd71cbb3a..9ad8978c3e6e51 100644
--- a/.github/workflows/baseruby.yml
+++ b/.github/workflows/baseruby.yml
@@ -53,7 +53,7 @@ jobs:
ruby-version: ${{ matrix.ruby }}
bundler: none
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/setup/ubuntu
diff --git a/.github/workflows/bundled_gems.yml b/.github/workflows/bundled_gems.yml
index 58742c1ce18134..ad2e3915199102 100644
--- a/.github/workflows/bundled_gems.yml
+++ b/.github/workflows/bundled_gems.yml
@@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
token: ${{ (github.repository == 'ruby/ruby' && !startsWith(github.event_name, 'pull')) && secrets.MATZBOT_AUTO_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/check_dependencies.yml b/.github/workflows/check_dependencies.yml
index ee17217f274bcc..218bef28186e2d 100644
--- a/.github/workflows/check_dependencies.yml
+++ b/.github/workflows/check_dependencies.yml
@@ -30,7 +30,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/setup/ubuntu
if: ${{ contains(matrix.os, 'ubuntu') }}
diff --git a/.github/workflows/check_misc.yml b/.github/workflows/check_misc.yml
index d181759fc1320a..d7b096a96d58ec 100644
--- a/.github/workflows/check_misc.yml
+++ b/.github/workflows/check_misc.yml
@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
token: ${{ (github.repository == 'ruby/ruby' && !startsWith(github.event_name, 'pull')) && secrets.MATZBOT_AUTO_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}
@@ -65,7 +65,7 @@ jobs:
echo RDOC='ruby -W0 --disable-gems tool/rdoc-srcdir -q' >> $GITHUB_ENV
- name: Checkout rdoc
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: ruby/rdoc
ref: ${{ steps.rdoc.outputs.ref }}
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 62fc319b19d1dd..a92c93b476d3af 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -58,7 +58,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install libraries
if: ${{ contains(matrix.os, 'macos') }}
diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml
index 3ecc749c0456a0..97a698613a2f10 100644
--- a/.github/workflows/compilers.yml
+++ b/.github/workflows/compilers.yml
@@ -51,7 +51,7 @@ jobs:
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
# Set fetch-depth: 10 so that Launchable can receive commits information.
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
@@ -74,7 +74,7 @@ jobs:
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- name: 'GCC 15 LTO'
@@ -104,7 +104,7 @@ jobs:
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'clang 22', with: { tag: 'clang-22' }, timeout-minutes: 5 }
@@ -125,7 +125,7 @@ jobs:
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'clang 13', with: { tag: 'clang-13' }, timeout-minutes: 5 }
@@ -146,7 +146,7 @@ jobs:
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
# -Wno-strict-prototypes is necessary with current clang-15 since
@@ -172,7 +172,7 @@ jobs:
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'C++20', with: { CXXFLAGS: '-std=c++20 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' }, timeout-minutes: 5 }
@@ -192,7 +192,7 @@ jobs:
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'disable-jit', with: { append_configure: '--disable-yjit --disable-zjit' }, timeout-minutes: 5 }
@@ -214,7 +214,7 @@ jobs:
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'NDEBUG', with: { cppflags: '-DNDEBUG' }, timeout-minutes: 5 }
@@ -234,7 +234,7 @@ jobs:
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'HASH_DEBUG', with: { cppflags: '-DHASH_DEBUG' }, timeout-minutes: 5 }
@@ -254,7 +254,7 @@ jobs:
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'USE_LAZY_LOAD', with: { cppflags: '-DUSE_LAZY_LOAD' }, timeout-minutes: 5 }
@@ -274,7 +274,7 @@ jobs:
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'GC_DEBUG_STRESS_TO_CLASS', with: { cppflags: '-DGC_DEBUG_STRESS_TO_CLASS' }, timeout-minutes: 5 }
@@ -293,7 +293,7 @@ jobs:
timeout-minutes: 60
services: { docuum: { image: 'stephanmisc/docuum', options: '--init', volumes: [ '/root', '/var/run/docker.sock:/var/run/docker.sock' ] } }
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- { uses: './.github/actions/setup/directories', with: { srcdir: 'src', builddir: 'build', makeup: true, fetch-depth: 10 } }
- { uses: './.github/actions/compilers', name: 'VM_DEBUG_BP_CHECK', with: { cppflags: '-DVM_DEBUG_BP_CHECK' }, timeout-minutes: 5 }
@@ -319,7 +319,7 @@ jobs:
- 'compileB'
- 'compileC'
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with: { sparse-checkout-cone-mode: false, sparse-checkout: /.github }
- uses: ./.github/actions/slack
with:
diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml
index 8b97cc195ff8c8..ac73991fe80b55 100644
--- a/.github/workflows/cygwin.yml
+++ b/.github/workflows/cygwin.yml
@@ -40,7 +40,7 @@ jobs:
steps:
- run: git config --global core.autocrlf input
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup Cygwin
uses: cygwin/cygwin-install-action@master
diff --git a/.github/workflows/default_gems_list.yml b/.github/workflows/default_gems_list.yml
index 63671382f94941..420228f3997d45 100644
--- a/.github/workflows/default_gems_list.yml
+++ b/.github/workflows/default_gems_list.yml
@@ -20,7 +20,7 @@ jobs:
if: ${{ github.repository == 'ruby/ruby' }}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
token: ${{ (github.repository == 'ruby/ruby' && !startsWith(github.event_name, 'pull')) && secrets.MATZBOT_AUTO_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 9a1feb06358463..29adcab39af018 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -61,7 +61,7 @@ jobs:
)}}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
index 192f71649a9a35..1a709d8344a290 100644
--- a/.github/workflows/mingw.yml
+++ b/.github/workflows/mingw.yml
@@ -166,7 +166,7 @@ jobs:
[ ${#failed[@]} -eq 0 ]
shell: sh
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
diff --git a/.github/workflows/modgc.yml b/.github/workflows/modgc.yml
index 8b62ccd111b72a..7851005e5133e1 100644
--- a/.github/workflows/modgc.yml
+++ b/.github/workflows/modgc.yml
@@ -48,7 +48,7 @@ jobs:
)}}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
diff --git a/.github/workflows/parse_y.yml b/.github/workflows/parse_y.yml
index 337973a54d07a6..a1035ef451dd82 100644
--- a/.github/workflows/parse_y.yml
+++ b/.github/workflows/parse_y.yml
@@ -51,7 +51,7 @@ jobs:
)}}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
diff --git a/.github/workflows/post_push.yml b/.github/workflows/post_push.yml
index 188b4d94d0056e..318444c0a291bf 100644
--- a/.github/workflows/post_push.yml
+++ b/.github/workflows/post_push.yml
@@ -28,7 +28,7 @@ jobs:
REDMINE_SYS_API_KEY: ${{ secrets.REDMINE_SYS_API_KEY }}
if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/ruby_') }}
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 500 # for notify-slack-commits
token: ${{ secrets.MATZBOT_AUTO_UPDATE_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 24bdec5eb9d257..03227bcd7234fd 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -15,7 +15,7 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v6.0.0
+ - uses: actions/checkout@v6.0.1
- uses: ruby/setup-ruby@v1
with:
diff --git a/.github/workflows/rust-warnings.yml b/.github/workflows/rust-warnings.yml
index f05b35346e8703..a2e3208e5294f4 100644
--- a/.github/workflows/rust-warnings.yml
+++ b/.github/workflows/rust-warnings.yml
@@ -36,7 +36,7 @@ jobs:
)}}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install Rust
run: rustup default beta
diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml
index 6233f06661d557..a321d14010cd69 100644
--- a/.github/workflows/scorecards.yml
+++ b/.github/workflows/scorecards.yml
@@ -34,7 +34,7 @@ jobs:
steps:
- name: "Checkout code"
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
diff --git a/.github/workflows/spec_guards.yml b/.github/workflows/spec_guards.yml
index 20b3367c832a75..8ccb954d84548d 100644
--- a/.github/workflows/spec_guards.yml
+++ b/.github/workflows/spec_guards.yml
@@ -45,7 +45,7 @@ jobs:
fail-fast: false
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ruby/setup-ruby@ab177d40ee5483edb974554986f56b33477e21d0 # v1.265.0
with:
diff --git a/.github/workflows/sync_default_gems.yml b/.github/workflows/sync_default_gems.yml
index 26144cc49689eb..907dc0b4f025fe 100644
--- a/.github/workflows/sync_default_gems.yml
+++ b/.github/workflows/sync_default_gems.yml
@@ -27,7 +27,7 @@ jobs:
if: ${{ github.repository == 'ruby/ruby' }}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
name: Check out ruby/ruby
with:
token: ${{ github.repository == 'ruby/ruby' && secrets.MATZBOT_AUTO_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index 9ec59324900094..9f3ad412f7ba6c 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -60,7 +60,7 @@ jobs:
)}}
steps: &make-steps
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml
index 082d1984e50620..b59e1d4c931ef7 100644
--- a/.github/workflows/wasm.yml
+++ b/.github/workflows/wasm.yml
@@ -59,7 +59,7 @@ jobs:
)}}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index dd4bf0de968108..67ea1cacae2cf1 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -66,7 +66,7 @@ jobs:
bundler: none
windows-toolchain: none
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
diff --git a/.github/workflows/yjit-macos.yml b/.github/workflows/yjit-macos.yml
index 148dd7a4a3268d..a59b4d650855ef 100644
--- a/.github/workflows/yjit-macos.yml
+++ b/.github/workflows/yjit-macos.yml
@@ -41,7 +41,7 @@ jobs:
)}}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- run: RUST_BACKTRACE=1 cargo test
working-directory: yjit
@@ -83,7 +83,7 @@ jobs:
)}}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
diff --git a/.github/workflows/yjit-ubuntu.yml b/.github/workflows/yjit-ubuntu.yml
index 5303ab1c794f09..00214709b93e65 100644
--- a/.github/workflows/yjit-ubuntu.yml
+++ b/.github/workflows/yjit-ubuntu.yml
@@ -36,7 +36,7 @@ jobs:
)}}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
# For now we can't run cargo test --offline because it complains about the
# capstone dependency, even though the dependency is optional
@@ -68,7 +68,7 @@ jobs:
)}}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
# Check that we don't have linting errors in release mode, too
- run: cargo clippy --all-targets --all-features
@@ -120,7 +120,7 @@ jobs:
)}}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
diff --git a/.github/workflows/zjit-macos.yml b/.github/workflows/zjit-macos.yml
index fc7bf459d89de5..ed559d64e10d05 100644
--- a/.github/workflows/zjit-macos.yml
+++ b/.github/workflows/zjit-macos.yml
@@ -68,7 +68,7 @@ jobs:
)}}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
@@ -172,7 +172,7 @@ jobs:
)}}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/setup/macos
@@ -192,7 +192,7 @@ jobs:
run: echo "MAKEFLAGS=" >> "$GITHUB_ENV"
- name: Checkout ruby-bench
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: ruby/ruby-bench
path: ruby-bench
diff --git a/.github/workflows/zjit-ubuntu.yml b/.github/workflows/zjit-ubuntu.yml
index ac400d410d6cf6..5d281eab0b9947 100644
--- a/.github/workflows/zjit-ubuntu.yml
+++ b/.github/workflows/zjit-ubuntu.yml
@@ -41,7 +41,7 @@ jobs:
)}}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- run: cargo clippy --all-targets --all-features
working-directory: zjit
@@ -103,7 +103,7 @@ jobs:
)}}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
sparse-checkout-cone-mode: false
sparse-checkout: /.github
@@ -228,7 +228,7 @@ jobs:
)}}
steps:
- - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/setup/ubuntu
@@ -244,7 +244,7 @@ jobs:
- run: make install
- name: Checkout ruby-bench
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+ uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: ruby/ruby-bench
path: ruby-bench
diff --git a/NEWS.md b/NEWS.md
index 18265f7c7cada5..bec7ee9db45036 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -186,8 +186,8 @@ The following default gem is added.
The following default gems are updated.
-* RubyGems 4.0.0.beta2
-* bundler 4.0.0.beta2
+* RubyGems 4.0.0
+* bundler 4.0.0
* date 3.5.0
* digest 3.2.1
* english 0.8.1
diff --git a/complex.c b/complex.c
index d69b0a65817497..12dec4d23b04c8 100644
--- a/complex.c
+++ b/complex.c
@@ -816,17 +816,26 @@ rb_complex_uminus(VALUE self)
}
/*
- * call-seq:
- * complex + numeric -> new_complex
+ * call-seq:
+ * self + other -> numeric
+ *
+ * Returns the sum of +self+ and +other+:
+ *
+ * Complex(1, 2) + 0 # => (1+2i)
+ * Complex(1, 2) + 1 # => (2+2i)
+ * Complex(1, 2) + -1 # => (0+2i)
+ *
+ * Complex(1, 2) + 1.0 # => (2.0+2i)
+ *
+ * Complex(1, 2) + Complex(2, 1) # => (3+3i)
+ * Complex(1, 2) + Complex(2.0, 1.0) # => (3.0+3.0i)
*
- * Returns the sum of +self+ and +numeric+:
+ * Complex(1, 2) + Rational(1, 1) # => ((2/1)+2i)
+ * Complex(1, 2) + Rational(1, 2) # => ((3/2)+2i)
*
- * Complex.rect(2, 3) + Complex.rect(2, 3) # => (4+6i)
- * Complex.rect(900) + Complex.rect(1) # => (901+0i)
- * Complex.rect(-2, 9) + Complex.rect(-9, 2) # => (-11+11i)
- * Complex.rect(9, 8) + 4 # => (13+8i)
- * Complex.rect(20, 9) + 9.8 # => (29.8+9i)
+ * For a computation involving Floats, the result may be inexact (see Float#+):
*
+ * Complex(1, 2) + 3.14 # => (4.140000000000001+2i)
*/
VALUE
rb_complex_plus(VALUE self, VALUE other)
diff --git a/doc/float.rb b/doc/float.rb
new file mode 100644
index 00000000000000..01668bfc6dacf1
--- /dev/null
+++ b/doc/float.rb
@@ -0,0 +1,128 @@
+# A \Float object stores a real number
+# using the native architecture's double-precision floating-point representation.
+#
+# == \Float Imprecisions
+#
+# Some real numbers can be represented precisely as \Float objects:
+#
+# 37.5 # => 37.5
+# 98.75 # => 98.75
+# 12.3125 # => 12.3125
+#
+# Others cannot; among these are the transcendental numbers, including:
+#
+# - Pi, π: in mathematics, a number of infinite precision:
+# 3.1415926535897932384626433... (to 25 places);
+# in Ruby, it is of limited precision (in this case, to 16 decimal places):
+#
+# Math::PI # => 3.141592653589793
+#
+# - Euler's number, e: in mathematics, a number of infinite precision:
+# 2.7182818284590452353602874... (to 25 places);
+# in Ruby, it is of limited precision (in this case, to 15 decimal places):
+#
+# Math::E # => 2.718281828459045
+#
+# Some floating-point computations in Ruby give precise results:
+#
+# 1.0/2 # => 0.5
+# 100.0/8 # => 12.5
+#
+# Others do not:
+#
+# - In mathematics, 2/3 as a decimal number is an infinitely-repeating decimal:
+# 0.666... (forever);
+# in Ruby, +2.0/3+ is of limited precision (in this case, to 16 decimal places):
+#
+# 2.0/3 # => 0.6666666666666666
+#
+# - In mathematics, the square root of 2 is an irrational number of infinite precision:
+# 1.4142135623730950488016887... (to 25 decimal places);
+# in Ruby, it is of limited precision (in this case, to 16 decimal places):
+#
+# Math.sqrt(2.0) # => 1.4142135623730951
+#
+# - Even a simple computation can introduce imprecision:
+#
+# x = 0.1 + 0.2 # => 0.30000000000000004
+# y = 0.3 # => 0.3
+# x == y # => false
+#
+# See:
+#
+# - https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
+# - https://github.com/rdp/ruby_tutorials_core/wiki/Ruby-Talk-FAQ#-why-are-rubys-floats-imprecise
+# - https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems
+#
+# Note that precise storage and computation of rational numbers
+# is possible using Rational objects.
+#
+# == Creating a \Float
+#
+# You can create a \Float object explicitly with:
+#
+# - A {floating-point literal}[rdoc-ref:syntax/literals.rdoc@Float+Literals].
+#
+# You can convert certain objects to Floats with:
+#
+# - Method #Float.
+#
+# == What's Here
+#
+# First, what's elsewhere. Class \Float:
+#
+# - Inherits from
+# {class Numeric}[rdoc-ref:Numeric@What-27s+Here]
+# and {class Object}[rdoc-ref:Object@What-27s+Here].
+# - Includes {module Comparable}[rdoc-ref:Comparable@What-27s+Here].
+#
+# Here, class \Float provides methods for:
+#
+# - {Querying}[rdoc-ref:Float@Querying]
+# - {Comparing}[rdoc-ref:Float@Comparing]
+# - {Converting}[rdoc-ref:Float@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
+#
+# - #<: Returns whether +self+ is less than the given value.
+# - #<=: Returns whether +self+ is less than or equal to the given value.
+# - #<=>: Returns a number indicating whether +self+ is less than, equal
+# to, or greater than the given value.
+# - #== (aliased as #=== and #eql?): Returns whether +self+ is equal to
+# the given value.
+# - #>: Returns whether +self+ is greater than the given value.
+# - #>=: 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.
+# - #**: 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.
+# - #/: 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.
+#
+
+ class Float; end
diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c
index 6ece9f05385491..35d543a7a768fa 100644
--- a/ext/json/generator/generator.c
+++ b/ext/json/generator/generator.c
@@ -128,7 +128,7 @@ typedef struct _search_state {
#endif /* HAVE_SIMD */
} search_state;
-static ALWAYS_INLINE() void search_flush(search_state *search)
+ALWAYS_INLINE(static) void search_flush(search_state *search)
{
// Do not remove this conditional without profiling, specifically escape-heavy text.
// escape_UTF8_char_basic will advance search->ptr and search->cursor (effectively a search_flush).
@@ -171,7 +171,7 @@ static inline unsigned char search_escape_basic(search_state *search)
return 0;
}
-static ALWAYS_INLINE() void escape_UTF8_char_basic(search_state *search)
+ALWAYS_INLINE(static) void escape_UTF8_char_basic(search_state *search)
{
const unsigned char ch = (unsigned char)*search->ptr;
switch (ch) {
@@ -258,7 +258,7 @@ static inline void escape_UTF8_char(search_state *search, unsigned char ch_len)
#ifdef HAVE_SIMD
-static ALWAYS_INLINE() char *copy_remaining_bytes(search_state *search, unsigned long vec_len, unsigned long len)
+ALWAYS_INLINE(static) char *copy_remaining_bytes(search_state *search, unsigned long vec_len, unsigned long len)
{
// Flush the buffer so everything up until the last 'len' characters are unflushed.
search_flush(search);
@@ -281,7 +281,7 @@ static ALWAYS_INLINE() char *copy_remaining_bytes(search_state *search, unsigned
#ifdef HAVE_SIMD_NEON
-static ALWAYS_INLINE() unsigned char neon_next_match(search_state *search)
+ALWAYS_INLINE(static) unsigned char neon_next_match(search_state *search)
{
uint64_t mask = search->matches_mask;
uint32_t index = trailing_zeros64(mask) >> 2;
@@ -395,7 +395,7 @@ static inline unsigned char search_escape_basic_neon(search_state *search)
#ifdef HAVE_SIMD_SSE2
-static ALWAYS_INLINE() unsigned char sse2_next_match(search_state *search)
+ALWAYS_INLINE(static) unsigned char sse2_next_match(search_state *search)
{
int mask = search->matches_mask;
int index = trailing_zeros(mask);
@@ -419,7 +419,7 @@ static ALWAYS_INLINE() unsigned char sse2_next_match(search_state *search)
#define TARGET_SSE2
#endif
-static TARGET_SSE2 ALWAYS_INLINE() unsigned char search_escape_basic_sse2(search_state *search)
+ALWAYS_INLINE(static) TARGET_SSE2 unsigned char search_escape_basic_sse2(search_state *search)
{
if (RB_UNLIKELY(search->has_matches)) {
// There are more matches if search->matches_mask > 0.
@@ -1123,8 +1123,7 @@ struct hash_foreach_arg {
bool mixed_keys_encountered;
};
-NOINLINE()
-static void
+NOINLINE(static) void
json_inspect_hash_with_mixed_keys(struct hash_foreach_arg *arg)
{
if (arg->mixed_keys_encountered) {
diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c
index 0216eef987e3f3..5b7cd835cd7d1e 100644
--- a/ext/json/parser/parser.c
+++ b/ext/json/parser/parser.c
@@ -88,7 +88,7 @@ static void rvalue_cache_insert_at(rvalue_cache *cache, int index, VALUE rstring
#if JSON_CPU_LITTLE_ENDIAN_64BITS
#if __has_builtin(__builtin_bswap64)
#undef rstring_cache_memcmp
-static ALWAYS_INLINE() int rstring_cache_memcmp(const char *str, const char *rptr, const long length)
+ALWAYS_INLINE(static) int rstring_cache_memcmp(const char *str, const char *rptr, const long length)
{
// The libc memcmp has numerous complex optimizations, but in this particular case,
// we know the string is small (JSON_RVALUE_CACHE_MAX_ENTRY_LENGTH), so being able to
@@ -117,7 +117,7 @@ static ALWAYS_INLINE() int rstring_cache_memcmp(const char *str, const char *rpt
#endif
#endif
-static ALWAYS_INLINE() int rstring_cache_cmp(const char *str, const long length, VALUE rstring)
+ALWAYS_INLINE(static) int rstring_cache_cmp(const char *str, const long length, VALUE rstring)
{
const char *rstring_ptr;
long rstring_length;
@@ -131,7 +131,7 @@ static ALWAYS_INLINE() int rstring_cache_cmp(const char *str, const long length,
}
}
-static ALWAYS_INLINE() VALUE rstring_cache_fetch(rvalue_cache *cache, const char *str, const long length)
+ALWAYS_INLINE(static) VALUE rstring_cache_fetch(rvalue_cache *cache, const char *str, const long length)
{
int low = 0;
int high = cache->length - 1;
@@ -540,7 +540,7 @@ json_eat_comments(JSON_ParserState *state)
}
}
-static ALWAYS_INLINE() void
+ALWAYS_INLINE(static) void
json_eat_whitespace(JSON_ParserState *state)
{
while (true) {
@@ -661,7 +661,7 @@ static inline const char *json_next_backslash(const char *pe, const char *string
return NULL;
}
-static NOINLINE() VALUE json_string_unescape(JSON_ParserState *state, JSON_ParserConfig *config, const char *string, const char *stringEnd, bool is_name, JSON_UnescapePositions *positions)
+NOINLINE(static) VALUE json_string_unescape(JSON_ParserState *state, JSON_ParserConfig *config, const char *string, const char *stringEnd, bool is_name, JSON_UnescapePositions *positions)
{
bool intern = is_name || config->freeze;
bool symbolize = is_name && config->symbolize_names;
@@ -946,7 +946,7 @@ static const bool string_scan_table[256] = {
static SIMD_Implementation simd_impl = SIMD_NONE;
#endif /* HAVE_SIMD */
-static ALWAYS_INLINE() bool string_scan(JSON_ParserState *state)
+ALWAYS_INLINE(static) bool string_scan(JSON_ParserState *state)
{
#ifdef HAVE_SIMD
#if defined(HAVE_SIMD_NEON)
@@ -1015,7 +1015,7 @@ static VALUE json_parse_escaped_string(JSON_ParserState *state, JSON_ParserConfi
return Qfalse;
}
-static ALWAYS_INLINE() VALUE json_parse_string(JSON_ParserState *state, JSON_ParserConfig *config, bool is_name)
+ALWAYS_INLINE(static) VALUE json_parse_string(JSON_ParserState *state, JSON_ParserConfig *config, bool is_name)
{
state->cursor++;
const char *start = state->cursor;
diff --git a/ext/json/simd/simd.h b/ext/json/simd/simd.h
index c9e3b3ec7c9f28..f8e5ee1880e5b1 100644
--- a/ext/json/simd/simd.h
+++ b/ext/json/simd/simd.h
@@ -73,14 +73,14 @@ static inline SIMD_Implementation find_simd_implementation(void)
#define HAVE_SIMD_NEON 1
// See: https://community.arm.com/arm-community-blogs/b/servers-and-cloud-computing-blog/posts/porting-x86-vector-bitmask-optimizations-to-arm-neon
-static ALWAYS_INLINE() uint64_t neon_match_mask(uint8x16_t matches)
+ALWAYS_INLINE(static) uint64_t neon_match_mask(uint8x16_t matches)
{
const uint8x8_t res = vshrn_n_u16(vreinterpretq_u16_u8(matches), 4);
const uint64_t mask = vget_lane_u64(vreinterpret_u64_u8(res), 0);
return mask & 0x8888888888888888ull;
}
-static ALWAYS_INLINE() uint64_t compute_chunk_mask_neon(const char *ptr)
+ALWAYS_INLINE(static) uint64_t compute_chunk_mask_neon(const char *ptr)
{
uint8x16_t chunk = vld1q_u8((const unsigned char *)ptr);
@@ -93,7 +93,7 @@ static ALWAYS_INLINE() uint64_t compute_chunk_mask_neon(const char *ptr)
return neon_match_mask(needs_escape);
}
-static ALWAYS_INLINE() int string_scan_simd_neon(const char **ptr, const char *end, uint64_t *mask)
+ALWAYS_INLINE(static) int string_scan_simd_neon(const char **ptr, const char *end, uint64_t *mask)
{
while (*ptr + sizeof(uint8x16_t) <= end) {
uint64_t chunk_mask = compute_chunk_mask_neon(*ptr);
@@ -140,7 +140,7 @@ static inline uint8x16x4_t load_uint8x16_4(const unsigned char *table)
#define _mm_cmpgt_epu8(a, b) _mm_xor_si128(_mm_cmple_epu8(a, b), _mm_set1_epi8(-1))
#define _mm_cmplt_epu8(a, b) _mm_cmpgt_epu8(b, a)
-static TARGET_SSE2 ALWAYS_INLINE() int compute_chunk_mask_sse2(const char *ptr)
+ALWAYS_INLINE(static) TARGET_SSE2 int compute_chunk_mask_sse2(const char *ptr)
{
__m128i chunk = _mm_loadu_si128((__m128i const*)ptr);
// Trick: c < 32 || c == 34 can be factored as c ^ 2 < 33
@@ -151,7 +151,7 @@ static TARGET_SSE2 ALWAYS_INLINE() int compute_chunk_mask_sse2(const char *ptr)
return _mm_movemask_epi8(needs_escape);
}
-static TARGET_SSE2 ALWAYS_INLINE() int string_scan_simd_sse2(const char **ptr, const char *end, int *mask)
+ALWAYS_INLINE(static) TARGET_SSE2 int string_scan_simd_sse2(const char **ptr, const char *end, int *mask)
{
while (*ptr + sizeof(__m128i) <= end) {
int chunk_mask = compute_chunk_mask_sse2(*ptr);
diff --git a/file.c b/file.c
index 2c8e87b768e4db..0fdccb7d149be4 100644
--- a/file.c
+++ b/file.c
@@ -2172,7 +2172,7 @@ rb_file_size_p(VALUE obj, VALUE fname)
* File.owned?(file_name) -> true or false
*
* Returns true if the named file exists and the
- * effective used id of the calling process is the owner of
+ * effective user id of the calling process is the owner of
* the file.
*
* _file_name_ can be an IO object.
diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb
index 3a5b5fd86bdabc..8cdc3067366a8e 100644
--- a/lib/bundler/version.rb
+++ b/lib/bundler/version.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: false
module Bundler
- VERSION = "4.0.0.beta2".freeze
+ VERSION = "4.0.0".freeze
def self.bundler_major_version
@bundler_major_version ||= gem_version.segments.first
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index 52ccf10159506b..eaeffc7a54d00b 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -9,7 +9,7 @@
require "rbconfig"
module Gem
- VERSION = "4.0.0.beta2"
+ VERSION = "4.0.0"
end
require_relative "rubygems/defaults"
diff --git a/numeric.c b/numeric.c
index 54c9649a87fa55..bc0edd6abe91f9 100644
--- a/numeric.c
+++ b/numeric.c
@@ -906,88 +906,6 @@ num_negative_p(VALUE num)
return RBOOL(rb_num_negative_int_p(num));
}
-
-/********************************************************************
- *
- * Document-class: Float
- *
- * 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.
- * So you should know its esoteric system. See following:
- *
- * - https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
- * - https://github.com/rdp/ruby_tutorials_core/wiki/Ruby-Talk-FAQ#-why-are-rubys-floats-imprecise
- * - https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems
- *
- * You can create a \Float object explicitly with:
- *
- * - A {floating-point literal}[rdoc-ref:syntax/literals.rdoc@Float+Literals].
- *
- * You can convert certain objects to Floats with:
- *
- * - Method #Float.
- *
- * == What's Here
- *
- * First, what's elsewhere. Class \Float:
- *
- * - Inherits from
- * {class Numeric}[rdoc-ref:Numeric@What-27s+Here]
- * and {class Object}[rdoc-ref:Object@What-27s+Here].
- * - Includes {module Comparable}[rdoc-ref:Comparable@What-27s+Here].
- *
- * Here, class \Float provides methods for:
- *
- * - {Querying}[rdoc-ref:Float@Querying]
- * - {Comparing}[rdoc-ref:Float@Comparing]
- * - {Converting}[rdoc-ref:Float@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
- *
- * - #<: Returns whether +self+ is less than the given value.
- * - #<=: Returns whether +self+ is less than or equal to the given value.
- * - #<=>: Returns a number indicating whether +self+ is less than, equal
- * to, or greater than the given value.
- * - #== (aliased as #=== and #eql?): Returns whether +self+ is equal to
- * the given value.
- * - #>: Returns whether +self+ is greater than the given value.
- * - #>=: 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.
- * - #**: 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.
- * - #/: 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
rb_float_new_in_heap(double d)
{
@@ -1132,15 +1050,21 @@ rb_float_uminus(VALUE flt)
/*
* call-seq:
- * self + other -> numeric
+ * self + other -> float or complex
*
- * Returns a new \Float which is the sum of +self+ and +other+:
+ * Returns the sum of +self+ and +other+;
+ * the result may be inexact (see Float):
*
- * f = 3.14
- * f + 1 # => 4.140000000000001
- * f + 1.0 # => 4.140000000000001
- * f + Rational(1, 1) # => 4.140000000000001
- * f + Complex(1, 0) # => (4.140000000000001+0i)
+ * 3.14 + 0 # => 3.14
+ * 3.14 + 1 # => 4.140000000000001
+ * -3.14 + 0 # => -3.14
+ * -3.14 + 1 # => -2.14
+
+ * 3.14 + -3.14 # => 0.0
+ * -3.14 + -3.14 # => -6.28
+ *
+ * 3.14 + Complex(1, 0) # => (4.140000000000001+0i)
+ * 3.14 + Rational(1, 1) # => 4.140000000000001
*
*/
@@ -3999,17 +3923,20 @@ rb_fix_plus(VALUE x, VALUE y)
/*
* call-seq:
- * self + numeric -> numeric_result
+ * self + other -> numeric
+ *
+ * Returns the sum of +self+ and +other+:
*
- * Performs addition:
+ * 1 + 1 # => 2
+ * 1 + -1 # => 0
+ * 1 + 0 # => 1
+ * 1 + -2 # => -1
+ * 1 + Complex(1, 0) # => (2+0i)
+ * 1 + Rational(1, 1) # => (2/1)
*
- * 2 + 2 # => 4
- * -2 + 2 # => 0
- * -2 + -2 # => -4
- * 2 + 2.0 # => 4.0
- * 2 + Rational(2, 1) # => (4/1)
- * 2 + Complex(2, 0) # => (4+0i)
+ * For a computation involving Floats, the result may be inexact (see Float#+):
*
+ * 1 + 3.14 # => 4.140000000000001
*/
VALUE
diff --git a/parse.y b/parse.y
index f6222ea52ea1b7..a9fccdd5f721e0 100644
--- a/parse.y
+++ b/parse.y
@@ -5468,11 +5468,6 @@ p_top_expr_body : p_expr
;
p_expr : p_as
- {
- p->ctxt.in_alt_pattern = 0;
- p->ctxt.capture_in_pattern = 0;
- $$ = $1;
- }
;
p_as : p_expr tASSOC p_variable
@@ -5494,6 +5489,7 @@ p_alt : p_alt[left] '|'[alt]
if (p->ctxt.capture_in_pattern) {
yyerror1(&@alt, "alternative pattern after variable capture");
}
+ p->ctxt.in_alt_pattern = 0;
$$ = NEW_OR($left, $right, &@$, &@alt);
/*% ripper: binary!($:left, ID2VAL(idOr), $:right) %*/
}
diff --git a/rational.c b/rational.c
index 77b1b175d08185..7c2bd0b1eb7f00 100644
--- a/rational.c
+++ b/rational.c
@@ -715,16 +715,27 @@ f_addsub(VALUE self, VALUE anum, VALUE aden, VALUE bnum, VALUE bden, int k)
static double nurat_to_double(VALUE self);
/*
- * call-seq:
- * rat + numeric -> numeric
+ * call-seq:
+ * self + other -> numeric
+ *
+ * Returns the sum of +self+ and +other+:
+ *
+ * Rational(2, 3) + 0 # => (2/3)
+ * Rational(2, 3) + 1 # => (5/3)
+ * Rational(2, 3) + -1 # => (-1/3)
+ *
+ * Rational(2, 3) + Complex(1, 0) # => ((5/3)+0i)
+ *
+ * Rational(2, 3) + Rational(1, 1) # => (5/3)
+ * Rational(2, 3) + Rational(3, 2) # => (13/6)
+ * Rational(2, 3) + Rational(3.0, 2.0) # => (13/6)
+ * Rational(2, 3) + Rational(3.1, 2.1) # => (30399297484750849/14186338826217063)
+ *
+ * For a computation involving Floats, the result may be inexact (see Float#+):
*
- * Performs addition.
+ * Rational(2, 3) + 1.0 # => 1.6666666666666665
+ * Rational(2, 3) + Complex(1.0, 0.0) # => (1.6666666666666665+0.0i)
*
- * Rational(2, 3) + Rational(2, 3) #=> (4/3)
- * Rational(900) + Rational(1) #=> (901/1)
- * Rational(-2, 9) + Rational(-9, 2) #=> (-85/18)
- * Rational(9, 8) + 4 #=> (41/8)
- * Rational(20, 9) + 9.8 #=> 12.022222222222222
*/
VALUE
rb_rational_plus(VALUE self, VALUE other)
diff --git a/spec/bundler/realworld/fixtures/tapioca/Gemfile.lock b/spec/bundler/realworld/fixtures/tapioca/Gemfile.lock
index 6f86f3192ec3a6..92b16c76064450 100644
--- a/spec/bundler/realworld/fixtures/tapioca/Gemfile.lock
+++ b/spec/bundler/realworld/fixtures/tapioca/Gemfile.lock
@@ -46,4 +46,4 @@ DEPENDENCIES
tapioca
BUNDLED WITH
- 4.0.0.beta2
+ 4.0.0
diff --git a/spec/bundler/realworld/fixtures/warbler/Gemfile.lock b/spec/bundler/realworld/fixtures/warbler/Gemfile.lock
index 42036fc23d17b4..90090e5fbfdc7e 100644
--- a/spec/bundler/realworld/fixtures/warbler/Gemfile.lock
+++ b/spec/bundler/realworld/fixtures/warbler/Gemfile.lock
@@ -36,4 +36,4 @@ DEPENDENCIES
warbler!
BUNDLED WITH
- 4.0.0.beta2
+ 4.0.0
diff --git a/test/.excludes-parsey/TestPatternMatching.rb b/test/.excludes-parsey/TestPatternMatching.rb
deleted file mode 100644
index 20a1868d0c5c9e..00000000000000
--- a/test/.excludes-parsey/TestPatternMatching.rb
+++ /dev/null
@@ -1 +0,0 @@
-exclude(:test_alternative_pattern_nested, "Deeply nested captures variables are missing a syntax error")
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index e2384e15007d2b..50dc5ec2f95875 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -3443,9 +3443,11 @@ def test_uminus_no_freeze_not_bare
def test_uminus_no_embed_gc
pad = "a"*2048
- ("aa".."zz").each do |c|
- fstr = -(c + pad).freeze
- File.open(IO::NULL, "w").write(fstr)
+ File.open(IO::NULL, "w") do |dev_null|
+ ("aa".."zz").each do |c|
+ fstr = -(c + pad).freeze
+ dev_null.write(fstr)
+ end
end
GC.start
end
diff --git a/tool/bundler/dev_gems.rb.lock b/tool/bundler/dev_gems.rb.lock
index cb2d6b4106f453..4cc6655e43d631 100644
--- a/tool/bundler/dev_gems.rb.lock
+++ b/tool/bundler/dev_gems.rb.lock
@@ -129,4 +129,4 @@ CHECKSUMS
turbo_tests (2.2.5) sha256=3fa31497d12976d11ccc298add29107b92bda94a90d8a0a5783f06f05102509f
BUNDLED WITH
- 4.0.0.beta2
+ 4.0.0
diff --git a/tool/bundler/rubocop_gems.rb.lock b/tool/bundler/rubocop_gems.rb.lock
index 5cd23d7ef8bb62..77bdc4b6f90a2a 100644
--- a/tool/bundler/rubocop_gems.rb.lock
+++ b/tool/bundler/rubocop_gems.rb.lock
@@ -156,4 +156,4 @@ CHECKSUMS
unicode-emoji (4.1.0) sha256=4997d2d5df1ed4252f4830a9b6e86f932e2013fbff2182a9ce9ccabda4f325a5
BUNDLED WITH
- 4.0.0.beta2
+ 4.0.0
diff --git a/tool/bundler/standard_gems.rb.lock b/tool/bundler/standard_gems.rb.lock
index 20b7d153929917..354a57d660e99b 100644
--- a/tool/bundler/standard_gems.rb.lock
+++ b/tool/bundler/standard_gems.rb.lock
@@ -176,4 +176,4 @@ CHECKSUMS
unicode-emoji (4.1.0) sha256=4997d2d5df1ed4252f4830a9b6e86f932e2013fbff2182a9ce9ccabda4f325a5
BUNDLED WITH
- 4.0.0.beta2
+ 4.0.0
diff --git a/tool/bundler/test_gems.rb.lock b/tool/bundler/test_gems.rb.lock
index 44a2cdcd969d3c..bc103af8605282 100644
--- a/tool/bundler/test_gems.rb.lock
+++ b/tool/bundler/test_gems.rb.lock
@@ -100,4 +100,4 @@ CHECKSUMS
tilt (2.6.1) sha256=35a99bba2adf7c1e362f5b48f9b581cce4edfba98117e34696dde6d308d84770
BUNDLED WITH
- 4.0.0.beta2
+ 4.0.0