diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2023-06-21 16:49:51 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-21 16:49:51 +0900 |
commit | a87bce86bb2a7581943355b41abaf41a6ad18218 (patch) | |
tree | 34686e94b2f5fb9f10d6e17a06385d98e97b0014 /object.c | |
parent | e25403d0d97b737901d137c54635df0413155ad4 (diff) |
Allow setting the name of a class or module. (#7483)
Introduce `Module#set_temporary_name` for setting identifiers for otherwise
anonymous modules/classes.
Notes
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -4508,6 +4508,7 @@ InitVM_Object(void) rb_define_method(rb_cModule, "included_modules", rb_mod_included_modules, 0); /* in class.c */ rb_define_method(rb_cModule, "include?", rb_mod_include_p, 1); /* in class.c */ rb_define_method(rb_cModule, "name", rb_mod_name, 0); /* in variable.c */ + rb_define_method(rb_cModule, "set_temporary_name", rb_mod_set_temporary_name, 1); /* in variable.c */ rb_define_method(rb_cModule, "ancestors", rb_mod_ancestors, 0); /* in class.c */ rb_define_method(rb_cModule, "attr", rb_mod_attr, -1); |