Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update finalizer spec to run with Ruby 3.4.2
This is most likely not the best way to do this, but it works. Inside the MRI codebase of the latest stable release , the value of RUBY_VERSION_TEENY is defined as 2, but once you install this version it is defined as 0. So, when running an installed MRI 3.4.2, the method undefine_finalizer in the spec would still return nil instead of actually removing the finalizer, and the spec would fail. The value of RUBY_API_VERSION_CODE is created from the sum of the major, minor and teeny components, with the property that `RUBY_API_VERSION_CODE % 100 == RUBY_VERSION_TEENY`, so the original check could not have worked if RUBY_VERSION_TEENY actually had the value 1, since that would make the check `RUBY_API_VERSION_CODE == 30400` fail. As a workaround, the spec for rb_undefine_finalizer has been disabled for all Ruby 3.4 releases.
- Loading branch information