summaryrefslogtreecommitdiffstats
path: root/ruby.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-20 04:19:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-20 04:19:27 +0000
commitf8d3a9dd48d33bcd035e6d9ad7352c4eabf3f367 (patch)
tree9fea84c313f3158cc73ced2705c13494cfb554ec /ruby.c
parent49d34e6cae1e53c1f9190142d5b41af0b69d90bf (diff)
downloadruby-f8d3a9dd48d33bcd035e6d9ad7352c4eabf3f367.tar.gz
ruby-f8d3a9dd48d33bcd035e6d9ad7352c4eabf3f367.tar.xz
ruby-f8d3a9dd48d33bcd035e6d9ad7352c4eabf3f367.zip
* ruby.c (process_options): --dump option exit immediately.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index 5fe37ee40..0f587f845 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1142,9 +1142,11 @@ process_options(VALUE arg)
iseq = rb_iseq_new(tree, rb_str_new2("<main>"),
opt->script_name, Qfalse, ISEQ_TYPE_TOP);
+
if (opt->dump & DUMP_BIT(insns)) {
rb_io_write(rb_stdout, ruby_iseq_disasm(iseq));
rb_io_flush(rb_stdout);
+ return Qtrue;
}
return iseq;