diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2019-07-15 14:07:22 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2019-07-15 14:08:17 +0900 |
commit | 711dfec3fa9623c5e8ef6f5ce3627f8f1a85f19d (patch) | |
tree | 43b6dc1b88ca7d1cabe185416cae51736d12ffe4 /parse.y | |
parent | 5353401c254a926426d9a289606fad18a755fcd2 (diff) | |
download | ruby-711dfec3fa9623c5e8ef6f5ce3627f8f1a85f19d.tar.gz |
parse.y (here_document): remove dead code
str is always zero when evaluating the branch.
Found by Coverity Scan.
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -7306,10 +7306,7 @@ here_document(struct parser_params *p, rb_strterm_heredoc_t *here) dispatch_scan_event(p, tSTRING_CONTENT); } else { - if (str) { - rb_str_append(p->delayed, str); - } - else if ((len = p->lex.pcur - p->lex.ptok) > 0) { + if ((len = p->lex.pcur - p->lex.ptok) > 0) { if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { int cr = ENC_CODERANGE_UNKNOWN; rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr); |