From 0e03b00c6157f1f4d0f59855dcf741c710a6fd14 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 12 Apr 2008 03:41:51 +0000 Subject: * eval.c (ruby_exec_node, ruby_run_node), ruby.c (process_options): use iseq instead of NODE. * gc.c (source_filenames): removed. * include/ruby/intern.h, parse.y (yycompile, parser_mark, parser_free, ripper_initialize): rb_source_filename() is no longer used. * compile.c, compile.h (ERROR_ARGS), parse.y (node_newnode, fixpos, parser_warn, e_option_supplied, warn_unless_e_option, range_op, cond0): nd_file is no longer used. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'ruby.c') diff --git a/ruby.c b/ruby.c index 075c3d057..4890d94b0 100644 --- a/ruby.c +++ b/ruby.c @@ -1103,16 +1103,15 @@ process_options(VALUE arg) return Qtrue; } - if (tree) { - if (opt->do_print) { - tree = rb_parser_append_print(parser, tree); - } - if (opt->do_loop) { - tree = rb_parser_while_loop(parser, tree, opt->do_line, opt->do_split); - } + if (opt->do_print) { + tree = rb_parser_append_print(parser, tree); + } + if (opt->do_loop) { + tree = rb_parser_while_loop(parser, tree, opt->do_line, opt->do_split); } - return (VALUE)tree; + return rb_iseq_new(tree, rb_str_new2("
"), + rb_str_new2(opt->script), Qfalse, ISEQ_TYPE_TOP); } static NODE * -- cgit