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

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-01-25 13:22:36 +00:00
parent 9237049efe
commit d00ef6b3cd

View file

@ -2842,7 +2842,9 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
* =>
* 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;
}