diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-12-04 22:02:37 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-12-04 22:02:37 +0900 |
| commit | 3972df57fe70a29e6bf6db590dd22651640a1217 (patch) | |
| tree | 287be63c37f79a353d17d06a31e178d52aa3f2de /lib | |
| parent | 4cd349373779bb643444f85fa1d04b0769c58c63 (diff) | |
| download | mruby-3972df57fe70a29e6bf6db590dd22651640a1217.tar.gz mruby-3972df57fe70a29e6bf6db590dd22651640a1217.zip | |
Make `Module#include` and `Module#prepend` behave like Ruby3.0.
Module#include and Module#prepend now affect classes and modules
that have already included or prepended the receiver, mirroring the
behavior if the arguments were included in the receiver before
the other modules and classes included or prepended the receiver.
```ruby
class C; end
module M1; end
module M2; end
C.include M1
M1.include M2
p C.ancestors #=> [C, M1, M2, Object, Kernel, BasicObject]
```
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions
