1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* include/ruby/node.h (NOEX_LOCAL): remove unused local visibility.

* class.c (ins_methods_push): ditto.

* class.c (rb_class_local_methods): method removed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-10-11 13:20:14 +00:00
parent ba997e3529
commit 9bcbd08b0b
5 changed files with 9 additions and 25 deletions

View file

@ -1,3 +1,11 @@
Thu Oct 11 21:10:17 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* include/ruby/node.h (NOEX_LOCAL): remove unused local visibility.
* class.c (ins_methods_push): ditto.
* class.c (rb_class_local_methods): method removed.
Thu Oct 11 14:29:31 2007 NAKAMURA Usaku <usa@ruby-lang.org>
* */Makefile.sub (COMMON_MACROS): workaround for old SDK's bug.

20
class.c
View file

@ -521,7 +521,6 @@ ins_methods_push(ID name, long type, VALUE ary, long visi)
case NOEX_PRIVATE:
case NOEX_PROTECTED:
case NOEX_PUBLIC:
case NOEX_LOCAL:
visi = (type == visi);
break;
default:
@ -558,12 +557,6 @@ ins_methods_pub_i(ID name, long type, VALUE ary)
return ins_methods_push(name, type, ary, NOEX_PUBLIC);
}
static int
ins_methods_local_i(ID name, long type, VALUE ary)
{
return ins_methods_push(name, type, ary, NOEX_LOCAL);
}
static int
method_entry(ID key, NODE *body, st_table *list)
{
@ -701,19 +694,6 @@ rb_class_public_instance_methods(int argc, VALUE *argv, VALUE mod)
return class_instance_method_list(argc, argv, mod, ins_methods_pub_i);
}
/*
* call-seq:
* mod.local_methods => array
*
* Returns a list of the local methods defined in <i>mod</i>.
*/
VALUE
rb_class_local_methods(VALUE mod)
{
return class_instance_method_list(0, 0, mod, ins_methods_local_i);
}
/*
* call-seq:
* obj.singleton_methods(all=true) => array

View file

@ -136,7 +136,6 @@ VALUE rb_class_instance_methods(int, VALUE*, VALUE);
VALUE rb_class_public_instance_methods(int, VALUE*, VALUE);
VALUE rb_class_protected_instance_methods(int, VALUE*, VALUE);
VALUE rb_class_private_instance_methods(int, VALUE*, VALUE);
VALUE rb_class_local_methods(VALUE);
VALUE rb_obj_singleton_methods(int, VALUE*, VALUE);
void rb_define_method_id(VALUE, ID, VALUE (*)(ANYARGS), int);
void rb_frozen_class_p(VALUE);

View file

@ -467,8 +467,7 @@ typedef struct RNode {
#define NOEX_NOSUPER 0x01
#define NOEX_PRIVATE 0x02
#define NOEX_PROTECTED 0x04
#define NOEX_LOCAL 0x08
#define NOEX_MASK 0x0E /* 1110 */
#define NOEX_MASK 0x06 /* 1110 */
#define NOEX_UNDEF NOEX_NOSUPER

View file

@ -2436,8 +2436,6 @@ Init_Object(void)
rb_class_protected_instance_methods, -1); /* in class.c */
rb_define_method(rb_cModule, "private_instance_methods",
rb_class_private_instance_methods, -1); /* in class.c */
rb_define_method(rb_cModule, "local_methods",
rb_class_local_methods, 0); /* in class.c */
rb_define_method(rb_cModule, "constants", rb_mod_constants, -1); /* in variable.c */
rb_define_method(rb_cModule, "const_get", rb_mod_const_get, -1);