I found https://bugs.ruby-lang.org/issues/18777 which specifically reported this issue upstream, where it was indeed closed as being intentional behaviour. However, the reporter of the issue did post a workaround of wrapping the include to ruby.h to #undef NDEBUG if it wasn't set before the include. That seems like a more targeted fix for the problem than #193, although still an unfortunate hack.
Closes #193
I found https://bugs.ruby-lang.org/issues/18777 which specifically reported this issue upstream, where it was indeed closed as being intentional behaviour. However, the reporter of the issue did post a workaround of wrapping the include to ruby.h to
#undef NDEBUG
if it wasn't set before the include. That seems like a more targeted fix for the problem than #193, although still an unfortunate hack.