Skip to content

Commit

Permalink
Use #initialize instead of initialize in shape perf warning
Browse files Browse the repository at this point in the history
This is more consistent with other messages.
  • Loading branch information
byroot authored and eregon committed Dec 18, 2023
1 parent b2fc1b0 commit f6ad49b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shape.c
Expand Up @@ -734,7 +734,7 @@ rb_shape_get_next(rb_shape_t *shape, VALUE obj, ID id)
rb_category_warn(
RB_WARN_CATEGORY_PERFORMANCE,
"The class %"PRIsVALUE" reached %d shape variations, instance variables accesses will be slower and memory usage increased.\n"
"It is recommended to define instance variable in a consistent order, for instance by eagerly defining them all in the `initialize` method.",
"It is recommended to define instance variable in a consistent order, for instance by eagerly defining them all in the #initialize method.",
rb_class_path(klass),
SHAPE_MAX_VARIATIONS
);
Expand Down

0 comments on commit f6ad49b

Please sign in to comment.