key(p1)
public
Returns the key of an occurrence of a given
value. If the value is not found, returns nil.
h = { "a" => 100, "b" => 200, "c" => 300, "d" => 300 }
h.key(200)
h.key(300)
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];
}