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

Add specs for invalid base argument in Kernel.Integer #1111

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

herwinw
Copy link
Member

@herwinw herwinw commented Nov 13, 2023

I'm not sure if we're doing 3.3 changes already? Especially since it's not running in the CI yet

Copy link
Member

@eregon eregon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it's fine, please make sure the new spec does pass on ruby-master or the latest preview though.

@eregon eregon merged commit 71cfe8c into ruby:master Nov 13, 2023
9 of 10 checks passed
@herwinw herwinw deleted the kernel_integer_invalid_base_argument branch November 13, 2023 19:13
@herwinw
Copy link
Member Author

herwinw commented Nov 13, 2023

Yes, I tried them locally with Ruby 3.2 en 3.3-preview3.

@eregon
Copy link
Member

eregon commented Nov 14, 2023

FYI it ends being tested in CRuby's CI after the monthly sync.
It doesn't make sense to test a preview or ruby-dev here as there are extra changes to specs in CRuby when behavior changes and that's not immediately sync'd here to it'd just fail a good part of the time for no good reason.

Integer("777", "8")
}.should raise_error(TypeError, "no implicit conversion of String into Integer")
end
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems Ruby calls #to_int, not #to_i

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants