Skip to content

Commit 4a0e01d

Browse files
committed
[Misc #21688] Teach RDoc about the toplevel module Ruby
Re-open the exising module by calling `rb_define_module`. RDoc (`RDoc::Parser::C#do_classes_and_modules`) does not recognize `rb_path2class` as a class/module definition.
1 parent 422ed74 commit 4a0e01d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

box.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ Init_Box(void)
10571057
tmp_dir = system_tmpdir();
10581058
tmp_dir_has_dirsep = (strcmp(tmp_dir + (strlen(tmp_dir) - strlen(DIRSEP)), DIRSEP) == 0);
10591059

1060-
VALUE mRuby = rb_path2class("Ruby");
1060+
VALUE mRuby = rb_define_module("Ruby");
10611061

10621062
rb_cBox = rb_define_class_under(mRuby, "Box", rb_cModule);
10631063
rb_define_method(rb_cBox, "initialize", box_initialize, 0);

version.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Init_version(void)
132132
* The constants defined here are aliased in the toplevel with
133133
* +RUBY_+ prefix.
134134
*/
135-
VALUE mRuby = rb_path2class("Ruby");
135+
VALUE mRuby = rb_define_module("Ruby");
136136

137137
enum {ruby_patchlevel = RUBY_PATCHLEVEL};
138138
VALUE version = MKSTR(version);

0 commit comments

Comments
 (0)