Commit fae483ff authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

the argument for Exception.new is optinal

parent e3c1b48b
......@@ -56,9 +56,9 @@ exc_initialize(mrb_state *mrb, mrb_value exc)
{
mrb_value mesg;
mrb_get_args(mrb, "o", &mesg);
mrb_iv_set(mrb, exc, mrb_intern(mrb, "mesg"), mesg);
if (mrb_get_args(mrb, "|o", &mesg) == 1) {
mrb_iv_set(mrb, exc, mrb_intern(mrb, "mesg"), mesg);
}
return exc;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment