summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-01-11 09:51:52 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-01-11 10:29:55 +0900
commit7523cdf3404230213cb858f38bd91135d478a7f3 (patch)
treee4ab391ea791281df1b4c00eab9b41588be75814
parentc4491e477b40adc842ef76e524647607780c8f25 (diff)
downloadmruby-7523cdf3404230213cb858f38bd91135d478a7f3.tar.gz
mruby-7523cdf3404230213cb858f38bd91135d478a7f3.zip
Exception#initialize to take arbitrary number of args; ref #3384
-rw-r--r--src/error.c4
1 files changed, 3 insertions, 1 deletions
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;