From deddc8047647792e27e1b9829bc917ef73504320 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Wed, 31 Jul 2019 21:48:22 +0100 Subject: [PATCH] HASH_ASSERT() respects HASH_DEBUG --- hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hash.c b/hash.c index 53fe79bfc0..02a2804016 100644 --- a/hash.c +++ b/hash.c @@ -421,7 +421,7 @@ ar_set_entry(VALUE hash, unsigned int index, st_data_t key, st_data_t val, st_ha #define RHASH_ST_TABLE_SET(h, s) rb_hash_st_table_set(h, s) #define RHASH_TYPE(hash) (RHASH_AR_TABLE_P(hash) ? &objhash : RHASH_ST_TABLE(hash)->type) -#define HASH_ASSERT(expr) RUBY_ASSERT_MESG_WHEN(1, expr, #expr) +#define HASH_ASSERT(expr) RUBY_ASSERT_MESG_WHEN(HASH_DEBUG, expr, #expr) #if HASH_DEBUG #define hash_verify(hash) hash_verify_(hash, __FILE__, __LINE__)