From: jean.boussier@... Date: 2020-07-23T07:17:01+00:00 Subject: [ruby-core:99291] [Ruby master Bug#17044] ObjectSpace.dump allocates one string per anonymous class and module Issue #17044 has been reported by byroot (Jean Boussier). ---------------------------------------- Bug #17044: ObjectSpace.dump allocates one string per anonymous class and module https://bugs.ruby-lang.org/issues/17044 * Author: byroot (Jean Boussier) * Status: Open * Priority: Normal * ruby -v: ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- This is because it dump the module/class names using `rb_class2name` which will create an ad hoc name for anonymous classes (e.g. `"#"`) Since `ObjectSpace.dump_all` is used to observe the heap, it should ideally not modify it. The fix for it was merged by @nobu as 6a0cb1d649ecfc3e2af922c74ce82b3ff95fb12a and 347639ad8ad9fe2c6e88ff9b4faa21a11568bf6a, but I'd like to request it to be backported to at least 2.7 -- https://bugs.ruby-lang.org/ Unsubscribe: