diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-16 05:21:00 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-16 05:21:00 +0000 |
commit | 81f257aa10cce69cf2bee38f955f7c22c18e93e1 (patch) | |
tree | e9d06e0c1148c679c32aae1a726fe76353c84a89 /vm_args.c | |
parent | d40ee82b18f3ccc898d7a15a535c6e28cd214f79 (diff) |
merge revision(s) 49088: [Backport #10685]
* 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/branches/ruby_2_2@49273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_args.c')
-rw-r--r-- | vm_args.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 { |