File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
core/src/main/java/org/jruby/truffle/nodes/core Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -613,9 +613,6 @@ public abstract static class ToINode extends CoreMethodNode {
613
613
614
614
@ Child protected FixnumOrBignumNode fixnumOrBignum ;
615
615
616
- private final BranchProfile greaterZero = new BranchProfile ();
617
- private final BranchProfile lessZero = new BranchProfile ();
618
-
619
616
public ToINode (RubyContext context , SourceSection sourceSection ) {
620
617
super (context , sourceSection );
621
618
fixnumOrBignum = new FixnumOrBignumNode ();
@@ -636,15 +633,7 @@ public Object toI(double value) {
636
633
throw new RaiseException (getContext ().getCoreLibrary ().floatDomainError ("NaN" , this ));
637
634
}
638
635
639
- double truncated = value ;
640
-
641
- if (value > 0.0 ) {
642
- truncated = Math .floor (value );
643
- } else if (value < 0.0 ) {
644
- truncated = Math .ceil (value );
645
- }
646
-
647
- return fixnumOrBignum .fixnumOrBignum (getContext (), truncated );
636
+ return fixnumOrBignum .fixnumOrBignum (getContext (), value );
648
637
}
649
638
650
639
}
You can’t perform that action at this time.
0 commit comments