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

Remove unnecessary condition

`no_blockarg` is called for non-null `node` only.
This commit is contained in:
Nobuyoshi Nakada 2022-06-15 15:25:48 +09:00
parent d417c1ddc5
commit bb12aa4d15
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -11930,7 +11930,7 @@ logop(struct parser_params *p, ID id, NODE *left, NODE *right,
static void
no_blockarg(struct parser_params *p, NODE *node)
{
if (node && nd_type_p(node, NODE_BLOCK_PASS)) {
if (nd_type_p(node, NODE_BLOCK_PASS)) {
compile_error(p, "block argument should not be given");
}
}