diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-10-30 10:31:06 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-10-30 10:31:06 +0900 |
| commit | 378aa8a9c8f1af6b063c7d39b2e69eb106dabeef (patch) | |
| tree | 9adec6e39572c9d01da1581a18f47580613d0d08 /src/array.c | |
| parent | 5bd3d9bc27438ba4cea030a67af02db02f24785b (diff) | |
| download | mruby-378aa8a9c8f1af6b063c7d39b2e69eb106dabeef.tar.gz mruby-378aa8a9c8f1af6b063c7d39b2e69eb106dabeef.zip | |
avoid wrong ArgumentError from mrb_get_args() when surrounding method takes more than one argument; ref #2627
Diffstat (limited to 'src/array.c')
| -rw-r--r-- | src/array.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/array.c b/src/array.c index 02cc1a83a..48dc1ff10 100644 --- a/src/array.c +++ b/src/array.c @@ -662,9 +662,10 @@ aget_index(mrb_state *mrb, mrb_value index) return (mrb_int)mrb_float(index); } else { - mrb_int i; + mrb_int i, argc; + mrb_value *argv; - mrb_get_args(mrb, "i", &i); + mrb_get_args(mrb, "i*", &i, &argv, &argc); return i; } } |
