From b755097a42f2a0a5fe4ee8a11f00767345e3609e Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 16 Jun 2004 14:21:34 +0000 Subject: * eval.c (rb_mod_freeze): prepare string representation before freezing. [ruby-talk:103646] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- class.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'class.c') diff --git a/class.c b/class.c index bf0457bb7..6a21cb66d 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 -- cgit