summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/vm.c b/vm.c
index 4245ea4..4a83fbe 100644
--- a/vm.c
+++ b/vm.c
@@ -1242,10 +1242,9 @@ rb_vm_check_redefinition_opt_method(const rb_method_entry_t *me, VALUE klass)
}
}
-static int
-check_redefined_method(st_data_t key, st_data_t value, st_data_t data)
+static enum rb_id_table_iterator_result
+check_redefined_method(ID mid, VALUE value, void *data)
{
- ID mid = (ID)key;
VALUE klass = (VALUE)data;
const rb_method_entry_t *me = (rb_method_entry_t *)value;
const rb_method_entry_t *newme = rb_method_entry(klass, mid);
@@ -1259,8 +1258,7 @@ void
rb_vm_check_redefinition_by_prepend(VALUE klass)
{
if (!vm_redefinition_check_flag(klass)) return;
- st_foreach(RCLASS_M_TBL(RCLASS_ORIGIN(klass)), check_redefined_method,
- (st_data_t)klass);
+ rb_id_table_foreach(RCLASS_M_TBL(RCLASS_ORIGIN(klass)), check_redefined_method, (void *)klass);
}
static void