Skip to content

Commit fbc70ba

Browse files
committed
Etc is not thread-safe
* Specifically Etc.getgrgid fails the spec in spec/ruby/library/etc/getgrgid_spec.rb
1 parent bf1a7ad commit fbc70ba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/c/etc/etc.c

+4
Original file line numberDiff line numberDiff line change
@@ -1116,6 +1116,10 @@ Init_etc(void)
11161116

11171117
#ifdef HAVE_RB_EXT_RACTOR_SAFE
11181118
RB_EXT_RACTOR_SAFE(true);
1119+
#endif
1120+
#ifdef TRUFFLERUBY
1121+
// Actually not Ractor-safe: https://bugs.ruby-lang.org/issues/21115
1122+
RB_EXT_RACTOR_SAFE(false);
11191123
#endif
11201124
mEtc = rb_define_module("Etc");
11211125
rb_define_const(mEtc, "VERSION", rb_str_new_cstr(RUBY_ETC_VERSION));

0 commit comments

Comments
 (0)