Skip to content

Commit a27cdc1

Browse files
committed
constant masgn eval ordering fix
1 parent 848da7d commit a27cdc1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/org/jruby/prism/builder/IRBuilderPrism.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -980,12 +980,8 @@ private Operand buildConstantWrite(ConstantWriteNode node) {
980980
}
981981

982982
private Operand buildConstantWritePath(ConstantPathWriteNode node) {
983-
return buildConstantWritePath(node.target, build(node.value));
984-
}
985-
986-
// Multiple assignments provide the value otherwise it is grabbed from .value on the node.
987-
private Operand buildConstantWritePath(ConstantPathNode path, Operand value) {
988-
return putConstant(buildModuleParent(path.parent), path.name, value);
983+
var path = node.target;
984+
return putConstant(buildModuleParent(path.parent), path.name, build(node.value));
989985
}
990986

991987
private Operand buildDef(DefNode node) {

0 commit comments

Comments
 (0)