[前][次][番号順一覧][スレッド一覧]

ruby-changes:44958

From: nobu <ko1@a...>
Date: Fri, 9 Dec 2016 11:58:04 +0900 (JST)
Subject: [ruby-changes:44958] nobu:r57030 (trunk): remove core#hash_merge_ary

nobu	2016-12-09 11:57:57 +0900 (Fri, 09 Dec 2016)

  New Revision: 57030

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57030

  Log:
    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.

  Modified files:
    trunk/compile.c
    trunk/vm.c
Index: vm.c
===================================================================
--- vm.c	(revision 57029)
+++ vm.c	(revision 57030)
@@ -2625,12 +2625,14 @@ core_hash_from_ary(VALUE ary) https://github.com/ruby/ruby/blob/trunk/vm.c#L2625
     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) https://github.com/ruby/ruby/blob/trunk/vm.c#L2759
     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);
Index: compile.c
===================================================================
--- compile.c	(revision 57029)
+++ compile.c	(revision 57030)
@@ -3090,9 +3090,14 @@ compile_array_(rb_iseq_t *iseq, LINK_ANC https://github.com/ruby/ruby/blob/trunk/compile.c#L3090
 			    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
 			}
 		    }
 		}

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]