-
Notifications
You must be signed in to change notification settings - Fork 34
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
Critical bug in scan_args::get_kwargs
#35
Comments
Thanks for the bug report, and thank you for the great test case, made it much easier to figure out what was going on with a nice reproduction like that. I'd made a mistake in the use of the underlying Ruby has an internal I've fixed this in bb27c6e, and put out a 0.4.1 release with this fix. |
Thank you for the quick fix! |
@matsadler Ah, I think there's an errant |
Damnit, I thought I got them all, I guess that was hiding amongst the other changes when I reviewed them. Thanks for spotting that. There's a 0.4.2 release out now. Lets hope I didn't make anymore mistakes. |
Sorry for the bombastic title, but I think the severity of the bug I've encountered is pretty high.
Essentially, it seems that
get_kwargs
is not converting Values correctly. Given the following Ruby code:Backed by the following arg parsing in Magnus:
The following error occurs at runtime in the
scan_args::get_kwargs
function:I'm not sure why or how a Float is being interpreted, rather than the defined String.
Here's a reproducible use case: https://github.com/gjtorikian/magnus_kwargs_bug; after cloning the repo, run
bundle exec rake compile test
.The text was updated successfully, but these errors were encountered: