From e02eda194f1d1ff6998b5eb462dd2a2afc54281c Mon Sep 17 00:00:00 2001 From: Luke Gruber Date: Mon, 1 Dec 2025 12:55:39 -0500 Subject: [PATCH] Speedup RBASIC_FIELDS_COUNT (#15273) We know the argument is not a class, module or special const, so we can skip these checks. --- shape.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shape.h b/shape.h index ec5c25b32f..d9cfe48759 100644 --- a/shape.h +++ b/shape.h @@ -395,7 +395,7 @@ ROBJECT_FIELDS_COUNT(VALUE obj) static inline uint32_t RBASIC_FIELDS_COUNT(VALUE obj) { - return RSHAPE(rb_obj_shape_id(obj))->next_field_index; + return RSHAPE(RBASIC_SHAPE_ID(obj))->next_field_index; } static inline bool