Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e1864fd
Show failures as diagnostics
nobu Aug 19, 2026
f288c7e
Check for __has_builtin fallbacks
nobu Aug 19, 2026
3789338
Continue all checks even if earlier checks failed
nobu Aug 19, 2026
21ed8de
Add fallbacks for `__builtin_bswap128` and `__builtin_memcpy`
nobu Aug 19, 2026
bb84784
Enable long path names on Windows without the registry value
hsbt Jul 28, 2026
b81e0d4
Set the long path bit for embedded interpreters too
hsbt Aug 6, 2026
771de37
Set the long path bit only in ruby_setup
hsbt Aug 19, 2026
0b233f3
Use ISEQ_BODY macro
peterzhu2118 Aug 19, 2026
b307322
Check dependencies in check_misc.yml
nobu Aug 19, 2026
319849b
[ruby/openssl] pkey: avoid using {DH,DSA,RSA}#public_key in docs and …
rhenium Aug 14, 2026
d9c8673
Add comment for local_table
peterzhu2118 Aug 19, 2026
08ccbae
Add missing lvar_states in rb_iseq_memsize
peterzhu2118 Aug 19, 2026
b61e03c
Add missing outer_variables in rb_iseq_memsize
peterzhu2118 Aug 19, 2026
f7f3757
Compare full version info of rustc to avoid E0514
nobu Aug 19, 2026
bd19fae
MMTK: Reserve slot room for one embedded field
eightbitraptor Aug 13, 2026
35b6516
Allow EC-less threads in rb_vm_ep_in_heap_p
eightbitraptor Aug 13, 2026
83187c9
MMTK: report shref edges as always protected
eightbitraptor Aug 13, 2026
c3e04e3
MMTK: Allow debug cc checks on EC-less GC threads
eightbitraptor Aug 13, 2026
d40f16f
Ractor: Assert live status in root scan callers only
eightbitraptor Aug 13, 2026
38dbe92
Don't write a shape into a dead weak table key
eightbitraptor Aug 13, 2026
5d3ac10
Allow shapes to carry zero embedded capacity
eightbitraptor Aug 14, 2026
0293d6d
ZJIT: Pass JIT-to-JIT call args on the stack
k0kubun Aug 14, 2026
64b9d2f
ZJIT: Allow STP with an identical register pair
k0kubun Aug 18, 2026
4a6b7fa
ZJIT: Rename stack-args tests after ABI registers
k0kubun Aug 18, 2026
e188732
ZJIT: Extract c_arg_location() for C-ABI argument locations
k0kubun Aug 18, 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
42 changes: 0 additions & 42 deletions .github/workflows/check_dependencies.yml

This file was deleted.

39 changes: 32 additions & 7 deletions .github/workflows/check_misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,43 @@ jobs:

- name: Check for bash specific substitution in configure.ac
run: |
git grep -n '\${[A-Za-z_0-9]*/' -- configure.ac && exit 1 || :
git grep -n '\${[A-Za-z_0-9]*/' -- configure.ac | sed "s/^/::error::/"
test ${PIPESTATUS[0]} != 0
if: always()

- name: Check for header macros
run: |
fail=
for header in ruby/*.h; do
git grep -l -F -e $header -e HAVE_`echo $header | tr a-z./ A-Z__` -- . > /dev/null && continue
fail=1
echo $header
echo "::error::$header"
done
exit $fail
working-directory: include
if: always()

- name: Check for __has_builtin functions
run: |
missing=()
for check in $(git grep -h --no-line-number -o '__has_builtin(__[_a-zA-Z0-9]*)' | sort -u); do
func="${check#__has_builtin(}"
func="${func%)}"
git -P grep -w "RBIMPL_HAS_BUILTIN_$func" > /dev/null || missing+=("-e" "$check")
done
[ ${#missing[@]} = 0 ] || {
echo "::error::Missing __has_builtin fallbacks:"
git -P grep -F "${missing[@]}" | sed 's/^/::error::/' | head
false
}
if: always()

- id: now
run: |
date +"mon=%-m"%n"day=%-d" >> $GITHUB_OUTPUT
env:
TZ: Asia/Tokyo
if: always()

- id: deprecation
run: |
Expand All @@ -92,12 +111,17 @@ jobs:
true
fi
continue-on-error: ${{ steps.now.outputs.mon < 12 }}
if: always()

- run: make check-depends
if: always()

- name: Check if to generate documents
id: rdoc
run: |
set -- $(sed 's/#.*//;/^rdoc /!d' gems/bundled_gems)
{ echo version=$2; echo ref=$4; } >> $GITHUB_OUTPUT
if: always()

