diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-05 09:28:08 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-05 09:28:08 +0000 |
commit | fb9df41221bfe285227537e04cb822b28188501e (patch) | |
tree | f55a0f8a40ed1a17ea6957e59754213d6fc291e1 /vm_insnhelper.c | |
parent | ac96c3f6c2e500ff6cc8cbceb98363eddb50f890 (diff) |
merge revision(s) 48102: [Backport #10413]
* class.c (unknown_keyword_error): delete expected keywords
directly from raw table, so that the given block is not called.
[ruby-core:65837] [Bug #10413]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@48284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index b639dd6f96..9f3a641fbe 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -148,10 +148,12 @@ static void unknown_keyword_error(const rb_iseq_t *iseq, VALUE hash) { VALUE sep = rb_usascii_str_new2(", "), keys; + st_table *tbl = rb_hash_tbl(hash); const char *msg; int i; for (i = 0; i < iseq->arg_keywords; i++) { - rb_hash_delete(hash, ID2SYM(iseq->arg_keyword_table[i])); + st_data_t key = ID2SYM(iseq->arg_keyword_table[i]); + st_delete(tbl, &key, NULL); } keys = rb_funcall(hash, rb_intern("keys"), 0, 0); if (!RB_TYPE_P(keys, T_ARRAY)) rb_raise(rb_eArgError, "unknown keyword"); |