Skip to content

Commit 832c331

Browse files
committed
Properly recognize +Inf in coerce_s2n and thus smart_numify.
1 parent 1dfa4ca commit 832c331

File tree

1 file changed

+2
-0
lines changed
  • src/vm/jvm/runtime/org/perl6/nqp/runtime

1 file changed

+2
-0
lines changed

src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5638,6 +5638,8 @@ public static double coerce_s2n(String in) {
56385638
catch (NumberFormatException e) {
56395639
if (in.equals("Inf"))
56405640
return Double.POSITIVE_INFINITY;
5641+
if (in.equals("+Inf"))
5642+
return Double.POSITIVE_INFINITY;
56415643
if (in.equals("-Inf"))
56425644
return Double.NEGATIVE_INFINITY;
56435645
if (in.equals("NaN"))

0 commit comments

Comments
 (0)