Skip to content

Commit b7befda

Browse files
committed
Remove duplicated helper
1 parent eb0a0ee commit b7befda

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/main/java/org/truffleruby/stdlib/bigdecimal/CreateBigDecimalNode.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import com.oracle.truffle.api.profiles.ConditionProfile;
2121
import org.truffleruby.Layouts;
2222
import org.truffleruby.core.cast.BooleanCastNode;
23-
import org.truffleruby.core.cast.BooleanCastNodeGen;
2423
import org.truffleruby.core.string.StringOperations;
2524
import org.truffleruby.language.NotProvided;
2625
import org.truffleruby.language.RubyNode;
@@ -99,7 +98,7 @@ public DynamicObject create(double value, DynamicObject self, int digits,
9998

10099
@Specialization(guards = "value == NEGATIVE_INFINITY || value == POSITIVE_INFINITY")
101100
public DynamicObject createInfinity(BigDecimalType value, DynamicObject self, Object digits,
102-
@Cached("createBooleanCastNode()") BooleanCastNode booleanCastNode,
101+
@Cached("create()") BooleanCastNode booleanCastNode,
103102
@Cached("create()") GetIntegerConstantNode getIntegerConstantNode,
104103
@Cached("createPrivate()") CallDispatchHeadNode modeCallNode,
105104
@Cached("createBinaryProfile()") ConditionProfile raiseProfile) {
@@ -121,7 +120,7 @@ public DynamicObject createInfinity(BigDecimalType value, DynamicObject self, Ob
121120

122121
@Specialization(guards = "value == NAN")
123122
public DynamicObject createNaN(BigDecimalType value, DynamicObject self, Object digits,
124-
@Cached("createBooleanCastNode()") BooleanCastNode booleanCastNode,
123+
@Cached("create()") BooleanCastNode booleanCastNode,
125124
@Cached("create()") GetIntegerConstantNode getIntegerConstantNode,
126125
@Cached("createPrivate()") CallDispatchHeadNode modeCallNode,
127126
@Cached("createBinaryProfile()") ConditionProfile raiseProfile) {
@@ -273,8 +272,4 @@ protected BigDecimalCastNode createBigDecimalCastNode() {
273272
return BigDecimalCastNodeGen.create(null, null);
274273
}
275274

276-
protected BooleanCastNode createBooleanCastNode() {
277-
return BooleanCastNodeGen.create(null);
278-
}
279-
280275
}

0 commit comments

Comments
 (0)