summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-06-19 12:34:44 +0900
committerNobuyoshi Nakada <[email protected]>2024-06-21 09:24:59 +0900
commitb834c62efdb730e1b0ac7134cfa933bc10c59a80 (patch)
tree1d192a9b2db0ab09f6d6beed774b73b5c94698f5 /include
parentb182f2a04520a0138992b27f9e6bfd15bdfd6f96 (diff)
Delegate from `RBIMPL_ASSERT_OR_ASSUME` to `RUBY_ASSERT_ALWAYS`
Get rid of expansion of the argument which often contains complicated macros, and simplify the failure message.
Diffstat (limited to 'include')
-rw-r--r--include/ruby/assert.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/assert.h b/include/ruby/assert.h
index e9edd9e640..0342d554e7 100644
--- a/include/ruby/assert.h
+++ b/include/ruby/assert.h
@@ -298,7 +298,7 @@ RBIMPL_WARNING_IGNORED(-Wgnu-zero-variadic-macro-arguments)
* @copydetails #RUBY_ASSERT
*/
#if RUBY_DEBUG
-# define RBIMPL_ASSERT_OR_ASSUME(expr) RUBY_ASSERT_ALWAYS(expr)
+# define RBIMPL_ASSERT_OR_ASSUME RUBY_ASSERT_ALWAYS
#elif RBIMPL_COMPILER_BEFORE(Clang, 7, 0, 0)
# /* See commit 67d259c5dccd31fe49d417fec169977712ffdf10 */
# define RBIMPL_ASSERT_OR_ASSUME(expr) RBIMPL_ASSERT_NOTHING