summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'class.c')
-rw-r--r--class.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/class.c b/class.c
index 1c3391a..68a7b55 100644
--- a/class.c
+++ b/class.c
@@ -344,6 +344,22 @@ rb_mod_included_modules(mod)
}
VALUE
+rb_mod_include_p(mod, mod2)
+ VALUE mod;
+ VALUE mod2;
+{
+ VALUE p;
+
+ Check_Type(mod2, T_MODULE);
+ for (p = RCLASS(mod)->super; p; p = RCLASS(p)->super) {
+ if (BUILTIN_TYPE(p) == T_ICLASS) {
+ if (RBASIC(p)->klass == mod2) return Qtrue;
+ }
+ }
+ return Qfalse;
+}
+
+VALUE
rb_mod_ancestors(mod)
VALUE mod;
{