Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

implement Int.Rat, pass unpolar.t

  • Loading branch information...
commit 179d411e1815a74240cadf2e8da42df1ec936318 1 parent 11972a9
@moritz moritz authored
Showing with 7 additions and 1 deletion.
  1. +6 −0 src/core/Int.pm
  2. +1 −1  t/spectest.data
View
6 src/core/Int.pm
@@ -1,3 +1,5 @@
+class Rat { ... }
+
my class Int {
method Bool() {
nqp::p6bool(
@@ -14,6 +16,10 @@ my class Int {
nqp::p6box_n(nqp::unbox_i(self));
}
+ method Rat() {
+ Rat.new(self, 1);
+ }
+
method abs() {
nqp::p6box_i(nqp::abs_i(nqp::unbox_i(self)));
}
View
2  t/spectest.data
@@ -531,7 +531,7 @@ S32-num/polar.t
# S32-num/rounders.t
# S32-num/sign.t
# S32-num/sqrt.t
-# S32-num/unpolar.t
+S32-num/unpolar.t
S32-scalar/defined.t
# S32-scalar/undef.t
S32-str/append.t
Please sign in to comment.
Something went wrong with that request. Please try again.