ruby-changes:49923
From: nobu <ko1@a...>
Date: Thu, 25 Jan 2018 22:22:43 +0900 (JST)
Subject: [ruby-changes:49923] nobu:r62041 (trunk): compile.c: check mid
nobu 2018-01-25 22:22:36 +0900 (Thu, 25 Jan 2018) New Revision: 62041 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62041 Log: compile.c: check mid * compile.c (iseq_peephole_optimize): check that method ID is +@. fix up r62039. http://d.hatena.ne.jp/nagachika/20180125/ruby_trunk_changes_62025_62039#r62039 Modified files: trunk/compile.c Index: compile.c =================================================================== --- compile.c (revision 62040) +++ compile.c (revision 62041) @@ -2842,7 +2842,9 @@ iseq_peephole_optimize(rb_iseq_t *iseq, https://github.com/ruby/ruby/blob/trunk/compile.c#L2842 * => * send <:+@, 0, ARG_SIMPLE> */ - if ((ci->flag & VM_CALL_ARGS_SIMPLE) && ci->orig_argc == 0) { + if (ci->mid == idUPlus && + (ci->flag & VM_CALL_ARGS_SIMPLE) && + ci->orig_argc == 0) { ELEM_REMOVE(list); return COMPILE_OK; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/