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

Time to change to require_relative? #2902

Closed
MSP-Greg opened this issue Jun 28, 2022 · 3 comments · Fixed by #2964
Closed

Time to change to require_relative? #2902

MSP-Greg opened this issue Jun 28, 2022 · 3 comments · Fixed by #2964

Comments

@MSP-Greg
Copy link
Member

Have a branch prepared for a PR, so I thought I'd ask first.

Any reason to not change all require statements to require_relative?

See https://github.com/ruby/ruby/search?q=require_relative, and #2381

Ruby master has now copied all the methods Puma used from io/wait to IO. I originally started the PR for that, as io/wait won't need to be required for Ruby 3.2 and later. I.think. I haven't tested it yet, but I think the only methods used in Puma are wait_readable and wait_writable...

@nateberkopec
Copy link
Member

Can we avoid breaking CentOS?

@MSP-Greg
Copy link
Member Author

Can we avoid breaking CentOS?

I interpreted #2381 to mean that all ruby files could be loaded with require_relative, but any *.so files needed to be loaded with require. We only have one puma_http11.

We could use require_relative, and if an error is raised, load via require...

@nateberkopec
Copy link
Member

Cool! Full speed ahead then 🚆

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

Successfully merging a pull request may close this issue.

2 participants