diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-28 13:34:14 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-28 13:34:14 +0900 |
| commit | 220f3124b9bd7a993e78b5832d0501209236487f (patch) | |
| tree | 28ff349094cb6bfc987c402b8e3960f7af347f7a /src/vm.c | |
| parent | b1ec92f7cd3a86f88a2e82a7dbf0ad0b1ab1c5c1 (diff) | |
| download | mruby-220f3124b9bd7a993e78b5832d0501209236487f.tar.gz mruby-220f3124b9bd7a993e78b5832d0501209236487f.zip | |
should care about the case that given arguments are less then mandatory formal arguments and optional arguments exist; close #2144
Diffstat (limited to 'src/vm.c')
| -rw-r--r-- | src/vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1303,7 +1303,7 @@ RETRY_TRY_BLOCK: if (r) { regs[m1+o+1] = mrb_ary_new_capa(mrb, 0); } - if (o == 0) pc++; + if (o == 0 || argc < m1+m2) pc++; else pc += argc - m1 - m2 + 1; } |
