diff options
Diffstat (limited to 'shape.c')
-rw-r--r-- | shape.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -733,9 +733,10 @@ rb_shape_get_next(rb_shape_t *shape, VALUE obj, ID id) if (RCLASS_EXT(klass)->variation_count >= SHAPE_MAX_VARIATIONS) { rb_category_warn( RB_WARN_CATEGORY_PERFORMANCE, - "Maximum shapes variations (%d) reached by %"PRIsVALUE", instance variables accesses will be slower.", - SHAPE_MAX_VARIATIONS, - rb_class_path(klass) + "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.", + rb_class_path(klass), + SHAPE_MAX_VARIATIONS ); } } |