aboutsummaryrefslogtreecommitdiffstats
path: root/error.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-02 16:47:12 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-02 16:47:12 +0900
commit8b2e1ca10ecf92ad402decd6b1eab586eded0ddb (patch)
treeb3b25f9644a49971f0c4d6010d1695fe0f08750c /error.c
parent8e38d4c78c1a9b45f604963f85995e9a817ee72c (diff)
downloadruby-8b2e1ca10ecf92ad402decd6b1eab586eded0ddb.tar.gz
Do not clear backtrace in Exception#exception
[Bug #15558]
Diffstat (limited to 'error.c')
-rw-r--r--error.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/error.c b/error.c
index 290ab7a509..2089c3787e 100644
--- a/error.c
+++ b/error.c
@@ -970,11 +970,11 @@ exc_exception(int argc, VALUE *argv, VALUE self)
{
VALUE exc;
+ argc = rb_check_arity(argc, 0, 1);
if (argc == 0) return self;
if (argc == 1 && self == argv[0]) return self;
exc = rb_obj_clone(self);
- exc_initialize(argc, argv, exc);
-
+ rb_ivar_set(exc, id_mesg, argv[0]);
return exc;
}