diff options
| author | Satoshi Tagomori <s-tagomori@sakura.ad.jp> | 2025-11-01 09:41:36 +0900 |
|---|---|---|
| committer | Satoshi Tagomori <tagomoris@gmail.com> | 2025-11-03 02:06:11 +0900 |
| commit | 89fa15b6f69ebb5c9d71aab5bf19d5ac2b67b05b (patch) | |
| tree | 4e8533153a37df70b5d4ad234665242c9d4f26ea | |
| parent | 0116dd5e0caaf8136f867b3037ce6d8dbf376232 (diff) | |
Fix incorrect RUBY_DEBUG range
| -rw-r--r-- | namespace.c | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/namespace.c b/namespace.c index 2ae9102545..0efc75e28b 100644 --- a/namespace.c +++ b/namespace.c @@ -876,8 +876,6 @@ Init_enable_namespace(void) } } -#if RUBY_DEBUG > 0 - /* :nodoc: */ static VALUE rb_namespace_s_root(VALUE recv) @@ -892,6 +890,24 @@ rb_namespace_s_main(VALUE recv) return main_namespace->ns_object; } +/* :nodoc: */ +static VALUE +rb_namespace_root_p(VALUE namespace) +{ + const rb_namespace_t *ns = (const rb_namespace_t *)rb_get_namespace_t(namespace); + return RBOOL(NAMESPACE_ROOT_P(ns)); +} + +/* :nodoc: */ +static VALUE +rb_namespace_main_p(VALUE namespace) +{ + const rb_namespace_t *ns = (const rb_namespace_t *)rb_get_namespace_t(namespace); + return RBOOL(NAMESPACE_MAIN_P(ns)); +} + +#if RUBY_DEBUG + static const char * classname(VALUE klass) { @@ -1027,30 +1043,6 @@ rb_f_dump_classext(VALUE recv, VALUE klass) return res; } -/* :nodoc: */ -static VALUE -rb_namespace_root_p(VALUE namespace) -{ - const rb_namespace_t *ns = (const rb_namespace_t *)rb_get_namespace_t(namespace); - return RBOOL(NAMESPACE_ROOT_P(ns)); -} - -/* :nodoc: */ -static VALUE -rb_namespace_main_p(VALUE namespace) -{ - const rb_namespace_t *ns = (const rb_namespace_t *)rb_get_namespace_t(namespace); - return RBOOL(NAMESPACE_MAIN_P(ns)); -} - -/* :nodoc: */ -static VALUE -rb_namespace_user_p(VALUE namespace) -{ - const rb_namespace_t *ns = (const rb_namespace_t *)rb_get_namespace_t(namespace); - return RBOOL(NAMESPACE_USER_P(ns)); -} - #endif /* RUBY_DEBUG */ /* |
