[前][次][番号順一覧][スレッド一覧]

ruby-changes:60853

From: Yusuke <ko1@a...>
Date: Tue, 21 Apr 2020 17:44:11 +0900 (JST)
Subject: [ruby-changes:60853] 487d0c99d5 (master): eval_error.c: revert the "reversed" backtrace [Feature #8661]

https://git.ruby-lang.org/ruby.git/commit/?id=487d0c99d5

From 487d0c99d53208594702bb3ce1c657130fb8d65f Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Tue, 21 Apr 2020 17:39:32 +0900
Subject: eval_error.c: revert the "reversed" backtrace [Feature #8661]

Now, the order is good, old-fashioned style:

```
$ ./local/bin/ruby -e 'def foo; raise; end
def bar; foo; end
def baz; bar; end
def qux; baz; end
qux
'
-e:1:in `foo': unhandled exception
	from -e:2:in `bar'
	from -e:3:in `baz'
	from -e:4:in `qux'
	from -e:5:in `<main>'
```

diff --git a/eval_error.c b/eval_error.c
index 74f09a8..809d8ae 100644
--- a/eval_error.c
+++ b/eval_error.c
@@ -362,7 +362,7 @@ rb_ec_error_print(rb_execution_context_t * volatile ec, volatile VALUE errinfo) https://github.com/ruby/ruby/blob/trunk/eval_error.c#L362
 	emesg = rb_get_message(errinfo);
     }
 
-    rb_error_write(errinfo, emesg, errat, Qnil, Qnil, Qnil);
+    rb_error_write(errinfo, emesg, errat, Qnil, Qnil, Qfalse);
 
     EC_POP_TAG();
     ec->errinfo = errinfo;
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]