• Yorick Peterse's avatar
    Expose module names and paths to the runtime · 7e462a2a
    Yorick Peterse authored
    Modules are now created using `Module.new`, instead of manually creating
    an object with its prototype set to `Module`. This in turn allows us to
    store the module name and path in every created module.
    Because methods on Module might conflict with user defined ones, the
    name and file path are not exposed as methods directly. Instead, a
    mirror can be used to retrieve this information. Since instance
    attributes can not be defined in a module, the use of these in Module
    will not conflict with anything.
refine_module_type.rb 558 Bytes