aboutsummaryrefslogtreecommitdiffstats
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-26 07:23:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-26 07:23:23 +0000
commit38828e61970293b1be6113413cbce96294280953 (patch)
tree57a01309af17a79bcf3f47f2bb95cf135fa955ca /vm.c
parent9016f61ef226ec0acf6cfc7ddc429257312ca1db (diff)
downloadruby-38828e61970293b1be6113413cbce96294280953.tar.gz
common conversion functions
* array.c (rb_to_array_type): make public to share common code internally. * hash.c (rb_to_hash_type): make public to share common code internally. * symbol.c (rb_to_symbol_type): make public to share common code internally. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/vm.c b/vm.c
index 19ec4f4a09..7c8bba9af4 100644
--- a/vm.c
+++ b/vm.c
@@ -2763,8 +2763,7 @@ core_hash_merge_kwd(int argc, VALUE *argv)
VALUE hash, kw;
rb_check_arity(argc, 1, 2);
hash = argv[0];
- kw = argv[argc-1];
- kw = rb_convert_type_with_id(kw, T_HASH, "Hash", idTo_hash);
+ kw = rb_to_hash_type(argv[argc-1]);
if (argc < 2) hash = kw;
rb_hash_foreach(kw, argc < 2 ? kwcheck_i : kwmerge_i, hash);
return hash;