summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-30 03:36:21 (GMT)
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-30 03:36:21 (GMT)
commit8d4dff2c181d5ef81f0aae495c512f8e6622552f (patch)
treea150676407fcc42d6a0310e963b312593ab5d6f8 /vm_method.c
parent6f77d0a3aa1cc09e7d7926bb62b9e076a5048bfa (diff)
* vm_method.c: added documentation of protected/private methods.
[fix GH-1072] * test/ruby/test_module.rb: added testcase for method_defined? [fix GH-1071] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/vm_method.c b/vm_method.c
index 4059312..1e57176 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -1198,20 +1198,26 @@ rb_mod_undef_method(int argc, VALUE *argv, VALUE mod)
*
* module A
* def method1() end
+ * def protected_method1() end
+ * protected :protected_method1
* end
* class B
* def method2() end
+ * def private_method2() end
+ * private :private_method2
* end
* class C < B
* include A
* def method3() end
* end
*
- * A.method_defined? :method1 #=> true
- * C.method_defined? "method1" #=> true
- * C.method_defined? "method2" #=> true
- * C.method_defined? "method3" #=> true
- * C.method_defined? "method4" #=> false
+ * A.method_defined? :method1 #=> true
+ * C.method_defined? "method1" #=> true
+ * C.method_defined? "method2" #=> true
+ * C.method_defined? "method3" #=> true
+ * C.method_defined? "protected_method1" #=> true
+ * C.method_defined? "method4" #=> false
+ * C.method_defined? "private_method2" #=> false
*/
static VALUE