summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'class.c')
-rw-r--r--class.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/class.c b/class.c
index d140e8a..6db3e7c 100644
--- a/class.c
+++ b/class.c
@@ -1804,11 +1804,10 @@ 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);
int i;
for (i = 0; i < keywords; i++) {
st_data_t key = ID2SYM(table[i]);
- st_delete(tbl, &key, NULL);
+ rb_hash_stlike_delete(hash, &key, NULL);
}
rb_keyword_error("unknown", rb_hash_keys(hash));
}
@@ -1855,7 +1854,7 @@ rb_extract_keywords(VALUE *orighash)
*orighash = 0;
return hash;
}
- st_foreach(rb_hash_tbl_raw(hash), separate_symbol, (st_data_t)&arg);
+ rb_hash_foreach(hash, separate_symbol, (st_data_t)&arg);
if (arg.kwdhash) {
if (arg.nonsymkey != Qundef) {
rb_raise(rb_eArgError, "non-symbol key in keyword arguments: %+"PRIsVALUE,
@@ -1876,8 +1875,8 @@ rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, V
#define extract_kwarg(keyword, val) \
(key = (st_data_t)(keyword), values ? \
- st_delete(rb_hash_tbl_raw(keyword_hash), &key, (val)) : \
- st_lookup(rb_hash_tbl_raw(keyword_hash), key, (val)))
+ rb_hash_stlike_delete(keyword_hash, &key, (val)) : \
+ rb_hash_stlike_lookup(keyword_hash, key, (val)))
if (NIL_P(keyword_hash)) keyword_hash = 0;