mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
respect NDEBUG.
ruby/ruby.h includes ruby/assert.h, and RUBY_NDEBUG is defined by checking NDEBUG. In other words, NDEBUG is only seen just after ruby/ruby.h. This patch also cheks NDEBUG just after including ruby_assert.h. Without this patch, assertions in array.c are always enabled.
This commit is contained in:
parent
e644e2de85
commit
63160a84b4
1 changed files with 5 additions and 0 deletions
|
@ -8,3 +8,8 @@
|
|||
#undef assert
|
||||
#define assert RUBY_ASSERT
|
||||
#endif
|
||||
|
||||
#ifdef NDEBUG
|
||||
#undef RUBY_NDEBUG
|
||||
#define RUBY_NDEBUG 1
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue