Issue #6557 has been updated by mame (Yusuke Endoh).

Status changed from Feedback to Closed

Congrats, rb_hash_clear() was public since r37480.

-- 
Yusuke Endoh <mame / tsg.ne.jp>
----------------------------------------
Feature #6557: Make rb_hash_clear() public
https://bugs.ruby-lang.org/issues/6557#change-33791

Author: ibc (IƱaki Baz Castillo)
Status: Closed
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/