diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-19 07:18:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-19 07:18:23 +0000 |
commit | af9a151f0b381fa0413bfecc76b354de456c0c61 (patch) | |
tree | 0f89554f2726c83ad2c6bacccc613d3f5999c90e /parse.y | |
parent | 18a315df4395f63af99f2952201534bc678d6f57 (diff) | |
download | ruby-af9a151f0b381fa0413bfecc76b354de456c0c61.tar.gz |
parse.y: chomp by -l
* parse.y (rb_parser_while_loop): should chomp but not chop by -l
option. [ruby-core:78099] [Bug #12926]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -10728,7 +10728,7 @@ rb_parser_append_print(VALUE vparser, NODE *node) } NODE * -rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) +rb_parser_while_loop(VALUE vparser, NODE *node, int chomp, int split) { NODE *prelude = 0; NODE *scope = node; @@ -10750,9 +10750,9 @@ rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) rb_intern("split"), 0)), node); } - if (chop) { + if (chomp) { node = block_append(NEW_CALL(NEW_GVAR(idLASTLINE), - rb_intern("chop!"), 0), node); + rb_intern("chomp!"), 0), node); } node = NEW_OPT_N(node); |