summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2019-07-31 21:48:22 +0100
committerKoichi Sasada <ko1@atdot.net>2019-07-31 21:48:22 +0100
commitdeddc8047647792e27e1b9829bc917ef73504320 (patch)
treefeaaa9432ce65976323c59e57793809adc8db42e /hash.c
parent43d74776a1465095ab6b420809cc278d4f95f7bc (diff)
HASH_ASSERT() respects HASH_DEBUG
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c2
1 files changed, 1 insertions, 1 deletions
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__)