- name: Checkout rdoc
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -106,7 +130,7 @@ jobs:
ref: ${{ steps.rdoc.outputs.ref }}
path: .bundle/gems/rdoc-${{ steps.rdoc.outputs.version }}
persist-credentials: false
if: ${{ steps.rdoc.outputs.ref != '' }}
if: ${{ always() && steps.rdoc.outputs.ref != '' }}

- name: Generate rdoc scripts
run: |
Expand All @@ -118,11 +142,12 @@ jobs:
bundle install --jobs 4
bundle exec rake generate
working-directory: .bundle/gems/rdoc-${{ steps.rdoc.outputs.version }}
if: ${{ steps.rdoc.outputs.ref != '' }}
if: ${{ always() && steps.rdoc.outputs.ref != '' }}

- name: Core docs coverage
run: |
make XRUBY=ruby RDOC_DEPENDS= RBCONFIG=update-rbconfig rdoc-coverage
if: always()

- name: Generate docs
id: docs
Expand All @@ -131,19 +156,19 @@ jobs:
echo htmlout=ruby-html-${GITHUB_SHA:0:10} >> $GITHUB_OUTPUT
# Generate only when document commit/PR
if: >-
${{false
${{always() && (false
|| contains(github.event.head_commit.message, '[ruby/rdoc]')
|| contains(github.event.head_commit.message, '[DOC]')
|| contains(github.event.pull_request.title, '[DOC]')
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
}}
)}}

- name: Upload docs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
path: html
name: ${{ steps.docs.outputs.htmlout }}
if: ${{ steps.docs.outcome == 'success' }}
if: ${{ always() && steps.docs.outcome == 'success' }}

- uses: ./.github/actions/slack
with:
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ Ruby 4.0 bundled RubyGems and Bundler version 4. see the following links for det
* SunOS 4 (Solaris, i.e. SunOS 5, is unaffected)
* BSD/OS (BSDi)

