From 54dbd8bea8a79bfcdefa471c1717c6cd28022f33 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 17 Mar 2023 11:29:04 -0700 Subject: Use an st table for "too complex" objects st tables will maintain insertion order so we can marshal dump / load objects with instance variables in the same order they were set on that particular instance [ruby-core:112926] [Bug #19535] Co-Authored-By: Jemma Issroff --- vm_insnhelper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 674308c90c..e2cab6054a 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1259,7 +1259,7 @@ vm_getivar(VALUE obj, ID id, const rb_iseq_t *iseq, IVC ic, const struct rb_call rb_shape_t *shape = rb_shape_get_shape_by_id(shape_id); if (shape_id == OBJ_TOO_COMPLEX_SHAPE_ID) { - if (!rb_id_table_lookup(ROBJECT_IV_HASH(obj), id, &val)) { + if (!st_lookup(ROBJECT_IV_HASH(obj), id, &val)) { val = default_value; } } -- cgit v1.2.3