Project

General

Profile

Actions

Bug #18779

closed

`GC.compact` and other compaction related methods should be defined as rb_f_notimplement on non supported platforms.

Added by byroot (Jean Boussier) almost 2 years ago. Updated about 1 year ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:108543]

Description

I received several bug report on native gems using GC.verify_compaction_references in their test suite.

Examples:

I think that when !GC_COMPACTION_SUPPORTED, rather than raise NotImplementedError, we should instead define these methods as rb_f_notimplement like Process.fork on Windows.

This way GC.respond_to?(:compact) would be a proper way to test for compaction support.

Unfortunately, these methods are defined through .rb files with Primitive, and I don't know wether it's possible to check GC_COMPACTION_SUPPORTED from there, nor if it's possible to define a rb_f_notimplement method.

cc @tenderlovemaking (Aaron Patterson)


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #18560: "Compaction isn't available on this platform" error running PG test suite on ppc64leClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0