* eval.c (error_handle): default to 1 unless status is set.
* eval.c (ruby_options): guard error_handle() with PROT_NONE. * eval.c (ruby_stop): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dbdde236cb
commit
7c96563256
@ -1,3 +1,11 @@
|
|||||||
|
Mon Apr 8 04:50:51 2002 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
|
||||||
|
|
||||||
|
* eval.c (error_handle): default to 1 unless status is set.
|
||||||
|
|
||||||
|
* eval.c (ruby_options): guard error_handle() with PROT_NONE.
|
||||||
|
|
||||||
|
* eval.c (ruby_stop): ditto.
|
||||||
|
|
||||||
Fri Apr 5 05:07:28 2002 Takaaki Tateishi <ttate@kt.jaist.ac.jp>
|
Fri Apr 5 05:07:28 2002 Takaaki Tateishi <ttate@kt.jaist.ac.jp>
|
||||||
|
|
||||||
* ext/dl: Add dl/struct.rb.
|
* ext/dl: Add dl/struct.rb.
|
||||||
|
6
eval.c
6
eval.c
@ -1129,7 +1129,7 @@ error_handle(ex)
|
|||||||
case TAG_FATAL:
|
case TAG_FATAL:
|
||||||
if (rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) {
|
if (rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) {
|
||||||
VALUE st = rb_iv_get(ruby_errinfo, "status");
|
VALUE st = rb_iv_get(ruby_errinfo, "status");
|
||||||
ex = NUM2INT(st);
|
ex = NIL_P(st) ? 1 : NUM2INT(st);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
error_print();
|
error_print();
|
||||||
@ -1154,12 +1154,12 @@ ruby_options(argc, argv)
|
|||||||
if ((state = EXEC_TAG()) == 0) {
|
if ((state = EXEC_TAG()) == 0) {
|
||||||
ruby_process_options(argc, argv);
|
ruby_process_options(argc, argv);
|
||||||
}
|
}
|
||||||
POP_TAG();
|
|
||||||
if (state) {
|
if (state) {
|
||||||
trace_func = 0;
|
trace_func = 0;
|
||||||
tracing = 0;
|
tracing = 0;
|
||||||
exit(error_handle(state));
|
exit(error_handle(state));
|
||||||
}
|
}
|
||||||
|
POP_TAG();
|
||||||
}
|
}
|
||||||
|
|
||||||
void rb_exec_end_proc _((void));
|
void rb_exec_end_proc _((void));
|
||||||
@ -1194,11 +1194,11 @@ ruby_stop(ex)
|
|||||||
ex = state;
|
ex = state;
|
||||||
}
|
}
|
||||||
POP_ITER();
|
POP_ITER();
|
||||||
POP_TAG();
|
|
||||||
|
|
||||||
trace_func = 0;
|
trace_func = 0;
|
||||||
tracing = 0;
|
tracing = 0;
|
||||||
ex = error_handle(ex);
|
ex = error_handle(ex);
|
||||||
|
POP_TAG();
|
||||||
ruby_finalize();
|
ruby_finalize();
|
||||||
exit(ex);
|
exit(ex);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user