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

Process.detach with invalid type raises wrong error type #2782

Closed
djberg96 opened this issue Nov 13, 2022 · 2 comments
Closed

Process.detach with invalid type raises wrong error type #2782

djberg96 opened this issue Nov 13, 2022 · 2 comments

Comments

@djberg96
Copy link
Contributor

truffleruby 22.3.0, like ruby 3.0.3, GraalVM CE Native [x86_64-darwin]

Process.detach("bogus")

Expected: "no implicit conversion of String into Integer (TypeError)"
Got: "comparison of String with 0 failed (ArgumentError)"

@andrykonchin
Copy link
Member

Thank you for reporting!

I can reproduce the issue:

CRuby 3.1.2

 Process.detach("100")
#(irb):26:in `detach': no implicit conversion of String into Integer (TypeError)

TruffleRuby

Process.detach("100")
# <internal:core> core/comparable.rb:44:in `>': comparison of String with 0 failed (ArgumentError)

@andrykonchin
Copy link
Member

Fixed in 2eebebc

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