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

&min has the wrong signature in Rakudo #2384

Closed
p6rt opened this issue Mar 8, 2011 · 7 comments
Closed

&min has the wrong signature in Rakudo #2384

p6rt opened this issue Mar 8, 2011 · 7 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Mar 8, 2011

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

Searchable as RT85674$

@p6rt
Copy link
Author

p6rt commented Mar 8, 2011

From @masak

<masak> rakudo​: say [min] 3, 6;
<p6eval> rakudo 3680ac​: OUTPUT«3␤»
<mberends> rakudo​: say min(3,6)
<p6eval> rakudo 3680ac​: OUTPUT«Unable to handle non-closure Ordering
yet␤ in 'Any​::min' at line 1561​:CORE.setting␤ in 'min' at line
1871​:CORE.setting␤ in main program body [...]
<masak> can I pls kill the &min function?
<masak> rakudo​: say (3,6).min
<p6eval> rakudo 3680ac​: OUTPUT«3␤»
<masak> alternatively, mberends is suggesting killing the first
parameter of the &min function.
* moritz_ thinks we've had that discussion before.
<masak> S32/IO​: our multi min( *@​values, Ordering :$by )
<masak> how come we're running up against this problem in the first place?
<masak> 3, 6 should end up in @​values, no?
* masak dives into Rakudo source
<masak> oh!
<masak> src/core/Any-list.pm​: proto sub min($by, *@​values) { @​values.min($by); }
<masak> Rakudo is not to spec, that's all.
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Mar 9, 2011

From @moritz

Now fixed both in rakudo and in roast.

@p6rt
Copy link
Author

p6rt commented Mar 9, 2011

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

@p6rt
Copy link
Author

p6rt commented Mar 27, 2011

From @masak

On Wed Mar 09 06​:29​:52 2011, moritz wrote​:

Now fixed both in rakudo and in roast.

<masak> er, waitaminute.
<masak> rakudo​: say min(3,6)
<p6eval> rakudo 792e86​: OUTPUT«Unable to handle non-closure Ordering yet [...]
<masak> the bug is not fixed after all.
* masak re-opens RT #​85674

Commit a38d45 (by moritz) *does* indeed look like it should the issue.

-proto sub min($by, *@​values) { @​values.min($by); }
-proto sub max($by, *@​values) { @​values.max($by); }
-proto sub minmax($by, *@​values) { @​values.minmax($by); }
+proto sub min(*@​values, :$by) { @​values.min($by); }
+proto sub max(*@​values, :$by) { @​values.max($by); }
+proto sub minmax(*@​values, :$by) { @​values.minmax($by); }

But it doesn't. Unclear why.

Re-opening ticket.

@p6rt
Copy link
Author

p6rt commented Mar 27, 2011

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

@p6rt
Copy link
Author

p6rt commented Sep 30, 2011

From @moritz

works now, tests passing.

@p6rt
Copy link
Author

p6rt commented Sep 30, 2011

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

@p6rt p6rt closed this as completed Sep 30, 2011
@p6rt p6rt added the Bug 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