Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
00921d7
ZJIT: Comment about how basically we never add to test_zjit.rb now
XrXr Jun 20, 2026
b3b9271
ZJIT: Limit local reloads after send to ones syntactically written to
XrXr Jun 20, 2026
b003f2f
post ep escape, reload everything
XrXr Jun 23, 2026
57d14f3
Merge remote-tracking branch 'gh/master' into zjit-filter-send-with-b…
XrXr Jun 23, 2026
51d7db7
getblockparam writes to the local slot even though outer_variables cl…
XrXr Jun 25, 2026
232cc9c
Merge remote-tracking branch 'gh/master' into zjit-filter-send-with-b…
XrXr Jun 25, 2026
c48cde4
tests
XrXr Jun 26, 2026
ee0cbf2
rusty OuterVariables
XrXr Jun 26, 2026
1cd2c5d
ZJIT: Replace guards we know can't pass with an unconditional side-exit
nirvdrum Jun 26, 2026
02365e1
ZJIT: Assert we never try to get the byte size of an `Empty` value
nirvdrum Jun 26, 2026
439db2c
Skip tests that trigger the eval --zjit-disable-hir-opt failures
XrXr Jun 26, 2026
5948386
ZJIT: Add ZJIT perf symbols for trampolines (#17515)
k0kubun Jun 26, 2026
9054d4d
skip eval local tests in mspec too
XrXr Jun 26, 2026
88c8877
ZJIT: Comment that we basically never add to test_zjit.rb now [DOC]
XrXr Jun 20, 2026
6ccae2b
[DOC] Update Set#| documentation
BurdetteLamar Jun 26, 2026
5e03921
[DOC] Update Set#add documentation
BurdetteLamar Jun 26, 2026
baa3b26
ZJIT: Reuse instruction profiling for recompile exits (#17457)
nozomemein Jun 26, 2026
ee74bca
Make ROBJECT_FIELDS private
peterzhu2118 Jun 26, 2026
010de50
ZJIT: Add perf symbol for block padding (#17517)
k0kubun Jun 26, 2026
7a4492a
[DOC] Update Set#== documentation
BurdetteLamar Jun 26, 2026
33ebed7
[DOC] Update Set#| documentation
BurdetteLamar Jun 27, 2026
dbf7b10
[DOC] Update Set#^ documentation
BurdetteLamar Jun 27, 2026
40b1104
[DOC] Update Set#add? documentation
BurdetteLamar Jun 27, 2026
3911959
[DOC] Update Set#classify documentation
BurdetteLamar Jun 27, 2026
0db07b1
[ruby/json] Avoid Float out of range warning for clearly underflowing…
Copilot Jun 26, 2026
689f370
Update bundled gems list as of 2026-06-26
matzbot Jun 27, 2026
ef4626e
Move test-syntax-suggest recipe from template/Makefile.in to common.mk
hsbt Jun 27, 2026
3c7a4c1
Use $(PATH_SEPARATOR) for test-syntax-suggest -I on mswin
hsbt Jun 27, 2026
ea39e1e
[DOC] Update Set#clear documentation
BurdetteLamar Jun 27, 2026
d7e9316
[DOC] Update Set#collect! documentation
BurdetteLamar Jun 27, 2026
f90fa4b
[DOC] Update Set#delete documentation
BurdetteLamar Jun 27, 2026
6c7bbea
[DOC] Update Set#delete? documentation
BurdetteLamar Jun 27, 2026
55e128f
[DOC] Update Set#delete_if documentation
BurdetteLamar Jun 27, 2026
4323e4f
[DOC] Update Set#disjoint? documentation
BurdetteLamar Jun 27, 2026
89656c1
Fix a line numer in test code
nobu Jun 27, 2026
16c70c4
LeakChecker: skip AF_SYSTEM sockets on macOS
nobu Jun 28, 2026
fd12adf
Make rb_gc_verify_internal_consistency static
peterzhu2118 Jun 26, 2026
bde6b61
[DOC] Update Set#empty? documentation
BurdetteLamar Jun 28, 2026
f3009a1
[DOC] Update Set#flatten documentation
BurdetteLamar Jun 28, 2026
73a6e69
[DOC] Update Set#flatten! documentation
BurdetteLamar Jun 28, 2026
40c2f61
[DOC] Update Set#inspect documentation
BurdetteLamar Jun 28, 2026
cf979af
[DOC] Update Set#intersect? documentation
BurdetteLamar Jun 28, 2026
d5c649d
[ruby/rubygems] Keep AtomicFileWriter temp path within MAX_PATH
hsbt Jun 26, 2026
4f84a74
Default stdin script encoding to UTF-8 on Windows
hsbt Jun 26, 2026
3ed667d
Exclude windows_31j locale encoding in kernel/require spec
hsbt Jun 26, 2026
b025977
Document Developer Mode requirement for symlink tests on Windows
hsbt Jun 26, 2026
556df6e
[DOC] Harmonize symlink methods
BurdetteLamar Jun 29, 2026
7402021
[DOC] Doc for Pathname#mtime
BurdetteLamar Jun 28, 2026
b5e6850
fake.rb: Use the just-built ruby for native gems when not cross compi…
hsbt Jun 27, 2026
f00181b
runruby.rb: Provide a CA bundle for the built ruby on Windows
hsbt Jun 27, 2026
2171753
[ruby/bundler] Skip make jobserver specs on Windows
hsbt Jun 27, 2026
d701adf
[ruby/bundler] Compute lockfile_path like the parser does in lockfile…
hsbt Jun 27, 2026
2343866
[ruby/bundler] Skip specs needing a same-drive temp dir on Windows
hsbt Jun 27, 2026
c27a4a3
[ruby/bundler] Only check drive mismatch on Windows
hsbt Jun 27, 2026
89af98c
[ruby/bundler] Skip parallel make specs on Windows
hsbt Jun 27, 2026
dc74fb4
[ruby/bundler] Skip more bundle exec specs on Windows
hsbt Jun 27, 2026
52ccfc1
[ruby/bundler] Skip the long cache path spec on Windows
hsbt Jun 27, 2026
5c5f846
[ruby/bundler] Skip the legacy windows cache spec on Windows
hsbt Jun 27, 2026
663c940
[ruby/bundler] Skip the add-platform lock spec on Windows
hsbt Jun 27, 2026
361e0a9
[ruby/bundler] Skip the build config Makefile specs on Windows
hsbt Jun 27, 2026
888f6e0
Keep bundler specs in their sandbox when temp is under the user home
hsbt Jun 27, 2026
90ac868
[ruby/bundler] Allow more time for spec commands on Windows
hsbt Jun 27, 2026
1bcc15d
Remove the tmp marker before removing the temp root
hsbt Jun 28, 2026
e66791a
[ruby/bundler] Skip the mswin-specific specs only on mswin, not mingw
hsbt Jun 28, 2026
89732c6
[ruby/rubygems] Bump yard from 0.9.42 to 0.9.44 in /spec/realworld/fi…
dependabot[bot] Jun 29, 2026
7eab0be
[ruby/rubygems] Satisfy rubocop on the forward-ported Windows specs
hsbt Jun 29, 2026
bf9ea8d
[ruby/rubygems] Add an mswin? spec helper for the Windows skips
hsbt Jun 29, 2026
dc3aae7
[ruby/rubygems] Build the raygun-apm mswin variant instead of skipping
hsbt Jun 29, 2026
c050a73
[ruby/rubygems] Trim the basename so the MAX_PATH guard actually shor…
hsbt Jun 29, 2026
0c432b6
Bump github.com/microsoft/vcpkg from master to 2026.06.24
dependabot[bot] Jun 29, 2026
af5128d
Bump the github-actions group across 2 directories with 5 updates
dependabot[bot] Jun 29, 2026
f2e09df
[DOC] Update Set#each documentation
BurdetteLamar Jun 29, 2026
d945702
[DOC] Update Set#include? documentation
BurdetteLamar Jun 29, 2026
a291454
[DOC] Update Set#join documentation
BurdetteLamar Jun 29, 2026
ee78659
[Bug] win32: create directory symlinks for relative directory targets
hsbt Jun 28, 2026
54f254a
win32: use MEMCPY for overflow-safe copy in w32_symlink
hsbt Jun 29, 2026
15dbb08
[Bug] win32: do not resolve a root-relative symlink target against th…
hsbt Jun 29, 2026
249de20
win32: rename the symlink target flag to independent
hsbt Jun 29, 2026
b52a02c
Fix default gem detection for nested out-of-tree builds
hsbt Jun 28, 2026
60ab493
Allow minitest failures when the diff command is unavailable
hsbt Jun 28, 2026
2bd880d
Allow rake failures on uninstalled out-of-tree builds
hsbt Jun 29, 2026
29357ab
Allow rbs failures when localhost cannot be resolved
hsbt Jun 29, 2026
01d6e48
Run force_activate spec script through ruby on Windows
hsbt Jun 29, 2026
09813e4
Don't quote the stat argument in File time subsecond specs
hsbt Jun 29, 2026
d3d4d33
Omit test_realpath_mount_point without mountvol privilege
hsbt Jun 29, 2026
4ef40e5
Account for Windows console stdin encoding in test_stdin
hsbt Jun 29, 2026
2a23415
[ruby/prism] Pop block stack _before_ ending in parenthesized method …
kddnewton Jun 23, 2026
1ca2d2d
Fix pm_compile_call for inline_new with keyword args
luke-gruber Jun 23, 2026
69eb398
ZJIT: Use interpreter IC in getivar fallback (#17559)
tekknolagi Jun 29, 2026
218cec6
ZJIT: Add regression tests for important type sizes (#17560)
tekknolagi Jun 29, 2026
263b1c8
more test-all skips
XrXr Jun 29, 2026
ae91097
Merge remote-tracking branch 'gh/master' into zjit-filter-send-with-b…
XrXr Jun 29, 2026
506a8ec
fixup skip
XrXr Jun 30, 2026
0571676
ZJIT: Bump the `--zjit-max-versions` default to 4
nirvdrum Jun 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/setup/directories/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ runs:
fetch-depth: ${{ inputs.fetch-depth }}
persist-credentials: false

- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ inputs.srcdir }}/.downloaded-cache
key: ${{ runner.os }}-${{ runner.arch }}-downloaded-cache
Expand All @@ -127,7 +127,7 @@ runs:
# because they are the ones that clone the complete set into gems/src; other
# jobs would otherwise save a partial gems/src and poison the shared key.
- if: inputs.bundled-gems-src-cache == 'true'
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ inputs.srcdir }}/gems/src
key: ${{ runner.os }}-${{ runner.arch }}-bundled-gems-src-${{ hashFiles(format('{0}/gems/bundled_gems', inputs.srcdir)) }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/modgc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
${SETARCH} ../src/configure -C --disable-install-doc --with-modular-gc="${MODULAR_GC_DIR}" \
${arch:+--target=$arch-$OSTYPE --host=$arch-$OSTYPE}

- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
with:
cache-bin: false
- name: Set MMTk environment variables
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tarball-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
shell: msys2 {0}
run: echo PATCH=$(cygpath -wa $(command -v patch)) >> $GITHUB_ENV
if: ${{ steps.setup-msys2.outcome == 'success' }}
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: C:\vcpkg\installed
key: ${{ runner.os }}-vcpkg-installed-${{ env.OS_VER }}-${{ github.sha }}
Expand All @@ -82,7 +82,7 @@ jobs:
run: 7z x pkg/*.zip
working-directory:

- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: snapshot-*/.downloaded-cache
key: downloaded-cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:

- name: Restore vcpkg artifact
id: restore-vcpkg
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: src\vcpkg_installed
key: windows-${{ matrix.os }}-vcpkg-${{ hashFiles('src/vcpkg.json') }}
Expand All @@ -104,7 +104,7 @@ jobs:
if: ${{ ! steps.restore-vcpkg.outputs.cache-hit }}

- name: Save vcpkg artifact
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: src\vcpkg_installed
key: windows-${{ matrix.os }}-vcpkg-${{ hashFiles('src/vcpkg.json') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/zjit-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
env:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
RUN_OPTS: ${{ matrix.run_opts }}
SPECOPTS: ${{ matrix.specopts }}
SPECOPTS: ${{ matrix.specopts }} -B../src/spec/zjit.mspec
TESTOPTS: ${{ matrix.testopts }}
RUST_BACKTRACE: 1
ZJIT_RB_BUG: 1
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
rustup install ${{ matrix.rust_version }} --profile minimal
rustup default ${{ matrix.rust_version }}

- uses: taiki-e/install-action@9e1e5806d4a4822de933115878265be9aaa786d9 # v2.82.2
- uses: taiki-e/install-action@9bcaee1dcae34154180f412e2fa69355a7cda9f6 # v2.82.6
with:
tool: nextest@0.9
if: ${{ matrix.test_task == 'zjit-check' }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/zjit-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
RUN_OPTS: ${{ matrix.run_opts }}
YJIT_BENCH_OPTS: ${{ matrix.yjit_bench_opts }}
SPECOPTS: ${{ matrix.specopts }}
SPECOPTS: ${{ matrix.specopts }} -B../src/spec/zjit.mspec
TESTOPTS: ${{ matrix.testopts }}
RUBY_DEBUG: ci
BUNDLE_JOBS: 8 # for yjit-bench
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
ruby-version: '3.1'
bundler: none

- uses: taiki-e/install-action@9e1e5806d4a4822de933115878265be9aaa786d9 # v2.82.2
- uses: taiki-e/install-action@9bcaee1dcae34154180f412e2fa69355a7cda9f6 # v2.82.6
with:
tool: nextest@0.9
if: ${{ matrix.test_task == 'zjit-check' }}
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ releases.
* 0.1.12 to [v0.1.13][repl_type_completor-v0.1.13], [v0.1.14][repl_type_completor-v0.1.14], [v0.1.15][repl_type_completor-v0.1.15]
* pstore 0.2.1
* 0.2.0 to [v0.2.1][pstore-v0.2.1]
* rdoc 7.2.0
* rdoc 8.0.0
* 7.0.3 to [v7.0.4][rdoc-v7.0.4], [v7.1.0][rdoc-v7.1.0], [v7.2.0][rdoc-v7.2.0]
* win32ole 1.9.3
* 1.9.2 to [v1.9.3][win32ole-v1.9.3]
Expand Down
25 changes: 24 additions & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,30 @@ yes-test-bundled-gems-spec: yes-test-all-precheck $(PREPARE_BUNDLED_GEMS)
no-test-bundled-gems-spec:


test-syntax-suggest:
test-syntax-suggest-precheck: $(TEST_RUNNABLE)-test-syntax-suggest-precheck
no-test-syntax-suggest-precheck:
yes-test-syntax-suggest-precheck: main

test-syntax-suggest-prepare: $(TEST_RUNNABLE)-test-syntax-suggest-prepare
no-test-syntax-suggest-prepare: no-test-syntax-suggest-precheck
yes-test-syntax-suggest-prepare: yes-test-syntax-suggest-precheck
$(ACTIONS_GROUP)
$(XRUBY) -C "$(srcdir)" bin/gem install --no-document \
--install-dir .bundle --conservative "rspec:~> 3"
$(ACTIONS_ENDGROUP)

RSPECOPTS =
SYNTAX_SUGGEST_SPECS =
PREPARE_SYNTAX_SUGGEST = $(TEST_RUNNABLE)-test-syntax-suggest-prepare
test-syntax-suggest: $(TEST_RUNNABLE)-test-syntax-suggest
yes-test-syntax-suggest: $(PREPARE_SYNTAX_SUGGEST)
$(ACTIONS_GROUP)
$(XRUBY) -C $(srcdir) -Ispec/syntax_suggest$(PATH_SEPARATOR)spec/lib .bundle/bin/rspec \
--require rspec/expectations \
--require spec_helper --require formatter_overrides --require spec_coverage \
$(RSPECOPTS) spec/syntax_suggest/$(SYNTAX_SUGGEST_SPECS)
$(ACTIONS_ENDGROUP)
no-test-syntax-suggest:

check: $(DOT_WAIT) $(PREPARE_SYNTAX_SUGGEST) test-syntax-suggest

Expand Down
5 changes: 5 additions & 0 deletions doc/distribution/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ sh ../../ruby/configure -C --disable-install-doc --with-opt-dir=C:\Users\usernam
of `cmd.exe`. If you want to enable it explicitly, run `cmd.exe` with
`/E:ON` option.

7. Some tests in `nmake check` create symbolic links. Enable
[Developer Mode](https://learn.microsoft.com/windows/apps/get-started/developer-mode-features-and-debugging)
(Settings > System > For developers) so that they do not fail with
`Permission denied @ rb_file_s_symlink`.

### How to compile and install

1. Execute `win32\configure.bat` on your build directory.
Expand Down
7 changes: 7 additions & 0 deletions ext/json/parser/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,13 @@ static inline VALUE json_decode_float(JSON_ParserConfig *config, uint64_t mantis
}

if (RB_UNLIKELY(mantissa_digits > 18 || mantissa_digits + exponent < -307)) {
// If the value is so small that it definitely underflows to 0.0, return early
// to avoid triggering a "Float out of range" warning from rb_cstr_to_dbl.
// When mantissa_digits + exponent < -324, value < 10^(-324) < DBL_TRUE_MIN/2,
// so it rounds to 0 in IEEE 754 round-to-nearest.
if (RB_UNLIKELY(mantissa_digits + exponent < -324)) {
return rb_float_new(negative ? -0.0 : 0.0);
}
return json_decode_large_float(start, end - start);
}

Expand Down
85 changes: 61 additions & 24 deletions file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1837,14 +1837,24 @@ rb_file_pipe_p(VALUE obj, VALUE fname)
}

/*
* :markup: markdown
*
* call-seq:
* File.symlink?(filepath) -> true or false
* File.symlink?(path) -> true or false
*
* Returns +true+ if +filepath+ points to a symbolic link, +false+ otherwise:
* Returns whether the entry at `path` is a symbolic link:
*
* symlink = File.symlink('t.txt', 'symlink')
* File.symlink?('symlink') # => true
* File.symlink?('t.txt') # => false
* ```ruby
* # Create paths.
* file_path = 'doc/extension.rdoc' # => "doc/extension.rdoc"
* target_path = File.join('..', file_path) # => "../doc/extension.rdoc"
* link_path = 'lib/u.tmp' # => "lib/u.tmp"
* File.symlink?(link_path) # => false
* # Create link and verify.
* File.symlink(target_path, link_path)
* File.symlink?(link_path) # => true
* File.delete(link_path) # Clean up.
* ```
*
*/

Expand Down Expand Up @@ -3511,15 +3521,27 @@ rb_file_s_link(VALUE klass, VALUE from, VALUE to)

#ifdef HAVE_SYMLINK
/*
* :markup: markdown
*
* call-seq:
* File.symlink(old_name, new_name) -> 0
* File.symlink(path, link_path) -> 0
*
* Creates a symbolic link called <i>new_name</i> for the existing file
* <i>old_name</i>. Raises a NotImplemented exception on
* platforms that do not support symbolic links.
* Not supported on some platforms.
*
* File.symlink("testfile", "link2test") #=> 0
* Creates a symbolic link at `link_path` to the entry at `path`:
*
* ```ruby
* # Create paths.
* file_path = 'doc/extension.rdoc' # => "doc/extension.rdoc"
* target_path = File.join('..', file_path) # => "../doc/extension.rdoc"
* link_path = 'lib/u.tmp' # => "lib/u.tmp"
* # Create link and verify.
* File.symlink(target_path, link_path)
* File.read(file_path) == File.read(link_path) # => true
* File.delete(link_path) # Clean up.
* ```
*
* See also: ::read, ::readlink, ::symlink?.
*/

static VALUE
Expand All @@ -3541,14 +3563,23 @@ rb_file_s_symlink(VALUE klass, VALUE from, VALUE to)

#ifdef HAVE_READLINK
/*
* :markup: markdown
*
* call-seq:
* File.readlink(link_name) -> file_name
* File.readlink(link_path) -> path
*
* Returns the name of the file referenced by the given link.
* Not available on all platforms.
* Returns the string path to the entry referenced by the given `link_path`:
*
* ```ruby
* # Create paths.
* file_path = 'doc/extension.rdoc' # => "doc/extension.rdoc"
* target_path = File.join('..', file_path) # => "../doc/extension.rdoc"
* link_path = 'lib/u.tmp' # => "lib/u.tmp"
* File.symlink(target_path, link_path)
* File.readlink(link_path) # => "../doc/extension.rdoc"
* File.delete(link_path) # Clean up.
* ```
*
* File.symlink("testfile", "link2test") #=> 0
* File.readlink("link2test") #=> "testfile"
*/

static VALUE
Expand Down Expand Up @@ -6415,18 +6446,24 @@ rb_stat_p(VALUE obj)
}

/*
* :markup: markdown
*
* call-seq:
* stat.symlink? -> true or false
* symlink? -> true or false
*
* Returns <code>true</code> if <i>stat</i> is a symbolic link,
* <code>false</code> if it isn't or if the operating system doesn't
* support this feature. As File::stat automatically follows symbolic
* links, #symlink? will always be <code>false</code> for an object
* returned by File::stat.
* Returns whether the entry in `self` is a symbolic link:
*
* File.symlink("testfile", "alink") #=> 0
* File.stat("alink").symlink? #=> false
* File.lstat("alink").symlink? #=> true
* ```ruby
* path = 'doc/t.tmp'
* link_path = 'lib/u.tmp'
* File.write(path, 'foo')
* File.symlink(path, link_path)
* File.stat(path).symlink? # => false
* File.stat(link_path).symlink? # Raises Errno::ENOENT; entry is not a file.
* File.lstat(link_path).symlink? # => true
* File.delete(path)
* File.delete(link_path)
* ```
*
*/

Expand Down
2 changes: 1 addition & 1 deletion gc/default/default.c
Original file line number Diff line number Diff line change
Expand Up @@ -9663,7 +9663,7 @@ gc_profile_disable(VALUE _)
return Qnil;
}

void
static void
rb_gc_verify_internal_consistency(void)
{
gc_verify_internal_consistency(rb_gc_get_objspace());
Expand Down
2 changes: 1 addition & 1 deletion gems/bundled_gems
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ostruct 0.6.3 https://github.com/ruby/ostruct
pstore 0.2.1 https://github.com/ruby/pstore
benchmark 0.5.0 https://github.com/ruby/benchmark
logger 1.7.0 https://github.com/ruby/logger
rdoc 7.2.0 https://github.com/ruby/rdoc a8df5c5d03b63cf05425bf676644688ac673a329
rdoc 8.0.0 https://github.com/ruby/rdoc
win32ole 1.9.3 https://github.com/ruby/win32ole
irb 1.18.0 https://github.com/ruby/irb
reline 0.6.3 https://github.com/ruby/reline
Expand Down
6 changes: 1 addition & 5 deletions imemo.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,11 +645,7 @@ rb_imemo_free(VALUE obj)
case imemo_callinfo:{
const struct rb_callinfo *ci = ((const struct rb_callinfo *)obj);

if (ci->kwarg) {
if (RUBY_ATOMIC_FETCH_SUB(((struct rb_callinfo_kwarg *)ci->kwarg)->references, 1) == 1) {
ruby_xfree_sized((void *)ci->kwarg, rb_callinfo_kwarg_bytes(ci->kwarg->keyword_len));
}
}
rb_callinfo_kwarg_release((struct rb_callinfo_kwarg *)ci->kwarg);
RB_DEBUG_COUNTER_INC(obj_imemo_callinfo);

break;
Expand Down
28 changes: 0 additions & 28 deletions include/ruby/internal/core/robject.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,32 +116,4 @@ struct RObject {
} as;
};

RBIMPL_ATTR_PURE_UNLESS_DEBUG()
RBIMPL_ATTR_ARTIFICIAL()
/**
* Queries the instance variables.
*
* @param[in] obj Object in question.
* @return Its instance variables, in C array.
* @pre `obj` must be an instance of ::RObject.
*
* @internal
*
* @shyouhei finds no reason for this to be visible from extension libraries.
*/
static inline VALUE *
ROBJECT_FIELDS(VALUE obj)
{
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);

struct RObject *const ptr = ROBJECT(obj);

if (RB_UNLIKELY(RB_FL_ANY_RAW(obj, ROBJECT_HEAP))) {
return ptr->as.heap.fields;
}
else {
return ptr->as.ary;
}
}

#endif /* RBIMPL_ROBJECT_H */
15 changes: 15 additions & 0 deletions internal/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,21 @@ RBASIC_SET_CLASS(VALUE obj, VALUE klass)
RB_OBJ_WRITTEN(obj, oldv, klass);
}

static inline VALUE *
ROBJECT_FIELDS(VALUE obj)
{
RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);

struct RObject *const ptr = ROBJECT(obj);

if (RB_UNLIKELY(RB_FL_ANY_RAW(obj, ROBJECT_HEAP))) {
return ptr->as.heap.fields;
}
else {
return ptr->as.ary;
}
}

static inline size_t
rb_obj_embedded_size(uint32_t fields_count)
{
Expand Down
Loading
Loading