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

Rational() with string arg should raise ArgumentError #2619

Closed
djberg96 opened this issue Mar 8, 2022 · 1 comment
Closed

Rational() with string arg should raise ArgumentError #2619

djberg96 opened this issue Mar 8, 2022 · 1 comment
Milestone

Comments

@djberg96
Copy link
Contributor

djberg96 commented Mar 8, 2022

Ruby 3.0.2:

Rational("bogus", 1) # => ArgumentError

TruffleRuby 22.0.0.2:

Rational("bogus", 1) # => (0/1)

As to why it raises an ArgumentError instead of a TypeError, I don't remember, but it's probably why I originally tested for this.

@aardvark179 aardvark179 added this to the 22.1.0 milestone Mar 9, 2022
@aardvark179
Copy link
Contributor

This is already fixed on master. This is a duplicate of #2566 .

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

No branches or pull requests

3 participants