diff --git a/hash.c b/hash.c index 182f41a288..41d5a1dfe6 100644 --- a/hash.c +++ b/hash.c @@ -712,7 +712,7 @@ ar_force_convert_table(VALUE hash, const char *file, int line) RUBY_ASSERT(rb_gc_obj_slot_size(hash) >= sizeof(struct RHash) + sizeof(ar_table)); // prepare hash values - do { + while (1) { st_data_t keys[RHASH_AR_TABLE_MAX_SIZE]; bound = RHASH_AR_TABLE_BOUND(hash); size = RHASH_AR_TABLE_SIZE(hash); @@ -727,7 +727,9 @@ ar_force_convert_table(VALUE hash, const char *file, int line) if (UNLIKELY(!RHASH_AR_TABLE_P(hash))) return RHASH_ST_TABLE(hash); if (UNLIKELY(RHASH_AR_TABLE_BOUND(hash) != bound)) continue; if (UNLIKELY(ar_each_key(ar, bound, ar_each_key_cmp, keys, NULL, NULL))) continue; - } while (0); + + break; + } // make st st_table tab;