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

IO#pos= should raise TypeError if argument is non-numeric #2787

Closed
djberg96 opened this issue Nov 18, 2022 · 1 comment
Closed

IO#pos= should raise TypeError if argument is non-numeric #2787

djberg96 opened this issue Nov 18, 2022 · 1 comment

Comments

@djberg96
Copy link
Contributor

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

fh = File.new('test.txt', 'wb+')
fh.pos = 'bogus'

Expected: no implicit conversion from string (TypeError)
Got: invalid value for Integer(): bogus (ArgumentError)

@andrykonchin andrykonchin self-assigned this Nov 22, 2022
@andrykonchin
Copy link
Member

Thank you for the report! Fixed in 85a9b0e.

@andrykonchin andrykonchin added this to the 23.0.0 Release milestone Dec 13, 2022
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