summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'class.c')
-rw-r--r--class.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/class.c b/class.c
index 43123f1b3f..3ebff44d55 100644
--- a/class.c
+++ b/class.c
@@ -1881,10 +1881,12 @@ NORETURN(static void unknown_keyword_error(VALUE hash, const ID *table, int keyw
static void
unknown_keyword_error(VALUE hash, const ID *table, int keywords)
{
+ st_table *tbl = rb_hash_tbl_raw(hash);
VALUE keys;
int i;
for (i = 0; i < keywords; i++) {
- rb_hash_delete(hash, ID2SYM(table[i]));
+ st_data_t key = ID2SYM(table[i]);
+ st_delete(tbl, &key, NULL);
}
keys = rb_funcall(hash, rb_intern("keys"), 0, 0);
if (!RB_TYPE_P(keys, T_ARRAY)) rb_raise(rb_eArgError, "unknown keyword");