Skip to content

Commit db67572

Browse files
committed
Avoid calling rb_ext_ractor_safe on 2.x Rubies
Can you tell it's Friday?
1 parent afa07de commit db67572

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ext/datadog_profiling_native_extension/profiling.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ static VALUE _native_safe_object_info(DDTRACE_UNUSED VALUE _self, VALUE obj);
4343
void DDTRACE_EXPORT Init_datadog_profiling_native_extension(void) {
4444
// The profiler still has a lot of limitations around being used in Ractors BUT for now we're choosing to take care of those
4545
// on our side, rather than asking Ruby to block calling our APIs from Ractors.
46-
rb_ext_ractor_safe(true);
46+
#ifdef HAVE_RB_EXT_RACTOR_SAFE
47+
rb_ext_ractor_safe(true);
48+
#endif
4749

4850
VALUE datadog_module = rb_define_module("Datadog");
4951
VALUE profiling_module = rb_define_module_under(datadog_module, "Profiling");

0 commit comments

Comments
 (0)