diff options
-rw-r--r-- | include/ruby/internal/fl_type.h | 13 | ||||
-rw-r--r-- | variable.c | 5 |
2 files changed, 9 insertions, 9 deletions
diff --git a/include/ruby/internal/fl_type.h b/include/ruby/internal/fl_type.h index eb212db7dc..0a05166784 100644 --- a/include/ruby/internal/fl_type.h +++ b/include/ruby/internal/fl_type.h @@ -905,6 +905,10 @@ RB_OBJ_FROZEN(VALUE obj) } } +RUBY_SYMBOL_EXPORT_BEGIN +void rb_obj_freeze_inline(VALUE obj); +RUBY_SYMBOL_EXPORT_END + RBIMPL_ATTR_ARTIFICIAL() /** * This is an implementation detail of RB_OBJ_FREEZE(). 3rd parties need not @@ -915,14 +919,7 @@ RBIMPL_ATTR_ARTIFICIAL() static inline void RB_OBJ_FREEZE_RAW(VALUE obj) { - RB_FL_SET_RAW(obj, RUBY_FL_FREEZE); - if (TYPE(obj) == T_STRING) { - RB_FL_UNSET_RAW(obj, FL_USER3); // STR_CHILLED - } + rb_obj_freeze_inline(obj); } -RUBY_SYMBOL_EXPORT_BEGIN -void rb_obj_freeze_inline(VALUE obj); -RUBY_SYMBOL_EXPORT_END - #endif /* RBIMPL_FL_TYPE_H */ diff --git a/variable.c b/variable.c index 807f01d64f..fcde8a603e 100644 --- a/variable.c +++ b/variable.c @@ -1815,7 +1815,10 @@ rb_shape_set_shape_id(VALUE obj, shape_id_t shape_id) void rb_obj_freeze_inline(VALUE x) { if (RB_FL_ABLE(x)) { - RB_OBJ_FREEZE_RAW(x); + RB_FL_SET_RAW(x, RUBY_FL_FREEZE); + if (TYPE(x) == T_STRING) { + RB_FL_UNSET_RAW(x, FL_USER3); // STR_CHILLED + } rb_shape_t * next_shape = rb_shape_transition_shape_frozen(x); |