Skip to content

Instantly share code, notes, and snippets.

@unurgunite
unurgunite / ruby-3.0-macos26.patch
Created May 23, 2026 08:59
Fix build fail on macOS 26 for Ruby 3.0
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -62,7 +62,11 @@ static ID id_eq;
static ID id_half;
/* MACRO's to guard objects from GC by keeping them in stack */
+#ifdef RBIMPL_ATTR_MAYBE_UNUSED
+#define ENTER(n) RBIMPL_ATTR_MAYBE_UNUSED() volatile VALUE vStack[n];int iStack=0
+#else
#define ENTER(n) volatile VALUE RB_UNUSED_VAR(vStack[n]);int iStack=0