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.
This commit is contained in:
Nobuyoshi Nakada 2024-06-19 12:34:44 +09:00
parent b182f2a045
commit b834c62efd
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

View File

@ -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