diff --git a/.changesets/fix-t_data-warning-on-ruby-3-2.md b/.changesets/fix-t_data-warning-on-ruby-3-2.md new file mode 100644 index 000000000..af58d7219 --- /dev/null +++ b/.changesets/fix-t_data-warning-on-ruby-3-2.md @@ -0,0 +1,6 @@ +--- +bump: "patch" +type: "fix" +--- + +Fix the T_DATA warning originating from the AppSignal C extension on Ruby 3.2. diff --git a/ext/appsignal_extension.c b/ext/appsignal_extension.c index 7a91bb5b4..8e3f93dc2 100644 --- a/ext/appsignal_extension.c +++ b/ext/appsignal_extension.c @@ -845,9 +845,13 @@ static VALUE set_environment_metadata(VALUE self, VALUE key, VALUE value) { void Init_appsignal_extension(void) { Appsignal = rb_define_module("Appsignal"); Extension = rb_define_class_under(Appsignal, "Extension", rb_cObject); + rb_undef_alloc_func(Extension); Transaction = rb_define_class_under(Extension, "Transaction", rb_cObject); + rb_undef_alloc_func(Transaction); Data = rb_define_class_under(Extension, "Data", rb_cObject); + rb_undef_alloc_func(Data); Span = rb_define_class_under(Extension, "Span", rb_cObject); + rb_undef_alloc_func(Span); // Starting and stopping rb_define_singleton_method(Extension, "start", start, 0);