Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement .Rat in Rat in Rakudo #1442

Closed
p6rt opened this issue Dec 16, 2009 · 5 comments
Closed

Implement .Rat in Rat in Rakudo #1442

p6rt opened this issue Dec 16, 2009 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Dec 16, 2009

Migrated from rt.perl.org#71364 (status was 'resolved')

Searchable as RT71364$

@p6rt
Copy link
Author

p6rt commented Dec 16, 2009

From @masak

<masak> rakudo​: (11/10).Rat
<p6eval> rakudo 55f51d​: Method 'Rat' not found for invocant of class 'Rat' [...]
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Dec 16, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S32-num/rat.t

commit bd03a1f10d092b98deab3e0643dd54227cf3aef9
Author​: moritz <moritz@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Wed Dec 16 20​:14​:00 2009 +0000

  [t/spec] tests for RT #​71364, and that === works on Rats
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;29348 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S32-num/rat.t b/t/spec/S32-num/rat.t
index 7a82b90..ac8f193 100644
--- a/t/spec/S32-num/rat.t
+++ b/t/spec/S32-num/rat.t
@@ -200,6 +200,13 @@ isa_ok (424/61731) * (61731/61733), Rat, "424/61731 * 61731/61733 is a Rat";
 is_approx (424/61731) / (61733/61731), (424.Num / 61731.Num) / (61733.Num / 61731.Num), "424/61731 / 61733/61731 works";
 isa_ok (424/61731) / (61733/61731), Rat, "424/61731 / 61733/61731 is a Rat";
 
+ok (1/2) == (1/2).Rat, 'Rat.Rat works';
+isa_ok (1/2).Rat, '... and actually returns a Rat';
+
+#?rakudo todo '=== on Rats'
+ok 1/2 === 1/2, 'Rats are value types, so 1/2 === 1/2';
+ok 1/2 !=== 1/3, '=== with false outcome';
+
 done_testing;
 
 # vim: ft=perl6

@p6rt
Copy link
Author

p6rt commented Dec 16, 2009

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Mar 9, 2010

From @moritz

Now works, test passes

@p6rt
Copy link
Author

p6rt commented Mar 9, 2010

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Mar 9, 2010
@p6rt p6rt added the Todo label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant