summaryrefslogtreecommitdiff
path: root/vm_args.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-01 00:14:23 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-01 00:14:23 (GMT)
commit6a37b8cde38465a72991579e660d435faaa006ab (patch)
tree6438de2aea50bea85fb315fded216b80afa1c8ab /vm_args.c
parent1026907467ea3d5441e1bfa95f5f37b431a684f3 (diff)
vm_args.c: fix non-symbol keys hash
* vm_args.c (keyword_hash_p): fix non-symbol keys hash. rb_extract_keywords() returns 0 not Qnil when no symbol keys is included. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_args.c')
-rw-r--r--vm_args.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vm_args.c b/vm_args.c
index 55f6a34..48a46d5 100644
--- a/vm_args.c
+++ b/vm_args.c
@@ -179,7 +179,9 @@ keyword_hash_p(VALUE *kw_hash_ptr, VALUE *rest_hash_ptr, rb_thread_t *th, const
th->mark_stack_len = msl;
if (!NIL_P(*rest_hash_ptr)) {
- *kw_hash_ptr = rb_extract_keywords(rest_hash_ptr);
+ VALUE hash = rb_extract_keywords(rest_hash_ptr);
+ if (!hash) hash = Qnil;
+ *kw_hash_ptr = hash;
return TRUE;
}
else {