Checking Ruby C extensions for object movement crashes
11-Feb-2021 1138
This guide intends to help Ruby native extension maintainers upgrade libraries to be compatible with GC.compact. Application developers can also use this guide to check applications for compaction compatibility. At the time of writing, the latest Ruby release is version 3.0.0.Using automated tests to surface crashesIf your test suite runs under Ruby 2.7.0 or newer, it is possible to check for compaction crashes with a small addition to your test suite.Add the following line such that it runs after all the code in the test suite finishes loading, but before any tests run. For libraries, this usually means inserting after require "library_name" during test setup.
Checking Ruby C extensions for object movement crashes #ruby #rubydeveloper #rubyonrails #Checking #extensions #object #movement #crashes https://rubyonrails.ba/link/checking-ruby-c-extensions-for-object-movement-crashes