diff --git a/insns.def b/insns.def index 43690be52e..7dfeed202b 100644 --- a/insns.def +++ b/insns.def @@ -526,11 +526,13 @@ newhash { RUBY_DTRACE_CREATE_HOOK(HASH, num); - val = rb_hash_new_with_size(num / 2); - if (num) { + val = rb_hash_new_with_size(num / 2); rb_hash_bulk_insert(num, STACK_ADDR_FROM_TOP(num), val); } + else { + val = rb_hash_new(); + } } /* put new Range object.(Range.new(low, high, flag)) */