Skip to content

Commit

Permalink
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ir/operands/Hash.java
Original file line number Diff line number Diff line change
@@ -107,7 +107,7 @@ public Object retrieve(ThreadContext context, IRubyObject self, StaticScope curr
RubyHash hash;
Iterator<KeyValuePair<Operand, Operand>> it = pairs.iterator();

if (isKWArgsHash && pairs.get(0).getKey() == Symbol.KW_REST_ARG_DUMMY) {
if (isKWArgsHash && pairs.get(0).getKey().equals(Symbol.KW_REST_ARG_DUMMY)) {
// Dup the rest args hash and use that as the basis for inserting the non-rest args
hash = ((RubyHash) pairs.get(0).getValue().retrieve(context, self, currScope, currDynScope, temp)).dupFast(context);
// Skip the first pair
6 changes: 6 additions & 0 deletions core/src/main/java/org/jruby/ir/operands/Symbol.java
Original file line number Diff line number Diff line change
@@ -25,6 +25,12 @@ public Symbol(ByteList bytes) {
this.bytes = bytes;
}

public boolean equals(Object other) {
if (!(other instanceof Symbol)) return false;

return bytes.equals(((Symbol) other).bytes);
}

@Override
public OperandType getOperandType() {
return OperandType.SYMBOL;

1 comment on commit 7118975

@flash-gordon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Please sign in to comment.