File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -826,6 +826,18 @@ Init_enable_namespace(void)
826826
827827#ifdef RUBY_DEBUG
828828
829+ static VALUE
830+ rb_namespace_s_root (VALUE recv )
831+ {
832+ return root_namespace -> ns_object ;
833+ }
834+
835+ static VALUE
836+ rb_namespace_s_main (VALUE recv )
837+ {
838+ return main_namespace -> ns_object ;
839+ }
840+
829841static const char *
830842classname (VALUE klass )
831843{
@@ -990,6 +1002,8 @@ Init_Namespace(void)
9901002 rb_include_module (rb_cObject , rb_mNamespaceLoader );
9911003
9921004#ifdef RUBY_DEBUG
1005+ rb_define_singleton_method (rb_cNamespace , "root" , rb_namespace_s_root , 0 );
1006+ rb_define_singleton_method (rb_cNamespace , "main" , rb_namespace_s_main , 0 );
9931007 rb_define_global_function ("dump_classext" , rb_f_dump_classext , 1 );
9941008#endif
9951009 }
You can’t perform that action at this time.
0 commit comments