diff options
author | Jean Boussier <jean.boussier@gmail.com> | 2021-05-22 12:04:01 +0200 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2022-01-14 11:30:07 +0100 |
commit | 8d05047d72d0a4b97f57b23bddbca639375bbd03 (patch) | |
tree | d3caaf18c73b9f3423402162626c5dc5abc4965e /NEWS.md | |
parent | 53a4e101465a4d2ae38ea3bfd3cb7dd3c9f12f61 (diff) | |
download | ruby-8d05047d72d0a4b97f57b23bddbca639375bbd03.tar.gz |
Add a Module#const_added callback
[Feature #17881]
Works similarly to `method_added` but for constants.
```ruby
Foo::BAR = 42 # call Foo.const_added(:FOO)
class Foo::Baz; end # call Foo.const_added(:Baz)
Foo.autoload(:Something, "path") # call Foo.const_added(:Something)
```
Diffstat (limited to 'NEWS.md')
-rw-r--r-- | NEWS.md | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -29,6 +29,7 @@ Note: We're only listing outstanding class updates. * Module * Module.used_refinements has been added. [[Feature #14332]] * Module#refinements has been added. [[Feature #12737]] + * Module#const_added has been added. [[Feature #17881]] * Proc * Proc#dup returns an instance of subclass. [[Bug #17545]] |