mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Mark RClass instance that may be namespaced with RCLASS_NAMESPACEABLE
This commit is contained in:
parent
393e9a5f3e
commit
96a0c2065a
6 changed files with 24 additions and 5 deletions
10
namespace.c
10
namespace.c
|
@ -48,12 +48,19 @@ static bool tmp_dir_has_dirsep;
|
|||
#endif
|
||||
|
||||
bool ruby_namespace_enabled = false; // extern
|
||||
bool ruby_namespace_init_done = false; // extern
|
||||
|
||||
VALUE rb_resolve_feature_path(VALUE klass, VALUE fname);
|
||||
static VALUE rb_namespace_inspect(VALUE obj);
|
||||
static void namespace_push(rb_thread_t *th, VALUE namespace);
|
||||
static VALUE namespace_pop(VALUE th_value);
|
||||
|
||||
void
|
||||
rb_namespace_init_done(void)
|
||||
{
|
||||
ruby_namespace_init_done = true;
|
||||
}
|
||||
|
||||
void
|
||||
rb_namespace_enable_builtin(void)
|
||||
{
|
||||
|
@ -1019,6 +1026,9 @@ Init_enable_namespace(void)
|
|||
if (env && strlen(env) == 1 && env[0] == '1') {
|
||||
ruby_namespace_enabled = true;
|
||||
}
|
||||
else {
|
||||
ruby_namespace_init_done = true;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue