mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
compile.c: omit unnecessary defined guard
* compile.c (defined_expr): omit unnecessary defined guard when method call has no receiver and no arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0886a02707
commit
7e001f288b
1 changed files with 1 additions and 1 deletions
|
@ -3601,7 +3601,7 @@ defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
|
|||
(type == NODE_CALL ||
|
||||
(type == NODE_ATTRASGN && !private_recv_p(node)));
|
||||
|
||||
if (!lfinish[1]) {
|
||||
if (!lfinish[1] && (node->nd_args || explicit_receiver)) {
|
||||
lfinish[1] = NEW_LABEL(nd_line(node));
|
||||
}
|
||||
if (node->nd_args) {
|
||||
|
|
Loading…
Reference in a new issue