-
-
Save zoffixznet/08d6488f2b56ff10f0e9dc3d21fe28a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/Rat.pm6 b/src/core/Rat.pm6 | |
index 811bbca..ea60b97 100644 | |
--- a/src/core/Rat.pm6 | |
+++ b/src/core/Rat.pm6 | |
@@ -207,7 +207,8 @@ multi sub infix:<**>(Rational:D \a, Int:D \b) { | |
multi sub infix:<==>(Rational:D \a, Rational:D \b) { | |
nqp::isfalse(a.denominator) || nqp::isfalse(b.denominator) | |
- ?? a.Num == b.Num | |
+ ?? a.numerator == b.numerator | |
+ && nqp::hllbool(nqp::istrue(a.numerator)) # NaN != NaN | |
!! a.numerator * b.denominator == b.numerator * a.denominator | |
} | |
multi sub infix:<==>(Rational:D \a, Int:D \b) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment