summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2025-03-25 22:20:59 +0100
committergit <[email protected]>2025-03-25 21:27:16 +0000
commitbfc5b8305d6a78b8cd011e89538dd7961d88dcff (patch)
tree38571a85c619d8a1cb6b0144e968e4ceb344fcf6 /ext
parent6bb35a1de4f6c769171a57dc5d832b5f2217d0c6 (diff)
[ruby/etc] Etc.sysconfdir does not work in a Ractor
* Because it uses RbConfig::CONFIG. * See https://github.com/ruby/ruby/actions/runs/14069312270/job/39399502142#step:12:947 https://github.com/ruby/etc/commit/12dbe03b6a
Diffstat (limited to 'ext')
-rw-r--r--ext/etc/etc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 82e4af87fe..157c6772ec 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -1172,7 +1172,6 @@ Init_etc(void)
#ifdef HAVE_RB_EXT_RACTOR_SAFE
RB_EXT_RACTOR_SAFE(true);
#endif
- rb_define_module_function(mEtc, "sysconfdir", etc_sysconfdir, 0);
rb_define_module_function(mEtc, "systmpdir", etc_systmpdir, 0);
rb_define_module_function(mEtc, "uname", etc_uname, 0);
rb_define_module_function(mEtc, "sysconf", etc_sysconf, 1);
@@ -1200,6 +1199,9 @@ Init_etc(void)
rb_define_module_function(mEtc, "endgrent", etc_endgrent, 0);
rb_define_module_function(mEtc, "getgrent", etc_getgrent, 0);
+ /* Uses RbConfig::CONFIG so does not work in a Ractor */
+ rb_define_module_function(mEtc, "sysconfdir", etc_sysconfdir, 0);
+
sPasswd = rb_struct_define_under(mEtc, "Passwd",
"name",
#ifdef HAVE_STRUCT_PASSWD_PW_PASSWD