summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/vm.c b/vm.c
index e64c072fdc..de2cee9485 100644
--- a/vm.c
+++ b/vm.c
@@ -2653,13 +2653,9 @@ static VALUE core_hash_merge_kwd(int argc, VALUE *argv);
static VALUE
core_hash_merge(VALUE hash, long argc, const VALUE *argv)
{
- long i;
-
Check_Type(hash, T_HASH);
VM_ASSERT(argc % 2 == 0);
- for (i=0; i<argc; i+=2) {
- rb_hash_aset(hash, argv[i], argv[i+1]);
- }
+ rb_hash_bulk_insert(argc, argv, hash);
return hash;
}