* Windows 10 1703 or later no longer needs the `LongPathsEnabled` registry
value to use paths longer than 260 characters. This applies to any process
running the interpreter, including a program which embeds libruby. Each path
component is still limited to 255 characters, and a child process still
starts with the `MAX_PATH` limited current directory. [[Bug #18947]]

## Compatibility issues

* `Kernel#at_exit` and `END {}` now raise `Ractor::IsolationError` when called
Expand Down Expand Up @@ -327,6 +333,7 @@ A lot of work has gone into making Ractors more stable, performant, and usable.

## JIT

[Bug #18947]: https://bugs.ruby-lang.org/issues/18947
[Feature #8948]: https://bugs.ruby-lang.org/issues/8948
[Feature #9779]: https://bugs.ruby-lang.org/issues/9779
[Feature #15330]: https://bugs.ruby-lang.org/issues/15330
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2366,6 +2366,7 @@ RUBY_CHECK_BUILTIN_FUNC(__builtin_assume_aligned, [__builtin_assume_aligned((voi
RUBY_CHECK_BUILTIN_FUNC(__builtin_bswap16, [__builtin_bswap16(0)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_bswap32, [__builtin_bswap32(0)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_bswap64, [__builtin_bswap64(0)])
test "$ac_cv_sizeof___int128" = 0 || RUBY_CHECK_BUILTIN_FUNC(__builtin_bswap128, [__builtin_bswap128(0)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_popcount, [__builtin_popcount(0)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_popcountll, [__builtin_popcountll(0)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_clz, [__builtin_clz(0)])
Expand Down
6 changes: 3 additions & 3 deletions defs/jit.mk
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ rustc-version-check: target/.rustc-version

target/.rustc-version: PHONY
$(eval prev_version := $(if $(wildcard $@),$(shell cat $@)))
$(eval curr_version := $(shell $(RUSTC) -V | cut -d' ' -f2))
$(eval curr_version := $(shell $(RUSTC) -V))
$(eval clean := $(filter-out $(prev_version),$(curr_version)))
$(if $(clean),$(ECHO) Cleaning $(@D) for rustc $(curr_version))
$(if $(clean),$(ECHO) "Cleaning $(@D) for $(curr_version)")
$(if $(clean),$(Q)$(RMALL) $(@D))
$(if $(clean),$(Q)$(MAKEDIRS) $(@D))
$(if $(clean),$(Q)echo $(curr_version) > $@)
$(if $(clean),$(Q)echo "$(curr_version)" > $@)

# For Darwin only: a list of symbols that we want the glommed Rust static lib to export.
# Unfortunately, using wildcard like '_rb_*' with -exported-symbol does not work, at least
Expand Down
3 changes: 3 additions & 0 deletions eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ ruby_setup(void)
*/
#if defined(__linux__) && defined(PR_SET_THP_DISABLE)
prctl(PR_SET_THP_DISABLE, 1, 0, 0, 0);
#endif
#if defined(_WIN32)
rb_w32_init_long_paths();
#endif
Init_BareVM();
rb_vm_encoded_insn_data_table_init();
Expand Down
6 changes: 3 additions & 3 deletions ext/openssl/ossl.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ ossl_crypto_fixed_length_secure_compare(VALUE dummy, VALUE str1, VALUE str2)
* cert.not_before = Time.now
* cert.not_after = Time.now + 3600
*
* cert.public_key = key.public_key
* cert.public_key = key
* cert.subject = name
*
* === Certificate Extensions
Expand Down Expand Up @@ -836,7 +836,7 @@ ossl_crypto_fixed_length_secure_compare(VALUE dummy, VALUE str1, VALUE str2)
* ca_cert.not_before = Time.now
* ca_cert.not_after = Time.now + 86400
*
* ca_cert.public_key = ca_key.public_key
* ca_cert.public_key = ca_key
* ca_cert.subject = ca_name
* ca_cert.issuer = ca_name
*
Expand Down Expand Up @@ -878,7 +878,7 @@ ossl_crypto_fixed_length_secure_compare(VALUE dummy, VALUE str1, VALUE str2)
* csr = OpenSSL::X509::Request.new
* csr.version = 0
* csr.subject = name
* csr.public_key = key.public_key
* csr.public_key = key
* csr.sign key, OpenSSL::Digest.new('SHA1')
*
* A CSR is saved to disk and sent to the CA for signing.
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/ossl_ns_spki.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ ossl_spki_verify(VALUE self, VALUE key)
* key = OpenSSL::PKey::RSA.new 2048
* spki = OpenSSL::Netscape::SPKI.new
* spki.challenge = "RandomChallenge"
* spki.public_key = key.public_key
* spki.public_key = key
* spki.sign(key, OpenSSL::Digest.new('SHA256'))
* #send a request containing this to a server generating a certificate
* === Verifying an SPKI request
Expand Down
4 changes: 2 additions & 2 deletions ext/openssl/ossl_pkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ ossl_pkey_compare(VALUE self, VALUE other)
* signature = pkey.sign("SHA256", data, signopts)
*
* # Creates a copy of the RSA key pkey, but without the private components
* pub_key = pkey.public_key
* pub_key = OpenSSL::PKey.read(pkey.public_to_der)
* puts pub_key.verify("SHA256", signature, data, signopts) # => true
*/
static VALUE
Expand Down Expand Up @@ -1350,7 +1350,7 @@ ossl_pkey_verify(int argc, VALUE *argv, VALUE self)
* signature = pkey.sign_raw("SHA256", hash, signopts)
*
* # Creates a copy of the RSA key pkey, but without the private components
* pub_key = pkey.public_key
* pub_key = OpenSSL::PKey.read(pkey.public_to_der)
* puts pub_key.verify_raw("SHA256", signature, hash, signopts) # => true
*/
static VALUE
Expand Down
4 changes: 2 additions & 2 deletions ext/openssl/ossl_x509cert.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ Init_ossl_x509cert(void)
* root_ca.serial = 1
* root_ca.subject = OpenSSL::X509::Name.parse "/DC=org/DC=ruby-lang/CN=Ruby CA"
* root_ca.issuer = root_ca.subject # root CA's are "self-signed"
* root_ca.public_key = root_key.public_key
* root_ca.public_key = root_key
* root_ca.not_before = Time.now
* root_ca.not_after = root_ca.not_before + 2 * 365 * 24 * 60 * 60 # 2 years validity
* ef = OpenSSL::X509::ExtensionFactory.new
Expand All @@ -943,7 +943,7 @@ Init_ossl_x509cert(void)
* cert.serial = 2
* cert.subject = OpenSSL::X509::Name.parse "/DC=org/DC=ruby-lang/CN=Ruby certificate"
* cert.issuer = root_ca.subject # root CA is the issuer
* cert.public_key = key.public_key
* cert.public_key = key
* cert.not_before = Time.now
* cert.not_after = cert.not_before + 1 * 365 * 24 * 60 * 60 # 1 years validity
* ef = OpenSSL::X509::ExtensionFactory.new
Expand Down
4 changes: 3 additions & 1 deletion gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4722,7 +4722,9 @@ vm_weak_table_gen_fields_foreach(st_data_t key, st_data_t value, st_data_t data)
// set the shape on it so that the GC finalizer won't try to remove
// it again. A "root shape" indicates to the GC that this object
// has no fields on it, hence it won't be in the gen fields table.
RBASIC_SET_SHAPE_ID((VALUE)key, ROOT_SHAPE_ID);
if (BUILTIN_TYPE((VALUE)key) != T_NONE) {
RBASIC_SET_SHAPE_ID((VALUE)key, ROOT_SHAPE_ID);
}
return ST_DELETE;

case ST_REPLACE: {
Expand Down
2 changes: 1 addition & 1 deletion gc/mmtk/mmtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ bool
rb_gc_impl_shref_marked_p(void *objspace_ptr, VALUE obj)
{
/* With a single objspace there is no cross-objspace pinning to track. */
return false;
return true;
}

size_t
Expand Down
3 changes: 3 additions & 0 deletions include/ruby/internal/has/builtin.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#ifndef __OpenBSD__
# define RBIMPL_HAS_BUILTIN___builtin_bswap32 RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
# define RBIMPL_HAS_BUILTIN___builtin_bswap64 RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
# define RBIMPL_HAS_BUILTIN___builtin_bswap128 RBIMPL_COMPILER_SINCE(GCC, 11, 1, 0)
#endif
# define RBIMPL_HAS_BUILTIN___builtin_clz RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
# define RBIMPL_HAS_BUILTIN___builtin_clzl RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
Expand All @@ -66,6 +67,7 @@
# define RBIMPL_HAS_BUILTIN___builtin_ctzl RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
# define RBIMPL_HAS_BUILTIN___builtin_ctzll RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
# define RBIMPL_HAS_BUILTIN___builtin_expect RBIMPL_COMPILER_SINCE(GCC, 3, 0, 0)
# define RBIMPL_HAS_BUILTIN___builtin_memcpy RBIMPL_COMPILER_SINCE(GCC, 3, 0, 0) // or older
# define RBIMPL_HAS_BUILTIN___builtin_mul_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0)
# define RBIMPL_HAS_BUILTIN___builtin_mul_overflow_p RBIMPL_COMPILER_SINCE(GCC, 7, 0, 0)
# define RBIMPL_HAS_BUILTIN___builtin_popcount RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
Expand All @@ -92,6 +94,7 @@
# define RBIMPL_HAS_BUILTIN___builtin_bswap16 HAVE_BUILTIN___BUILTIN_BSWAP16
# define RBIMPL_HAS_BUILTIN___builtin_bswap32 HAVE_BUILTIN___BUILTIN_BSWAP32
# define RBIMPL_HAS_BUILTIN___builtin_bswap64 HAVE_BUILTIN___BUILTIN_BSWAP64
# define RBIMPL_HAS_BUILTIN___builtin_bswap128 HAVE_BUILTIN___BUILTIN_BSWAP128
# define RBIMPL_HAS_BUILTIN___builtin_clz HAVE_BUILTIN___BUILTIN_CLZ
# define RBIMPL_HAS_BUILTIN___builtin_clzl HAVE_BUILTIN___BUILTIN_CLZL
# define RBIMPL_HAS_BUILTIN___builtin_clzll HAVE_BUILTIN___BUILTIN_CLZLL
Expand Down
5 changes: 5 additions & 0 deletions internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
/* internal/symbol.h */
#define rb_sym_intern_ascii_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)

#ifdef _WIN32
/* win32/win32.c */
void rb_w32_init_long_paths(void);
#endif


/* MRI debug support */

Expand Down
9 changes: 6 additions & 3 deletions iseq.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,14 +543,17 @@ rb_iseq_memsize(const rb_iseq_t *iseq)
size += sizeof(struct rb_iseq_constant_body);
size += body->iseq_size * sizeof(VALUE);
size += body->insns_info.size * (sizeof(struct iseq_insn_info_entry) + sizeof(unsigned int));
size += body->local_table_size * sizeof(ID);
size += body->local_table_size * sizeof(ID); // body->local_table
if (body->lvar_states) size += body->local_table_size * sizeof(enum lvar_state);
size += ISEQ_MBITS_BUFLEN(body->iseq_size) * ISEQ_MBITS_SIZE;
if (body->catch_table) {
size += iseq_catch_table_bytes(body->catch_table->size);
}
size += (body->param.opt_num + 1) * sizeof(VALUE);
size += param_keyword_size(body->param.keyword);

if (body->outer_variables) size += rb_id_table_memsize(body->outer_variables);

/* body->is_entries */
size += ISEQ_IS_SIZE(body) * sizeof(union iseq_inline_storage_entry);

Expand Down Expand Up @@ -2951,9 +2954,9 @@ rb_iseq_disasm_recursive(const rb_iseq_t *iseq, VALUE indent)
rb_str_modify_expand(str, header_minlen - l);
memset(RSTRING_END(str), '=', header_minlen - l);
}
if (iseq->body->builtin_attrs) {
if (ISEQ_BODY(iseq)->builtin_attrs) {
#define disasm_builtin_attr(str, iseq, attr) \
if (iseq->body->builtin_attrs & BUILTIN_ATTR_ ## attr) { \
if (ISEQ_BODY(iseq)->builtin_attrs & BUILTIN_ATTR_ ## attr) { \
rb_str_cat2(str, " " #attr); \
}
disasm_builtin_attr(str, iseq, LEAF);
Expand Down
Loading