Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
83185d3
[ruby/json] Update documentation to match json 3.0 API
bquorning Sep 8, 2026
a4c7404
ractor.h: export rb_obj_set_shareable()
ko1 Sep 8, 2026
2b94a88
[ruby/erb] Get rid of some useless global variables
byroot Sep 8, 2026
42b3ac1
[ruby/erb] Create the escaped string in the right encoding directly
byroot Sep 8, 2026
904d633
Build a child Ractor's wrappers in its objspace by naming it, not by …
ko1 Sep 8, 2026
b926e79
Ractor: do not republish port queues a reap freed during a table rebuild
Aug 25, 2026
80b867e
Ractor: keep a receive timeout when another port is woken
ko1 Sep 8, 2026
9bfe1fc
Ractor: wake a receiver when its port is closed
ko1 Sep 8, 2026
07fb082
ZJIT: Remove the survives method (#18395)
tenderlove Sep 8, 2026
fead5ae
Add Jean as an ERB maintainer
k0kubun Sep 8, 2026
2304205
Keep POSTLINK a valid command on darwin
hsbt Sep 7, 2026
a25240e
Link ruby with static extensions only through exts
hsbt Sep 7, 2026
838b176
Link ruby with static extensions only through exts on mswin
hsbt Sep 8, 2026
d0e0f2a
[ruby/digest] Match the linkage of rb_digest_wrap_metadata on MSVC
hsbt Sep 8, 2026
4899da3
[DOC] Harmonize symlink? methods
BurdetteLamar Sep 8, 2026
2c98ef2
Fix memory leak when moving shared root string
peterzhu2118 Sep 8, 2026
2e9c99d
Fix memory leak when moving shared root array
peterzhu2118 Sep 8, 2026
c329f36
Add and use rb_gc_update_moved(VALUE *obj) which conditionally assigns
luke-gruber Sep 4, 2026
da96508
Bump taiki-e/install-action
dependabot[bot] Sep 9, 2026
df3acf4
[DOC] Pathname#rmtree returns self, not 0
carlosdanielpohlod Sep 7, 2026
b74498e
Fix GC crash during Hash#merge
ydah Sep 8, 2026
e80a4e8
mswin: Add statically linked extension exports to the import library
hsbt Sep 8, 2026
2cbb37b
[DOC] Update ObjectSpace.each_object for per-Ractor objspaces
ko1 Sep 9, 2026
11a54ae
Keep FL_FINALIZE on the shell an object leaves behind when it is moved
ko1 Sep 9, 2026
b20a2ca
Fix memory leak reported in TestRequire#test_loading_fifo_threading_r…
peterzhu2118 Sep 8, 2026
844ffa9
Let only the first thread write a bug report
ko1 Sep 9, 2026
4affd0b
Documentation for modernizing C extensions. (#18492)
ivoanjo Sep 9, 2026
7427bf7
[ruby/rubygems] Bump Bundler version to 4.1.0.beta1
hsbt Sep 9, 2026
4020342
[ruby/rubygems] Bump Rubygems version to 4.1.0.beta1
hsbt Sep 9, 2026
2687802
Update default gems list at 4020342576a90012174ca4329c75b5 [ci skip]
matzbot Sep 9, 2026
f3a9760
Fix unused warning for mn_threads_enabled_p
peterzhu2118 Sep 9, 2026
967e607
[ruby/json] Fix the JSON::Coder.new call-seq
dduugg Sep 9, 2026
344fa79
[ruby/json] Release 3.0.2
byroot Sep 9, 2026
2fb90e5
Update default gems list at 344fa79bc6876160cc03eba4e2aeff [ci skip]
matzbot Sep 9, 2026
b02556a
[ruby/erb] Speedup `ERB::Util.html_escape` with SIMD
byroot Sep 9, 2026
1bb0450
[ruby/erb] Optimize escaping with memcpy of literals
byroot Sep 9, 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/zjit-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
rustup install ${{ matrix.rust_version }} --profile minimal
rustup default ${{ matrix.rust_version }}

- uses: taiki-e/install-action@7b8d4719ee4aaa279bdf55df38dacb9ebfe12a6c # v2.87.6
- uses: taiki-e/install-action@84f5ac3124727fb3d284d4d22ee9ab3654fd09a6 # v2.87.7
with:
tool: nextest@0.9
if: ${{ matrix.test_task == 'zjit-check' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zjit-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
ruby-version: '3.1'
bundler: none

- uses: taiki-e/install-action@7b8d4719ee4aaa279bdf55df38dacb9ebfe12a6c # v2.87.6
- uses: taiki-e/install-action@84f5ac3124727fb3d284d4d22ee9ab3654fd09a6 # v2.87.7
with:
tool: nextest@0.9
if: ${{ matrix.test_task == 'zjit-check' }}
Expand Down
6 changes: 3 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ They are still available on rubygems.org and can be installed with

### The following default gems are updated.

* RubyGems 4.1.0.dev
* RubyGems 4.1.0.beta1
* 4.0.3 to [v4.0.4][RubyGems-v4.0.4], [v4.0.5][RubyGems-v4.0.5], [v4.0.6][RubyGems-v4.0.6], [v4.0.7][RubyGems-v4.0.7], [v4.0.8][RubyGems-v4.0.8], [v4.0.9][RubyGems-v4.0.9], [v4.0.10][RubyGems-v4.0.10], [v4.0.11][RubyGems-v4.0.11], [v4.0.12][RubyGems-v4.0.12], [v4.0.13][RubyGems-v4.0.13], [v4.0.14][RubyGems-v4.0.14], [v4.0.15][RubyGems-v4.0.15], [v4.0.16][RubyGems-v4.0.16], [v4.0.17][RubyGems-v4.0.17], [v4.0.18][RubyGems-v4.0.18], [v4.0.19][RubyGems-v4.0.19], [v4.0.20][RubyGems-v4.0.20]
* bundler 4.1.0.dev
* bundler 4.1.0.beta1
* 4.0.3 to [v4.0.4][bundler-v4.0.4], [v4.0.5][bundler-v4.0.5], [v4.0.6][bundler-v4.0.6], [v4.0.7][bundler-v4.0.7], [v4.0.8][bundler-v4.0.8], [v4.0.9][bundler-v4.0.9], [v4.0.10][bundler-v4.0.10], [v4.0.11][bundler-v4.0.11], [v4.0.12][bundler-v4.0.12], [v4.0.13][bundler-v4.0.13], [v4.0.14][bundler-v4.0.14], [v4.0.15][bundler-v4.0.15], [v4.0.16][bundler-v4.0.16], [v4.0.17][bundler-v4.0.17]
* erb 6.0.7
* 6.0.1 to [v6.0.1.1][erb-v6.0.1.1], [v6.0.2][erb-v6.0.2], [v6.0.3][erb-v6.0.3], [v6.0.4][erb-v6.0.4], [v6.0.5][erb-v6.0.5], [v6.0.6][erb-v6.0.6], [v6.0.7][erb-v6.0.7]
Expand All @@ -188,7 +188,7 @@ They are still available on rubygems.org and can be installed with
* 0.8.2 to [v0.9.0][io-console-v0.9.0], [v0.9.1][io-console-v0.9.1], [v0.9.2][io-console-v0.9.2]
* ipaddr 1.2.9
* 1.2.8 to [v1.2.9][ipaddr-v1.2.9]
* json 3.0.1
* json 3.0.2
* 2.18.0 to [v2.18.1][json-v2.18.1], [v2.19.0][json-v2.19.0], [v2.19.1][json-v2.19.1], [v2.19.2][json-v2.19.2], [v2.19.3][json-v2.19.3], [v2.19.4][json-v2.19.4], [v2.19.5][json-v2.19.5], [v2.19.6][json-v2.19.6], [v2.19.7][json-v2.19.7], [v2.19.8][json-v2.19.8], [v2.19.9][json-v2.19.9], [v2.20.0][json-v2.20.0], [v2.21.0][json-v2.21.0], [v2.21.2][json-v2.21.2], [v3.0.0.rc1][json-v3.0.0.rc1], [v3.0.0][json-v3.0.0]
* net-protocol 0.3.0
* 0.2.2 to [v0.3.0][net-protocol-v0.3.0]
Expand Down
28 changes: 28 additions & 0 deletions bootstraptest/test_ractor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2863,3 +2863,31 @@ def st.m; :strct end
6.times { GC.start }
[taken.map(&:receive), [closed.receive, closed.receive]]
}

# Closing a port wakes a receiver waiting on it, with or without a timeout.
assert_equal '[:closed, :closed]', %q{
untimed = Ractor::Port.new
th = Thread.new do
begin
untimed.receive
rescue Ractor::ClosedError
:closed
end
end
Thread.pass until th.status == 'sleep'
untimed.close
untimed_result = th.value # before the next close, which would wake it too

timed = Ractor::Port.new
th2 = Thread.new do
begin
timed.receive(timeout: 10)
rescue Ractor::ClosedError
:closed
end
end
Thread.pass until th2.status == 'sleep'
timed.close

[untimed_result, th2.value]
}
24 changes: 12 additions & 12 deletions box.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,21 +203,21 @@ rb_box_gc_update_references(void *ptr)
if (!box) return;

if (box->box_object)
box->box_object = rb_gc_location(box->box_object);
rb_gc_update_moved(&box->box_object);
if (box->top_self)
box->top_self = rb_gc_location(box->top_self);
box->load_path = rb_gc_location(box->load_path);
box->expanded_load_path = rb_gc_location(box->expanded_load_path);
box->load_path_snapshot = rb_gc_location(box->load_path_snapshot);
rb_gc_update_moved(&box->top_self);
rb_gc_update_moved(&box->load_path);
rb_gc_update_moved(&box->expanded_load_path);
rb_gc_update_moved(&box->load_path_snapshot);
if (box->load_path_check_cache) {
box->load_path_check_cache = rb_gc_location(box->load_path_check_cache);
rb_gc_update_moved(&box->load_path_check_cache);
}
box->loaded_features = rb_gc_location(box->loaded_features);
box->loaded_features_snapshot = rb_gc_location(box->loaded_features_snapshot);
box->loaded_features_realpaths = rb_gc_location(box->loaded_features_realpaths);
box->loaded_features_realpath_map = rb_gc_location(box->loaded_features_realpath_map);
box->ruby_dln_libmap = rb_gc_location(box->ruby_dln_libmap);
box->gvar_tbl = rb_gc_location(box->gvar_tbl);
rb_gc_update_moved(&box->loaded_features);
rb_gc_update_moved(&box->loaded_features_snapshot);
rb_gc_update_moved(&box->loaded_features_realpaths);
rb_gc_update_moved(&box->loaded_features_realpath_map);
rb_gc_update_moved(&box->ruby_dln_libmap);
rb_gc_update_moved(&box->gvar_tbl);
}

void
Expand Down
2 changes: 1 addition & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ program: $(SHOWFLAGS) $(DOT_WAIT) $(PROGRAM)
wprogram: $(SHOWFLAGS) $(DOT_WAIT) $(WPROGRAM)
mini: PHONY miniruby$(EXEEXT)

$(PROGRAM) $(WPROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SETUP) $(PREP)
$(PROGRAM) $(WPROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SETUP) $(PREP) $(PROGRAM_EXTS)

$(LIBRUBY_A): $(LIBRUBY_A_OBJS) $(MAINOBJ) $(INITOBJS) $(ARCHFILE)

Expand Down
5 changes: 3 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,7 @@ main()
AS_IF([test -n "$dsymutil"], [
POSTLINK="$dsymutil \$@ 2>/dev/null${POSTLINK:+; $POSTLINK}"
])
: ${POSTLINK:=:}
AC_CHECK_HEADERS(crt_externs.h, [], [], [
#include <crt_externs.h>
])
Expand Down Expand Up @@ -3177,15 +3178,15 @@ AC_ARG_WITH(static-linked-ext,
[AS_CASE([$withval],[yes],[STATIC=;EXTSTATIC=static],[no],[],[EXTSTATIC="$withval"])])
AS_CASE([",$EXTSTATIC,"], [,static,|*,enc,*], [
ENCOBJS='enc/encinit.$(OBJEXT) enc/libenc.$(LIBEXT) enc/libtrans.$(LIBEXT)'
EXTOBJS='ext/extinit.$(OBJEXT)'
AC_DEFINE_UNQUOTED(EXTSTATIC, 1)
AC_SUBST(ENCSTATIC, static)
], [
ENCOBJS='dmyenc.$(OBJEXT)'
EXTOBJS='dmyext.$(OBJEXT)'
])
EXTOBJS='dmyext.$(OBJEXT)'
AC_SUBST(ENCOBJS)
AC_SUBST(EXTOBJS)
AC_SUBST(PROGRAM_EXTS, [${EXTSTATIC:+exts}])

: "rpath" && {
AS_CASE(["$target_os"],
Expand Down
22 changes: 15 additions & 7 deletions cont.c
Original file line number Diff line number Diff line change
Expand Up @@ -1107,9 +1107,9 @@ cont_compact(void *ptr)
rb_context_t *cont = ptr;

if (cont->self) {
cont->self = rb_gc_location(cont->self);
rb_gc_update_moved(&cont->self);
}
cont->value = rb_gc_location(cont->value);
rb_gc_update_moved(&cont->value);
rb_execution_context_update(&cont->saved_ec);
}

Expand Down Expand Up @@ -1220,7 +1220,7 @@ void
rb_fiber_update_self(rb_fiber_t *fiber)
{
if (fiber->cont.self) {
fiber->cont.self = rb_gc_location(fiber->cont.self);
rb_gc_update_moved(&fiber->cont.self);
}
else {
rb_execution_context_update(&fiber->cont.saved_ec);
Expand All @@ -1237,7 +1237,7 @@ static void
fiber_compact(void *ptr)
{
rb_fiber_t *fiber = ptr;
fiber->first_proc = rb_gc_location(fiber->first_proc);
rb_gc_update_moved(&fiber->first_proc);

if (fiber->prev) rb_fiber_update_self(fiber->prev);

Expand Down Expand Up @@ -2124,10 +2124,18 @@ static const rb_data_type_t rb_fiber_data_type = {
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
};

static VALUE fiber_alloc_in(VALUE klass, void *objspace);

static VALUE
fiber_alloc(VALUE klass)
{
VALUE obj = TypedData_Wrap_Struct(klass, &rb_fiber_data_type, 0);
return fiber_alloc_in(klass, GET_RACTOR()->objspace);
}

static VALUE
fiber_alloc_in(VALUE klass, void *objspace)
{
VALUE obj = rb_data_typed_object_wrap_in_objspace(objspace, klass, 0, &rb_fiber_data_type);
rb_gc_declare_weak_references(obj);
return obj;
}
Expand Down Expand Up @@ -2701,10 +2709,10 @@ rb_threadptr_root_fiber_setup(rb_thread_t *th)
}

void
rb_root_fiber_obj_setup(rb_thread_t *th)
rb_root_fiber_obj_setup(rb_thread_t *th, void *objspace)
{
rb_fiber_t *fiber = th->ec->fiber_ptr;
VALUE fiber_value = fiber_alloc(rb_cFiber);
VALUE fiber_value = fiber_alloc_in(rb_cFiber, objspace);
DATA_PTR(fiber_value) = fiber;
fiber->cont.self = fiber_value;
}
Expand Down
Loading