Checking Ruby C extensions for object movement crashes
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 #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper