diff options
author | Jemma Issroff <[email protected]> | 2022-11-10 11:36:24 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2022-11-10 13:02:50 -0500 |
commit | 7ee1cacb84e6b19908ac0e692601447597d40605 (patch) | |
tree | 4c1a527fe9c71af4dc96a51436093cf699798a08 /object.c | |
parent | 354791c248d7e21d5b70ded7c548af954491e247 (diff) |
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)`
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6708
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |