From 9bcbd08b0b6aef3fb9305860b5d86b132d85721d Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 11 Oct 2007 13:20:14 +0000 Subject: [PATCH] * 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 --- ChangeLog | 8 ++++++++ class.c | 20 -------------------- include/ruby/intern.h | 1 - include/ruby/node.h | 3 +-- object.c | 2 -- 5 files changed, 9 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index ecf00c5b2b..4317e0b3b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Thu Oct 11 21:10:17 2007 Yukihiro Matsumoto + + * 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 * */Makefile.sub (COMMON_MACROS): workaround for old SDK's bug. diff --git a/class.c b/class.c index ead4d767ae..5bb801d2e0 100644 --- a/class.c +++ b/class.c @@ -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 mod. - */ - -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 diff --git a/include/ruby/intern.h b/include/ruby/intern.h index 8c39e2a6bd..2b50364d7c 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -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); diff --git a/include/ruby/node.h b/include/ruby/node.h index a5b66d35f9..51268061e0 100644 --- a/include/ruby/node.h +++ b/include/ruby/node.h @@ -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 diff --git a/object.c b/object.c index 031d2afdc8..660c9e1fe1 100644 --- a/object.c +++ b/object.c @@ -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);