Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
070b7d4
ZJIT: constant fold bitwise AND (&) operations (#16226)
tomascco Feb 23, 2026
f3ee4bd
ZJIT: Remove redundant snapshot for opt_getconstant_path (#16229)
nozomemein Feb 23, 2026
b479c41
Use .bundle gems dependencies directly
hsbt Feb 24, 2026
8e9eb69
Freeze singleton class chain
jeremyevans Mar 14, 2024
997ac19
ZJIT: Remove redundant PatchPoints within basic blocks (#16231)
rwstauner Feb 24, 2026
fc16000
CI: Highlight diff of depend files [ci skip]
nobu Feb 23, 2026
70c6251
Use rev-parse HEAD instead of log --format=%H -1
nurse Feb 24, 2026
682f36a
Update bundled gems list as of 2026-02-24
matzbot Feb 24, 2026
ebd5785
[ruby/prism] Fix some locations in the the config
Earlopain Feb 23, 2026
3aa8927
[ruby/prism] Introduce xfree_sized and xrealloc_sized
byroot Feb 1, 2026
c1f7039
Remove rb_imemo_tmpbuf_set_ptr
jhawthorn Feb 20, 2026
7a36808
Use rb_alloc_tmp_buffer in new_from_an_RString
jhawthorn Feb 20, 2026
4b4da98
Avoid and simplify rb_alloc_tmp_buffer_with_count
jhawthorn Feb 20, 2026
56bdb93
Remove man page date check
jhawthorn Feb 24, 2026
7e028b8
ZJIT: Pull out GetEP from IsBlockParamModified (#16234)
tekknolagi Feb 24, 2026
7da5756
ZJIT: Refine effects for IsBitNotEqual and FixnumBitCheck to Empty (#…
rwstauner Feb 24, 2026
f1c2faf
ZJIT: Ratchet down Guard* effects (#16236)
tekknolagi Feb 24, 2026
c5d85d5
Improve error message failing to copy proc
jhawthorn Feb 22, 2026
da1daba
ZJIT: Refine effects for CheckInterrupts to InterruptFlag|Control (#1…
rwstauner Feb 25, 2026
9aa3dc6
[ruby/json] Remove unused load_uint8x16_4 function.
samyron Feb 25, 2026
fb39d58
[ruby/prism] rbs-inline
kddnewton Feb 17, 2026
bc1d75a
[ruby/prism] Don't document rbs inline magic comment
Earlopain Feb 18, 2026
0271319
[ruby/prism] Generate RBI from RBS
kddnewton Feb 22, 2026
b52cb82
ZJIT: Format negative offsets as small negative hex values (#16248)
tekknolagi Feb 25, 2026
2168fdb
Move class pre-aging out of the allocation path
eightbitraptor Feb 25, 2026
ad380f8
Correct timezone type: It's Asia/Tokyo, not Tokyo/Asia
eightbitraptor Feb 25, 2026
b3a1286
Avoid duplicate struct name in rb_raw_obj_info
jhawthorn Feb 24, 2026
9ab1dfa
ZJIT: Decouple gen_function_stub and gen_function_stub_hit_trampoline…
tenderlove Feb 25, 2026
319de3c
git must in in the source tree instead of the build directory
nobu Feb 26, 2026
3a7f3cf
[ruby/openssl] Fix missing error check on BIO_get_mem_ptr()
ndossche Feb 25, 2026
64fdfb7
[ruby/openssl] Fix memory leak if sk_push fails
ndossche Feb 24, 2026
8eab317
Convert cc_refinement_table into TypedData object
jhawthorn Feb 25, 2026
4455fdc
Mark callcache as !needs_cleanup_p
jhawthorn Feb 25, 2026
b4aa746
ZJIT: Fix ArgumentError for hash as positional arg to keyword-only me…
ykawabata17 Feb 26, 2026
01b413c
ZJIT: Refine singleton class invariant to only invalidate on method s…
tekknolagi Feb 26, 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
2 changes: 1 addition & 1 deletion .github/workflows/check_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- run: make fix-depends

- run: git diff --no-ext-diff --ignore-submodules --exit-code
- run: git diff --color --no-ext-diff --ignore-submodules --exit-code

- uses: ./.github/actions/slack
with:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/check_misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
run: |
date +"mon=%-m"%n"day=%-d" >> $GITHUB_OUTPUT
env:
TZ: Tokyo/Asia
TZ: Asia/Tokyo

- id: deprecation
run: |
Expand All @@ -82,11 +82,6 @@ jobs:
fi
continue-on-error: ${{ steps.now.outputs.mon < 12 }}

- name: Check if date in man pages is up-to-date
run: |
make V=1 GIT=git BASERUBY=ruby update-man-date
git diff --color --no-ext-diff --ignore-submodules --exit-code -- man

- name: Check if to generate documents
id: rdoc
run: |
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ releases.

### The following bundled gems are updated.

* minitest 6.0.1
* minitest 6.0.2
* test-unit 3.7.7
* rss 0.3.2
* net-imap 0.6.3
Expand Down
6 changes: 3 additions & 3 deletions bootstraptest/test_ractor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -507,14 +507,14 @@ def test n
}

# To copy the object, now Marshal#dump is used
assert_equal "allocator undefined for Thread", %q{
assert_match /can not copy unshareable object/, %q{
obj = Thread.new{}
begin
r = Ractor.new obj do |msg|
msg
end
rescue TypeError => e
e.message #=> no _dump_data is defined for class Thread
rescue Ractor::Error => e
e.message
else
'ng'
end
Expand Down
23 changes: 12 additions & 11 deletions class.c
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,6 @@ make_singleton_class(VALUE obj)
RBASIC_SET_CLASS(obj, klass);
rb_singleton_class_attached(klass, obj);
rb_yjit_invalidate_no_singleton_class(orig_class);
rb_zjit_invalidate_no_singleton_class(orig_class);

SET_METACLASS_OF(klass, METACLASS_OF(rb_class_real(orig_class)));
return klass;
Expand Down Expand Up @@ -2884,16 +2883,18 @@ singleton_class_of(VALUE obj, bool ensure_eigenclass)
}

void
rb_freeze_singleton_class(VALUE x)
{
/* should not propagate to meta-meta-class, and so on */
if (!RCLASS_SINGLETON_P(x)) {
VALUE klass = RBASIC_CLASS(x);
if (klass && // no class when hidden from ObjectSpace
FL_TEST_RAW(klass, FL_SINGLETON) &&
!OBJ_FROZEN_RAW(klass)) {
OBJ_FREEZE(klass);
}
rb_freeze_singleton_class(VALUE attached_object)
{
VALUE klass;

/* Freeze singleton classes of singleton class, as singleton class is frozen, and so on */
/* In each iteration, check the current object's class pointer is the singleton class of the object. */
while ((klass = RBASIC_CLASS(attached_object)) &&
FL_TEST_RAW(klass, FL_SINGLETON) &&
!OBJ_FROZEN_RAW(klass) &&
(RCLASS_ATTACHED_OBJECT(klass) == attached_object)) {
attached_object = klass;
OBJ_FREEZE(attached_object);
}
}

Expand Down
4 changes: 2 additions & 2 deletions defs/gmake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ pull-github: fetch-github
$(call pull-github,$(PR))

define pull-github
$(eval GITHUB_MERGE_BASE := $(shell $(GIT_LOG_FORMAT)%H -1)
$(eval GITHUB_MERGE_BASE := $(shell $(GIT_IN_SRC) rev-parse HEAD)
$(eval GITHUB_MERGE_BRANCH := $(shell $(GIT_IN_SRC) symbolic-ref --short HEAD))
$(eval GITHUB_MERGE_WORKTREE := $(shell mktemp -d "$(srcdir)/gh-$(1)-XXXXXX"))
$(GIT_IN_SRC) worktree prune
Expand Down Expand Up @@ -434,7 +434,7 @@ ifneq ($(DOT_WAIT),)
endif

ifeq ($(HAVE_GIT),yes)
REVISION_LATEST := $(shell $(GIT_LOG_FORMAT)%H -1 2>/dev/null)
REVISION_LATEST := $(shell $(GIT_IN_SRC) rev-parse HEAD)
else
REVISION_LATEST := update
endif
Expand Down
10 changes: 0 additions & 10 deletions ext/json/simd/simd.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,6 @@ ALWAYS_INLINE(static) int string_scan_simd_neon(const char **ptr, const char *en
return 0;
}

static inline uint8x16x4_t load_uint8x16_4(const unsigned char *table)
{
uint8x16x4_t tab;
tab.val[0] = vld1q_u8(table);
tab.val[1] = vld1q_u8(table+16);
tab.val[2] = vld1q_u8(table+32);
tab.val[3] = vld1q_u8(table+48);
return tab;
}

#endif /* ARM Neon Support.*/

#if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64)
Expand Down
6 changes: 5 additions & 1 deletion ext/openssl/ossl.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ ossl_##name##_ary2sk0(VALUE ary) \
" of class ##type##"); \
} \
x = dup(val); /* NEED TO DUP */ \
sk_##type##_push(sk, x); \
if (!sk_##type##_push(sk, x)) { \
type##_free(x); \
sk_##type##_pop_free(sk, type##_free); \
ossl_raise(eOSSLError, NULL); \
} \
} \
return (VALUE)sk; \
} \
Expand Down
6 changes: 5 additions & 1 deletion ext/openssl/ossl_bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ ossl_membio2str(BIO *bio)
int state;
BUF_MEM *buf;

BIO_get_mem_ptr(bio, &buf);
if (BIO_get_mem_ptr(bio, &buf) <= 0) {
BIO_free(bio);
ossl_raise(eOSSLError, "BIO_get_mem_ptr");
}

ret = ossl_str_new(buf->data, buf->length, &state);
BIO_free(bio);
if (state)
Expand Down
44 changes: 1 addition & 43 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1278,6 +1278,7 @@ rb_gc_obj_needs_cleanup_p(VALUE obj)
case imemo_ifunc:
case imemo_memo:
case imemo_svar:
case imemo_callcache:
case imemo_throw_data:
return false;
default:
Expand Down Expand Up @@ -2270,15 +2271,6 @@ rb_gc_obj_free_vm_weak_references(VALUE obj)
break;
case T_IMEMO:
switch (imemo_type(obj)) {
case imemo_callcache: {
const struct rb_callcache *cc = (const struct rb_callcache *)obj;

if (vm_cc_refinement_p(cc)) {
rb_vm_delete_cc_refinement(cc);
}

break;
}
case imemo_callinfo:
rb_vm_ci_free((const struct rb_callinfo *)obj);
break;
Expand Down Expand Up @@ -4062,23 +4054,6 @@ vm_weak_table_foreach_update_weak_key(st_data_t *key, st_data_t *value, st_data_
return ret;
}

static int
vm_weak_table_cc_refinement_foreach(st_data_t key, st_data_t data, int error)
{
struct global_vm_table_foreach_data *iter_data = (struct global_vm_table_foreach_data *)data;

return iter_data->callback((VALUE)key, iter_data->data);
}

static int
vm_weak_table_cc_refinement_foreach_update_update(st_data_t *key, st_data_t data, int existing)
{
struct global_vm_table_foreach_data *iter_data = (struct global_vm_table_foreach_data *)data;

return iter_data->update_callback((VALUE *)key, iter_data->data);
}


static int
vm_weak_table_sym_set_foreach(VALUE *sym_ptr, void *data)
{
Expand Down Expand Up @@ -4275,17 +4250,6 @@ rb_gc_vm_weak_table_foreach(vm_table_foreach_callback_func callback,
);
break;
}
case RB_GC_VM_CC_REFINEMENT_TABLE: {
if (vm->cc_refinement_table) {
set_foreach_with_replace(
vm->cc_refinement_table,
vm_weak_table_cc_refinement_foreach,
vm_weak_table_cc_refinement_foreach_update_update,
(st_data_t)&foreach_data
);
}
break;
}
case RB_GC_VM_WEAK_TABLE_COUNT:
rb_bug("Unreachable");
default:
Expand Down Expand Up @@ -5054,12 +5018,6 @@ rb_raw_obj_info_buitin_type(char *const buff, const size_t buff_size, const VALU
APPEND_F("r:%d", r->pub.id);
}
}
else {
const char * const type_name = rb_objspace_data_type_name(obj);
if (type_name) {
APPEND_F("%s", type_name);
}
}
break;
}
case T_IMEMO: {
Expand Down
16 changes: 10 additions & 6 deletions gc/default/default.c
Original file line number Diff line number Diff line change
Expand Up @@ -2175,10 +2175,6 @@ newobj_init(VALUE klass, VALUE flags, int wb_protected, rb_objspace_t *objspace,
RBASIC(obj)->shape_id = 0;
#endif

int t = flags & RUBY_T_MASK;
if (t == T_CLASS || t == T_MODULE || t == T_ICLASS) {
RVALUE_AGE_SET_CANDIDATE(objspace, obj);
}

#if RACTOR_CHECK_MODE
void rb_ractor_setup_belonging(VALUE obj);
Expand Down Expand Up @@ -4407,8 +4403,16 @@ gc_aging(rb_objspace_t *objspace, VALUE obj)

if (!RVALUE_PAGE_WB_UNPROTECTED(page, obj)) {
if (!RVALUE_OLD_P(objspace, obj)) {
gc_report(3, objspace, "gc_aging: YOUNG: %s\n", rb_obj_info(obj));
RVALUE_AGE_INC(objspace, obj);
int t = BUILTIN_TYPE(obj);
if (t == T_CLASS || t == T_MODULE || t == T_ICLASS) {
gc_report(3, objspace, "gc_aging: YOUNG class: %s\n", rb_obj_info(obj));
RVALUE_AGE_SET(obj, RVALUE_OLD_AGE);
RVALUE_OLD_UNCOLLECTIBLE_SET(objspace, obj);
}
else {
gc_report(3, objspace, "gc_aging: YOUNG: %s\n", rb_obj_info(obj));
RVALUE_AGE_INC(objspace, obj);
}
}
else if (is_full_marking(objspace)) {
GC_ASSERT(RVALUE_PAGE_UNCOLLECTIBLE(page, obj) == FALSE);
Expand Down
1 change: 0 additions & 1 deletion gc/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ enum rb_gc_vm_weak_tables {
RB_GC_VM_ID2REF_TABLE,
RB_GC_VM_GENERIC_FIELDS_TABLE,
RB_GC_VM_FROZEN_STRINGS_TABLE,
RB_GC_VM_CC_REFINEMENT_TABLE,
RB_GC_VM_WEAK_TABLE_COUNT
};

Expand Down
2 changes: 1 addition & 1 deletion gems/bundled_gems
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# - revision: revision in repository-url to test
# if `revision` is not given, "v"+`version` or `version` will be used.

minitest 6.0.1 https://github.com/minitest/minitest
minitest 6.0.2 https://github.com/minitest/minitest
power_assert 3.0.1 https://github.com/ruby/power_assert
rake 13.3.1 https://github.com/ruby/rake
test-unit 3.7.7 https://github.com/test-unit/test-unit
Expand Down
20 changes: 9 additions & 11 deletions imemo.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,29 +63,27 @@ rb_imemo_tmpbuf_new(void)
}

void *
rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t size, size_t cnt)
rb_alloc_tmp_buffer(volatile VALUE *store, long len)
{
if (len < 0) {
rb_raise(rb_eArgError, "negative buffer size (or size too big)");
}

/* Keep the order; allocate an empty imemo first then xmalloc, to
* get rid of potential memory leak */
rb_imemo_tmpbuf_t *tmpbuf = (rb_imemo_tmpbuf_t *)rb_imemo_tmpbuf_new();
*store = (VALUE)tmpbuf;
void *ptr = ruby_xmalloc(size);
void *ptr = ruby_xmalloc(len);
tmpbuf->ptr = ptr;
tmpbuf->size = size;
tmpbuf->size = len;

return ptr;
}

void *
rb_alloc_tmp_buffer(volatile VALUE *store, long len)
rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t size, size_t cnt)
{
long cnt;

if (len < 0 || (cnt = (long)roomof(len, sizeof(VALUE))) < 0) {
rb_raise(rb_eArgError, "negative buffer size (or size too big)");
}

return rb_alloc_tmp_buffer_with_count(store, len, cnt);
return rb_alloc_tmp_buffer(store, (long)size);
}

void
Expand Down
3 changes: 1 addition & 2 deletions include/ruby/internal/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,7 @@ static inline void *
rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize)
{
const size_t total_size = rbimpl_size_mul_or_raise(RBIMPL_CAST((size_t)count), elsize);
const size_t cnt = (total_size + sizeof(VALUE) - 1) / sizeof(VALUE);
return rb_alloc_tmp_buffer_with_count(store, total_size, cnt);
return rb_alloc_tmp_buffer(store, (long)total_size);
}

RBIMPL_SYMBOL_EXPORT_BEGIN()
Expand Down
19 changes: 2 additions & 17 deletions internal/imemo.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ static inline int imemo_type_p(VALUE imemo, enum imemo_type imemo_type);
static inline bool imemo_throw_data_p(VALUE imemo);
static inline struct vm_ifunc *rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data);
static inline void *RB_IMEMO_TMPBUF_PTR(VALUE v);
static inline void *rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr);
static inline void MEMO_V1_SET(struct MEMO *m, VALUE v);
static inline void MEMO_V2_SET(struct MEMO *m, VALUE v);

Expand Down Expand Up @@ -193,30 +192,16 @@ RB_IMEMO_TMPBUF_PTR(VALUE v)
return p->ptr;
}

static inline void *
rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr)
{
return ((rb_imemo_tmpbuf_t *)v)->ptr = ptr;
}

static inline VALUE
rb_imemo_tmpbuf_new_from_an_RString(VALUE str)
{
const void *src;
VALUE imemo;
rb_imemo_tmpbuf_t *tmpbuf;
void *dst;
size_t len;

StringValue(str);
/* create tmpbuf to keep the pointer before xmalloc */
imemo = rb_imemo_tmpbuf_new();
tmpbuf = (rb_imemo_tmpbuf_t *)imemo;
len = RSTRING_LEN(str);
src = RSTRING_PTR(str);
dst = ruby_xmalloc(len);
memcpy(dst, src, len);
tmpbuf->ptr = dst;
rb_alloc_tmp_buffer(&imemo, len);
memcpy(RB_IMEMO_TMPBUF_PTR(imemo), RSTRING_PTR(str), len);
return imemo;
}

Expand Down
Loading
Loading