summaryrefslogtreecommitdiff
path: root/eval_error.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-05 03:39:29 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-05 03:39:29 +0000
commit0a2b36a99c189d7a7397e1589d161277a4324cc8 (patch)
tree385b39a1a47f6c5a15d437e1845f91b5259e0fe4 /eval_error.c
parentd857a1b0d77b1961d7432f598deab0308fe7d361 (diff)
* eval.c (rb_longjmp): reset raised flag before fatal error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_error.c')
-rw-r--r--eval_error.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/eval_error.c b/eval_error.c
index 85e55ad..809a66f 100644
--- a/eval_error.c
+++ b/eval_error.c
@@ -87,10 +87,12 @@ error_print(void)
if (NIL_P(errat)) {
const char *file = rb_sourcefile();
int line = rb_sourceline();
- if (file)
- warn_printf("%s:%d", file, line);
- else
+ if (!file)
warn_printf("%d", line);
+ else if (!line)
+ warn_printf("%s", file, line);
+ else
+ warn_printf("%s:%d", file, line);
}
else if (RARRAY_LEN(errat) == 0) {
error_pos();