aboutsummaryrefslogtreecommitdiffstats
path: root/class.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-04 08:50:29 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-04 08:50:29 +0000
commitf640beb5381c1675d77ea4c02119b1afa4b496e2 (patch)
tree63a8497d0d9876a46ae9d96fef65ce33c8167b62 /class.c
parent9a0e03a0d3cb020905a8f31b746dc52392a0eed2 (diff)
downloadruby-f640beb5381c1675d77ea4c02119b1afa4b496e2.tar.gz
class.c: missing unknown_keyword_error
* class.c (rb_get_kwargs): when values are stored, corresponding keys have been remove from the keyword hash, and the hash should be empty in that case. [ruby-dev:49893] [Bug #13004] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/class.c b/class.c
index 350e2cc31b..43530c9461 100644
--- a/class.c
+++ b/class.c
@@ -1896,7 +1896,7 @@ rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, V
}
}
if (!rest && keyword_hash) {
- if (RHASH_SIZE(keyword_hash) > (unsigned int)j) {
+ if (RHASH_SIZE(keyword_hash) > (unsigned int)(values ? 0 : j)) {
unknown_keyword_error(keyword_hash, table, required+optional);
}
}