summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2023-10-24 12:37:27 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2023-10-24 14:23:17 -0700
commitafae8df373ba1b53b64bffa0e3df668d86585243 (patch)
tree6adb79b61e9cf073f658e4a1cfa1afe8a5d2bafc /object.c
parentcfd7c1a2763d727f8a578da27317b55111aa6894 (diff)
`get_next_shape_internal` should always return a shape
If it runs out of shapes, or new variations aren't allowed, it will return "too complex"
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index 4c589b2655..5cb0e0a650 100644
--- a/object.c
+++ b/object.c
@@ -292,7 +292,7 @@ rb_obj_copy_ivar(VALUE dest, VALUE obj)
RUBY_ASSERT(BUILTIN_TYPE(dest) == BUILTIN_TYPE(obj));
rb_shape_t * src_shape = rb_shape_get_shape(obj);
- if (rb_shape_id(src_shape) == OBJ_TOO_COMPLEX_SHAPE_ID) {
+ if (rb_shape_obj_too_complex(obj)) {
st_table * table = rb_st_init_numtable_with_size(rb_st_table_size(ROBJECT_IV_HASH(obj)));
rb_ivar_foreach(obj, rb_obj_evacuate_ivs_to_hash_table, (st_data_t)table);