From 13ac4447f6a11498d84f668c636fa2b8eecb5d22 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 30 Sep 2003 00:21:14 +0000 Subject: * eval.c (rb_eval): while/until should not capture break unless they are destination of the break. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- process.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'process.c') diff --git a/process.c b/process.c index d1c9724094..e30818d0e7 100644 --- a/process.c +++ b/process.c @@ -159,7 +159,14 @@ pst_inspect(st) snprintf(buf, sizeof(buf), "#<%s: pid=%ld", rb_class2name(CLASS_OF(st)), NUM2LONG(pid)); str = rb_str_new2(buf); if (WIFSTOPPED(status)) { - snprintf(buf, sizeof(buf), ",stopped(%d)", WSTOPSIG(status)); + int stopsig = WSTOPSIG(status); + char *signame = ruby_signal_name(stopsig); + if (signame) { + snprintf(buf, sizeof(buf), ",signaled(SIG%s=%d)", signame, stopsig); + } + else { + snprintf(buf, sizeof(buf), ",signaled(%d)", stopsig); + } rb_str_cat2(str, buf); } if (WIFSIGNALED(status)) { -- cgit v1.2.3