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

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
This commit is contained in:
nobu 2016-12-09 02:57:57 +00:00
parent 761653db90
commit e9a8e8ab4a
2 changed files with 9 additions and 0 deletions

View file

@ -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
}
}
}

4
vm.c
View file

@ -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);