Method: KeyError#key
- Defined in:
- error.c
permalink #key ⇒ Object
Return the key caused this KeyError exception.
2075 2076 2077 2078 2079 2080 2081 2082 2083 |
# File 'error.c', line 2075
static VALUE
key_err_key(VALUE self)
{
VALUE key;
key = rb_ivar_lookup(self, id_key, Qundef);
if (key != Qundef) return key;
rb_raise(rb_eArgError, "no key is available");
}
|