From 7523cdf3404230213cb858f38bd91135d478a7f3 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Wed, 11 Jan 2017 09:51:52 +0900 Subject: Exception#initialize to take arbitrary number of args; ref #3384 --- src/error.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/error.c') diff --git a/src/error.c b/src/error.c index b24aed798..fda2cd15c 100644 --- a/src/error.c +++ b/src/error.c @@ -44,8 +44,10 @@ static mrb_value exc_initialize(mrb_state *mrb, mrb_value exc) { mrb_value mesg; + int argc; + mrb_value *argv; - if (mrb_get_args(mrb, "|o", &mesg) == 1) { + if (mrb_get_args(mrb, "|o*", &mesg, &argv, &argc) >= 1) { mrb_iv_set(mrb, exc, mrb_intern_lit(mrb, "mesg"), mesg); } return exc; -- cgit v1.2.3