Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Truffle] Do not duplicate a String Hash key if already frozen.
  • Loading branch information
eregon committed Oct 5, 2014
1 parent d82e749 commit 8d1f6d2
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -98,7 +98,7 @@ public RubyHash executeRubyHash(VirtualFrame frame) {
initializers: for (int n = 0; n < keyValues.length; n += 2) {
Object key = keyValues[n].execute(frame);

if (key instanceof RubyString) {
if (key instanceof RubyString && !((RubyString) key).isFrozen()) {
key = freezeNode.call(frame, dupNode.call(frame, key, "dup", null), "freeze", null);
}

Expand Down

0 comments on commit 8d1f6d2

Please sign in to comment.