Skip to content

Commit 924ce50

Browse files
js: fix build with RUBY_API_VERSION_MAJOR >= 4
ruby/ruby@6d81969
1 parent 60d001e commit 924ce50

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/gems/js/ext/js/witapi-core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,12 @@ uint32_t rb_abi_guest_rb_abi_value_data_ptr(rb_abi_guest_rb_abi_value_t self) {
310310
return (uint32_t)DATA_PTR(obj);
311311
}
312312

313-
_Static_assert(RUBY_API_VERSION_MAJOR == 3, "unsupported Ruby version");
314-
#if RUBY_API_VERSION_MINOR == 2
313+
#if (RUBY_API_VERSION_MAJOR == 3) && (RUBY_API_VERSION_MINOR == 2)
315314
void rb_vm_bugreport(const void *);
316315

317316
void rb_abi_guest_rb_vm_bugreport(void) { rb_vm_bugreport(NULL); }
318-
#elif RUBY_API_VERSION_MINOR >= 3
317+
#elif ((RUBY_API_VERSION_MAJOR == 3) && RUBY_API_VERSION_MINOR >= 3) || \
318+
(RUBY_API_VERSION_MAJOR >= 4)
319319
bool rb_vm_bugreport(const void *, FILE *);
320320

321321
void rb_abi_guest_rb_vm_bugreport(void) { rb_vm_bugreport(NULL, stderr); }

0 commit comments

Comments
 (0)