From 7ee1cacb84e6b19908ac0e692601447597d40605 Mon Sep 17 00:00:00 2001 From: Jemma Issroff Date: Thu, 10 Nov 2022 11:36:24 -0500 Subject: Extract `rb_shape_get_parent` helper Extract an `rb_shape_get_parent` method instead of continually calling `rb_shape_get_shape_by_id(shape->parent_id)` --- object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'object.c') diff --git a/object.c b/object.c index f51bd3486b..f0117d1a47 100644 --- a/object.c +++ b/object.c @@ -284,7 +284,7 @@ rb_obj_copy_ivar(VALUE dest, VALUE obj) // The copy should be mutable, so we don't want the frozen shape if (rb_shape_frozen_shape_p(src_shape)) { - shape_to_set_on_dest = rb_shape_get_shape_by_id(src_shape->parent_id); + shape_to_set_on_dest = rb_shape_get_parent(src_shape); } src_buf = ROBJECT_IVPTR(obj); -- cgit v1.2.1