summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2018-11-05 21:52:17 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2018-11-05 21:52:17 +0900
commitd25ebec988f61f60d181f38dad9057243034eb10 (patch)
tree2b5d4f2828c2dce06bd46b6b8ddce421ef39aa3a /src
parentd47003aea406e1e48ef79efd61b17d5121c4c6b9 (diff)
downloadmruby-d25ebec988f61f60d181f38dad9057243034eb10.tar.gz
mruby-d25ebec988f61f60d181f38dad9057243034eb10.zip
Fixed wrong `ArgumentError` with keyword arguments; fix #4159
Diffstat (limited to 'src')
-rw-r--r--src/vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vm.c b/src/vm.c
index 19288245c..5779791bc 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1803,7 +1803,7 @@ RETRY_TRY_BLOCK:
kdict = argv[argc-1];
mrb_hash_check_kdict(mrb, kdict);
}
- else if (r) {
+ else if (r || argc <= m1+m2+o) {
kdict = mrb_hash_new(mrb);
kargs = 0;
}