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

Bind rb_get_path to better respect Kernel#require duck-type #406

Merged
merged 1 commit into from
Feb 16, 2022

Conversation

casperisfine
Copy link
Contributor

@casperisfine casperisfine commented Feb 16, 2022

Replaces #396

Rather than to do intricate things to replicate rb_get_path, we can bind it from our native extension.

We retain the ruby implementation for bootstrap and for implementations on which we don't have an extension.

@casperisfine casperisfine force-pushed the rb-get-path branch 3 times, most recently from c160dab to d24e614 Compare February 16, 2022 15:20
Kernel#require turns its argument into a path by calling `to_path` if it
responds to it, and then into a String (the argument or the return value
of `to_path`) by using implicit conversion (`to_str`).

Co-authored-by: Étienne Barrié <etienne.barrie@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants