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 missing IO::SEEK_DATA and IO::SEEK_HOLE constants #2792

Closed
postmodern opened this issue Nov 20, 2022 · 2 comments
Closed

Add missing IO::SEEK_DATA and IO::SEEK_HOLE constants #2792

postmodern opened this issue Nov 20, 2022 · 2 comments

Comments

@postmodern
Copy link

glibc's stdio.h does define SEEK_DATA and SEEK_HOLE and CRuby does support them if they are defined. TruffleRuby should also define these constants, if stdio.h also defines them.

TruffleRuby-22.3.0

IO.constants.grep(/SEEK/)
# => [:SEEK_CUR, :SEEK_SET, :SEEK_END]

CRuby 3.1.2

IO.constants.grep(/SEEK/)
# => [:SEEK_SET, :SEEK_CUR, :SEEK_END, :SEEK_DATA, :SEEK_HOLE]
@eregon
Copy link
Member

eregon commented Nov 21, 2022

Thank you for the report.

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

Fixed in 279c250.

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