key(p1)
public
Returns the key for a given value. If not
found, returns nil.
h = { "a" => 100, "b" => 200 }
h.key(200)
h.key(999)
static VALUE
rb_hash_key(VALUE hash, VALUE value)
{
VALUE args[2];
args[0] = value;
args[1] = Qnil;
rb_hash_foreach(hash, key_i, (VALUE)args);
return args[1];
}