Issue #6557 has been reported by ibc (Iñaki Baz Castillo).

----------------------------------------
Feature #6557: Make rb_hash_clear() public
https://bugs.ruby-lang.org/issues/6557

Author: ibc (Iñaki Baz Castillo)
Status: Open
Priority: Normal
Assignee: 
Category: core
Target version: 1.9.3


Any reason for rb_hash_clear() not to be public C API?:

<pre>
static VALUE
rb_hash_clear(VALUE hash)
{
    rb_hash_modify_check(hash);
    if (!RHASH(hash)->ntbl)
        return hash;
    if (RHASH(hash)->ntbl->num_entries > 0) {
        if (RHASH(hash)->iter_lev > 0)
            rb_hash_foreach(hash, clear_i, 0);
        else
            st_clear(RHASH(hash)->ntbl);
    }

    return hash;
}
</pre>


-- 
http://bugs.ruby-lang.org/