diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-25 13:22:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-25 13:22:36 +0000 |
commit | d00ef6b3cd294f230fca1108b2fcd29e88e295d4 (patch) | |
tree | 63f350406f620d9db5a1ab26909e70f8f6018015 /compile.c | |
parent | 9237049efe48ce61219aeacf855da90e6e7602fb (diff) |
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
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; } |