Skip to content

Commit 2360152

Browse files
committed
[Truffle] Fix array construction in Hash#each
1 parent 88ae22c commit 2360152

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

truffle/src/main/java/org/jruby/truffle/nodes/core/HashNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ public RubyHash eachPackedArray(VirtualFrame frame, RubyHash hash, RubyProc bloc
573573
}
574574

575575
if (n < size) {
576-
yield(frame, block, RubyArray.fromObjects(getContext().getCoreLibrary().getArrayClass(), store[n * 2], store[n * 2 + 1]));
576+
yield(frame, block, new RubyArray(getContext().getCoreLibrary().getArrayClass(), new Object[]{store[n * 2], store[n * 2 + 1]}, 2));
577577
}
578578
}
579579
} finally {

0 commit comments

Comments
 (0)