[#61822] Plan Developers Meeting Japan April 2014 — Zachary Scott <e@...>

I would like to request developers meeting around April 17 or 18 in this mo=

14 messages 2014/04/03
[#61825] Re: Plan Developers Meeting Japan April 2014 — Urabe Shyouhei <shyouhei@...> 2014/04/03

It's good if we have a meeting then.

[#61826] Re: Plan Developers Meeting Japan April 2014 — Zachary Scott <e@...> 2014/04/03

Regarding openssl issues, I=E2=80=99ve discussed possible meeting time with=

[#61833] Re: Plan Developers Meeting Japan April 2014 — Martin Bo煬et <martin.bosslet@...> 2014/04/03

Hi,

[ruby-core:62193] [ruby-trunk - Feature #9779] [Open] Add Module#descendents

From: shugo@...
Date: 2014-04-28 07:02:07 UTC
List: ruby-core #62193
Issue #9779 has been reported by Shugo Maeda.

----------------------------------------
Feature #9779: Add Module#descendents
https://bugs.ruby-lang.org/issues/9779

* Author: Shugo Maeda
* Status: Open
* Priority: Normal
* Assignee: 
* Category: core
* Target version: current: 2.2.0
----------------------------------------
Now classes have links to their subclasses, so how about to add Module#descendents?

```ruby
class X
end

class Y < X
end

class Z < Y
end

p X.descendents    #=> [X, Y, Z]

module A
end

module B
  include A
end

module C
  include A
end

p A.descendents    #=> [A, C, B]
```

One of my own use cases is to implement AspectJ like pointcut which matches all subclasses of the given class.

Considerations:

* Should the return value of Module#descendents include self?
* Should the return value of Module#descendents include singleton classes?

I attach a patch, where the return value includes both self and singleton classes.


---Files--------------------------------
0001-Add-Module-descendents.patch (3.75 KB)


-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next