summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
authorSatoshi Tagomori <s-tagomori@sakura.ad.jp>2025-10-31 23:38:16 +0900
committerSatoshi Tagomori <tagomoris@gmail.com>2025-11-03 02:06:11 +0900
commite89eecceafea3f8834c6fc4cdd74a7812591cae5 (patch)
treeee8e872cf9ea3bd30c11b57ec0bbb71c52decd7a /include/ruby
parentbc77a11bd845e4c3d79b990c196fedca37e9ab0b (diff)
No need to call rb_define_class/module_under_id
Classes/modules defined in a namespace are defined under ::Object as usual (as without namespaces), and it'll be set into the const_tbl of ::Object. In namespaces, namespace objects' const_tbl is equal to the one of ::Object. So constants of ::Object are just equal to constants of the namespace. That means, top level classes/modules in a namespace can be referred as namespace::KlassName without calling rb_define_class_under_id().
Diffstat (limited to 'include/ruby')
0 files changed, 0 insertions, 0 deletions