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

Int.round does not take optional parameter like Rat.round does #3170

Closed
p6rt opened this issue Jun 19, 2013 · 6 comments
Closed

Int.round does not take optional parameter like Rat.round does #3170

p6rt opened this issue Jun 19, 2013 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Jun 19, 2013

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

Searchable as RT118545$

@p6rt
Copy link
Author

p6rt commented Jun 19, 2013

From @ShimmerFairy

<lue> r​: say (41.0).round(5)
<camelia> rakudo b2072f​: OUTPUT«40␤»
<lue> r​: say (41).round(5) # round doesn't like Ints
<camelia> rakudo b2072f​: OUTPUT«Too many positional parameters passed;
got 2 but expected 1␤ in method round at src/gen/CORE.setting​:3351␤ in
block at /tmp/84eQ6fZ1ka​:1␤␤»
<masak> r​: say 41.round
<camelia> rakudo b2072f​: OUTPUT«41␤»
<masak> lue​: seems the Rat version takes an optional parameter, but the
Int version doesn't.
<masak> lue​: plz file a rakudobug :)
* lue does so

@p6rt
Copy link
Author

p6rt commented Jun 23, 2013

From @labster

Fixed in 077875a​:
labster​: r​: say 41.round(5)
camelia​: rakudo 077875​: OUTPUT«40␤»

Closeable with tests, probably in S32-num/rounders.t. I'd write the
tests, but I have a spec question I want to ask about round first.

@p6rt
Copy link
Author

p6rt commented Jun 23, 2013

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

@p6rt
Copy link
Author

p6rt commented Jul 2, 2013

From @labster

Added tests in commit fa26638

Ticket ready to close.

@p6rt
Copy link
Author

p6rt commented Jul 3, 2013

From @labster

Added tests (as noted above), resolving :)

@p6rt
Copy link
Author

p6rt commented Jul 3, 2013

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

@p6rt p6rt closed this as completed Jul 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant