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

Unable to cast Int64 to Float64 #19

Closed
jwoertink opened this issue Dec 18, 2023 · 5 comments
Closed

Unable to cast Int64 to Float64 #19

jwoertink opened this issue Dec 18, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@jwoertink
Copy link

@mdwagner has been working on some updated specs for Lucky, and started running in to this conversion error. I think it's coming from this line

@scan_duration = response_json["elapsed"].as_f.milliseconds

Maybe response_json["elapsed"] returns Int64 here?

For now we're able to work around it with a little hack 😂

RUN sed -i '131s/as_f/as_i/' lib/sec_tester/src/sec_tester/scan.cr
@bararchy
Copy link
Member

@derevnjuk what does elapsed returns in this context? 😅

@bararchy
Copy link
Member

@jwoertink Fixed via: 0d447ff
I used as_i64 to make sure it will always parse correctly.
I'll cut a new minor release soon

@bararchy
Copy link
Member

Closed by: https://github.com/NeuraLegion/sec-tester-cr/releases/tag/v1.6.3

@jwoertink let me know if there is any other issue 🙏

@bararchy bararchy self-assigned this Dec 18, 2023
@bararchy bararchy added the bug Something isn't working label Dec 18, 2023
@mdwagner
Copy link

New build passed! Thanks!

@jwoertink
Copy link
Author

Thanks @bararchy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants