From f6f09cbc76c3e47aec23898e024ff5bb5f061bc4 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Mon, 15 Jul 2019 10:19:25 +0900 Subject: introduce RUBY_ASSERT_ALWAYS(expr). RUBY_ASSERT_ALWAYS(expr) ignores NDEBUG (we cannot remove this assertion). --- include/ruby/assert.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/ruby/assert.h b/include/ruby/assert.h index f8930a7bba..a5ee396f6b 100644 --- a/include/ruby/assert.h +++ b/include/ruby/assert.h @@ -30,6 +30,7 @@ NORETURN(void rb_assert_failure(const char *, int, const char *, const char *)); #endif #define RUBY_ASSERT(expr) RUBY_ASSERT_MESG_WHEN(RUBY_DEBUG+(!RUBY_NDEBUG+0), expr, #expr) #define RUBY_ASSERT_WHEN(cond, expr) RUBY_ASSERT_MESG_WHEN(cond, expr, #expr) +#define RUBY_ASSERT_ALWAYS(expr) RUBY_ASSERT_MESG_WHEN(TRUE, expr, #expr) #ifndef RUBY_DEBUG # define RUBY_DEBUG 0 -- cgit v1.2.3