Actions
Bug #18777
closedNDEBUG macro defined after including ruby.h
Description
Hello,
When using ruby 3+, including ruby.h
results in the NDEBUG
macro becoming defined, which deactivates assertions.
This simple (see attached test.c
file) example illustrates this:
#include <assert.h>
#include <ruby.h>
int main() {
assert(0);
return 0;
}
I expect:
gcc test.c
./a.out
To fail, and it does not. Commenting the #include <ruby.h>
yields the expected result.
I found several discussion in the issues regarding NDEBUG
in Ruby 3+, but none seem to describe this particular behavior. Sorry if I missed something.
Thanks.
Files
Actions
Like0
Like0Like0