From a2e441672546d05eb82ee755fc11eadcab8c6500 Mon Sep 17 00:00:00 2001 From: "LevitatingBusinessMan (Rein Fernhout)" Date: Thu, 27 Mar 2025 03:57:10 +0100 Subject: [PATCH 1/2] mark ruby bindings ractor safe --- bindings/ruby/extconf.rb | 1 + bindings/ruby/main.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/bindings/ruby/extconf.rb b/bindings/ruby/extconf.rb index de0171dc6..0ce953e1b 100644 --- a/bindings/ruby/extconf.rb +++ b/bindings/ruby/extconf.rb @@ -19,4 +19,5 @@ dir_config("rrd", ["#{ABS_TOP_BUILDDIR}/src", "#{ABS_TOP_SRCDIR}/src"], "#{ABS_TOP_BUILDDIR}/src/.libs") have_library("rrd", "rrd_create") +have_func("rb_ext_ractor_safe", "ruby.h") create_makefile("RRD") diff --git a/bindings/ruby/main.c b/bindings/ruby/main.c index a036b7fb8..f58f643f4 100644 --- a/bindings/ruby/main.c +++ b/bindings/ruby/main.c @@ -371,6 +371,10 @@ VALUE rb_rrd_xport( void Init_RRD( ) { + #if HAVE_RB_EXT_RACTOR_SAFE + rb_ext_ractor_safe(true); + #endif + mRRD = rb_define_module("RRD"); rb_eRRDError = rb_define_class("RRDError", rb_eStandardError); From 62f8773c76fa34e0c0ce395be3928ba754f80a07 Mon Sep 17 00:00:00 2001 From: "LevitatingBusinessMan (Rein Fernhout)" Date: Sun, 30 Mar 2025 19:07:58 +0200 Subject: [PATCH 2/2] mention ruby bindings being ractor safe in CHANGES --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 291cac7b3..626bce796 100644 --- a/CHANGES +++ b/CHANGES @@ -3,7 +3,7 @@ RRDtool - master ... ==================== Bugfixes -------- - +* Mark the Ruby bindings as Ractor safe @LevitatingBusinessMan * Fix Compatiblity with TCL-9 @yselkowitz * Correctly link Ruby Bindings @LevitatingBusinessMan * Fix MacOS Build error (no SOCK_CLOEXEC on mac) @ensc fixes oetiker#1261