From e9a8e8ab4a59c4ec53a1a944498d86656527e93e Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 9 Dec 2016 02:57:57 +0000 Subject: [PATCH] remove core#hash_merge_ary * compile.c (compile_array_): remove m_core_hash_merge_ary which seems unreachable, and wrong number of arguments. * vm.c (m_core_hash_merge_ary): removed because it is never used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- compile.c | 5 +++++ vm.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/compile.c b/compile.c index 50136b483e..7de1da8694 100644 --- a/compile.c +++ b/compile.c @@ -3090,9 +3090,14 @@ compile_array_(rb_iseq_t *iseq, LINK_ANCHOR *const ret, NODE* node_root, ADD_INSN(ret, line, concatarray); } else { +#if 0 ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE)); ADD_INSN1(ret, line, putobject, ary); ADD_SEND(ret, line, id_core_hash_merge_ary, INT2FIX(1)); + /* wrong number of arguments -----------------------^ */ +#else + compile_bug(ERROR_ARGS "core#hash_merge_ary"); +#endif } } } diff --git a/vm.c b/vm.c index 67a6e8e164..b00a3e3505 100644 --- a/vm.c +++ b/vm.c @@ -2625,12 +2625,14 @@ core_hash_from_ary(VALUE ary) return core_hash_merge_ary(hash, ary); } +#if 0 static VALUE m_core_hash_merge_ary(VALUE self, VALUE hash, VALUE ary) { REWIND_CFP(core_hash_merge_ary(hash, ary)); return hash; } +#endif static VALUE core_hash_merge_ary(VALUE hash, VALUE ary) @@ -2757,7 +2759,9 @@ Init_VM(void) rb_define_method_id(klass, id_core_define_singleton_method, m_core_define_singleton_method, 3); rb_define_method_id(klass, id_core_set_postexe, m_core_set_postexe, 0); rb_define_method_id(klass, id_core_hash_from_ary, m_core_hash_from_ary, 1); +#if 0 rb_define_method_id(klass, id_core_hash_merge_ary, m_core_hash_merge_ary, 2); +#endif rb_define_method_id(klass, id_core_hash_merge_ptr, m_core_hash_merge_ptr, -1); rb_define_method_id(klass, id_core_hash_merge_kwd, m_core_hash_merge_kwd, -1); rb_define_method_id(klass, idProc, rb_block_proc, 0);