summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-16 14:21:34 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-16 14:21:34 +0000
commit9d1f9bd56ba2f47b7b964f261fc39a1a00c9e697 (patch)
treef1a980b8f746ce03c03a34df6b3d92f23bc5940e /class.c
parent1135c41a5bfece4b4db3bba472c30d31c5891fe1 (diff)
* eval.c (rb_mod_freeze): prepare string representation before
freezing. [ruby-talk:103646] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/class.c b/class.c
index bf0457bb75..6a21cb66d9 100644
--- a/class.c
+++ b/class.c
@@ -652,8 +652,8 @@ class_instance_method_list(argc, argv, mod, func)
* end
*
* A.instance_methods #=> ["method1"]
- * B.instance_methods #=> ["method2"]
- * C.instance_methods #=> ["method3"]
+ * B.instance_methods(false) #=> ["method2"]
+ * C.instance_methods(false) #=> ["method3"]
* C.instance_methods(true).length #=> 43
*/
@@ -756,8 +756,8 @@ rb_class_public_instance_methods(argc, argv, mod)
* end
*
* Single.singleton_methods #=> ["four"]
- * a.singleton_methods #=> ["two", "one"]
- * a.singleton_methods(true) #=> ["two", "one", "three"]
+ * a.singleton_methods(false) #=> ["two", "one"]
+ * a.singleton_methods #=> ["two", "one", "three"]
*/
VALUE
@@ -809,11 +809,7 @@ rb_define_method(klass, name, func, argc)
VALUE (*func)();
int argc;
{
- ID id = rb_intern(name);
- int ex = NOEX_PUBLIC;
-
-
- rb_add_method(klass, id, NEW_CFUNC(func, argc), ex);
+ rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PUBLIC);
}
void