summaryrefslogtreecommitdiffstats
path: root/ruby.c
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ruby.c b/ruby.c
index e58d06938..334703a33 100644
--- a/ruby.c
+++ b/ruby.c
@@ -456,6 +456,8 @@ process_sflag(void)
sflag = 0;
}
+NODE *rb_parser_append_print(VALUE, NODE *);
+NODE *rb_parser_while_loop(VALUE, NODE *, int, int);
static NODE *proc_options(int argc, char **argv);
static char *
@@ -881,6 +883,13 @@ proc_options(int argc, char **argv)
FL_UNSET(rb_load_path, FL_TAINT);
}
+ if (do_print) {
+ tree = rb_parser_append_print(parser, tree);
+ }
+ if (do_loop) {
+ tree = rb_parser_while_loop(parser, tree, do_line, do_split);
+ }
+
return tree;
}
@@ -1232,9 +1241,6 @@ ruby_set_argv(int argc, char **argv)
}
}
-NODE *rb_parser_append_print(NODE *);
-NODE *rb_parser_while_loop(NODE *, int, int);
-
void *
ruby_process_options(int argc, char **argv)
{
@@ -1255,11 +1261,5 @@ ruby_process_options(int argc, char **argv)
printf("Syntax OK\n");
exit(0);
}
- if (do_print) {
- tree = rb_parser_append_print(tree);
- }
- if (do_loop) {
- tree = rb_parser_while_loop(tree, do_line, do_split);
- }
return tree;
}