Skip to content

Commit

Permalink
add comment for Module#include?
Browse files Browse the repository at this point in the history
  • Loading branch information
skandhas committed Nov 24, 2012
1 parent cd8e9c1 commit 25a02a5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/class.c
Expand Up @@ -722,6 +722,25 @@ mrb_mod_include(mrb_state *mrb, mrb_value klass)
return klass;
}

/* 15.2.2.4.28 */
/*
* call-seq:
* mod.include?(module) -> true or false
*
* Returns <code>true</code> if <i>module</i> is included in
* <i>mod</i> or one of <i>mod</i>'s ancestors.
*
* module A
* end
* class B
* include A
* end
* class C < B
* end
* B.include?(A) #=> true
* C.include?(A) #=> true
* A.include?(A) #=> false
*/
static mrb_value
mrb_mod_include_p(mrb_state *mrb, mrb_value mod)
{
Expand Down

0 comments on commit 25a02a5

Please sign in to comment.