Skip to content

Commit 21f33db

Browse files
committed
Move ruby/assert.h include after other headers
Relocate ruby/assert.h inclusion to the end and add RUBY_DEBUG fallback if not present. Ensures correct header order and macro definition.
1 parent 9d4b156 commit 21f33db

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

crates/rb-sys-build/src/bindings/wrapper.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#include "ruby.h"
22

3-
#ifdef HAVE_RUBY_ASSERT_H
4-
#include "ruby/assert.h"
5-
#endif
63
#ifdef HAVE_RUBY_DEBUG_H
74
#include "ruby/debug.h"
85
#endif
@@ -72,3 +69,9 @@
7269
#ifdef HAVE_RUBY_IO_BUFFER_H
7370
#include "ruby/io/buffer.h"
7471
#endif
72+
73+
#ifdef HAVE_RUBY_ASSERT_H
74+
#include "ruby/assert.h"
75+
#else
76+
# define RUBY_DEBUG 0
77+
#endif

0 commit comments

Comments
 (0)