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)
826
826
827
827
#ifdef RUBY_DEBUG
828
828
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
+
829
841
static const char *
830
842
classname (VALUE klass )
831
843
{
@@ -990,6 +1002,8 @@ Init_Namespace(void)
990
1002
rb_include_module (rb_cObject , rb_mNamespaceLoader );
991
1003
992
1004
#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 );
993
1007
rb_define_global_function ("dump_classext" , rb_f_dump_classext , 1 );
994
1008
#endif
995
1009
}
You can’t perform that action at this time.
0 commit comments