diff options
| author | KOBAYASHI Shuji <[email protected]> | 2019-12-12 11:45:58 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2019-12-12 11:45:58 +0900 |
| commit | 81de1f159ce97821e16a127d600bffe1aa724bde (patch) | |
| tree | 78e5d44f25fc67980bf08fc5781baefc2adf5311 /mrbgems/mruby-struct | |
| parent | 9c4c82ed1c6cf21d420dc62185fc42552ad2e924 (diff) | |
| download | mruby-81de1f159ce97821e16a127d600bffe1aa724bde.tar.gz mruby-81de1f159ce97821e16a127d600bffe1aa724bde.zip | |
Add `mrb_num_args_error()` for "wrong number of arguments" error
To unify the style of messages.
Diffstat (limited to 'mrbgems/mruby-struct')
| -rw-r--r-- | mrbgems/mruby-struct/src/struct.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-struct/src/struct.c b/mrbgems/mruby-struct/src/struct.c index 2d82c2466..726b66f96 100644 --- a/mrbgems/mruby-struct/src/struct.c +++ b/mrbgems/mruby-struct/src/struct.c @@ -274,7 +274,7 @@ mrb_struct_s_def(mrb_state *mrb, mrb_value klass) name = mrb_nil_value(); mrb_get_args(mrb, "*&", &argv, &argc, &b); if (argc == 0) { /* special case to avoid crash */ - mrb_raise(mrb, E_ARGUMENT_ERROR, "wrong number of arguments"); + mrb_num_args_error(mrb, argc, 1, -1); } else { pargv = argv; |
