Actions
Feature #19775
closedUse the callback `main::const_added`
Status:
Closed
Assignee:
-
Target version:
-
Description
In #17881, it was accepted that Module#const_added
is called when there is a new constant added to the namespace of the module.
Since main
can also serve as a namespace, it should also be able to use this callback.
def const_added name
p name
end
Foo = 1 # => :Foo
Actions
Like0
Like0