summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2019-07-15 10:19:25 +0900
committerKoichi Sasada <ko1@atdot.net>2019-07-15 10:21:41 +0900
commitf6f09cbc76c3e47aec23898e024ff5bb5f061bc4 (patch)
treeceaf8a3203b0c2addbb7958d29cbad8ec17ef00f /include
parent0af897ab59dfa3d06724f898f17bbf8a1970abd1 (diff)
introduce RUBY_ASSERT_ALWAYS(expr).
RUBY_ASSERT_ALWAYS(expr) ignores NDEBUG (we cannot remove this assertion).
Diffstat (limited to 'include')
-rw-r--r--include/ruby/assert.h1
1 files changed, 1 insertions, 0 deletions
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