diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-18 00:19:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-18 00:19:10 +0000 |
commit | e873e9269be48d08e1c42ba46240e949006db5ac (patch) | |
tree | 8b1b0e5114418465bc35aa55abb0893716199162 /ruby.c | |
parent | 59b946f574ec11e3d60aa0ab4f94dbc8c33578f8 (diff) | |
download | ruby-e873e9269be48d08e1c42ba46240e949006db5ac.tar.gz ruby-e873e9269be48d08e1c42ba46240e949006db5ac.tar.xz ruby-e873e9269be48d08e1c42ba46240e949006db5ac.zip |
* parse.y (rb_parser_append_print, rb_parser_while_loop): moved check
for node to the head.
* ruby.c (proc_options): do nothing for -p/-n options if tree is null.
submitted by Yusuke ENDOH <mame AT tsg.ne.jp> at [ruby-dev:31243].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -883,10 +883,10 @@ proc_options(int argc, char **argv) FL_UNSET(rb_load_path, FL_TAINT); } - if (do_print) { + if (tree && do_print) { tree = rb_parser_append_print(parser, tree); } - if (do_loop) { + if (tree && do_loop) { tree = rb_parser_while_loop(parser, tree, do_line, do_split); } |