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

No exception raised them running Complex('a+5i') #2765

Closed
ShockwaveNN opened this issue Oct 23, 2022 · 2 comments
Closed

No exception raised them running Complex('a+5i') #2765

ShockwaveNN opened this issue Oct 23, 2022 · 2 comments

Comments

@ShockwaveNN
Copy link

Hi, trying to migrate some of my libraries to truffleruby and found this difference between truffleruby and MRI

The code is quite simple:

Complex('a+5i')

Running this (in irb for example) on MRI 3.1 raise an exception:

(irb):3:in `Complex': invalid value for convert(): "a+5i" (ArgumentError)

Running this in truffleruby 22.2.0returns (0+0i) without any exception

@andrykonchin andrykonchin self-assigned this Oct 24, 2022
@andrykonchin
Copy link
Member

Thank you for reporting the issue. Fixed in fb8887c.

@ShockwaveNN
Copy link
Author

Thanks

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