I had the following warning at extension startup using ruby 3.2 + swig 4.0:
[path/to/*.so]: warning: undefining the allocator of T_DATA class swig_runtime_data
Found this fix that worked for me (at least it removed the warning)
https://fuchsia.googlesource.com/third_party/swig/+/962f0900018ecb10287b327d261e424fa5ccb755
in case the above is the proper fix...