diff options
author | Koichi Sasada <ko1@atdot.net> | 2019-07-15 11:27:38 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2019-07-15 11:30:34 +0900 |
commit | c23e5976744f1984b309f0af724fbd8ddea2c56a (patch) | |
tree | 48392ced4a8bc32e3422ce43a0a9ee39fb537a31 /hash.c | |
parent | d02f2fc3e2b4d14793c3b25079787a8972ce49c8 (diff) | |
download | ruby-c23e5976744f1984b309f0af724fbd8ddea2c56a.tar.gz |
respect RUBY_DEBUG.
see RUBY_DEBUG for each debug options.
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -394,9 +394,10 @@ ar_empty_entry(ar_table_entry *entry) #define RHASH_TYPE(hash) (RHASH_AR_TABLE_P(hash) ? &objhash : RHASH_ST_TABLE(hash)->type) #define RHASH_AR_TABLE_REF(hash, n) (&RHASH_AR_TABLE(hash)->entries[n]) +#define HASH_ASSERT(expr) RUBY_ASSERT_MESG_WHEN(1, expr, #expr) + #if HASH_DEBUG #define hash_verify(hash) hash_verify_(hash, __FILE__, __LINE__) -#define HASH_ASSERT(expr) RUBY_ASSERT_MESG_WHEN(1, expr, #expr) void rb_hash_dump(VALUE hash) @@ -471,7 +472,6 @@ hash_verify_(VALUE hash, const char *file, int line) #else #define hash_verify(h) ((void)0) -#define HASH_ASSERT(e) ((void)0) #endif static inline int |