Feature #3727
closedrb_f_require_relative not included in Ruby API
Description
=begin
Now that Ruby no longer includes the current directory in $: as of Ruby 1.9.2, those of us using the C API cannot use rb_require() to require a file in the same directory as our native code without adding the current directory to $:.
However, since this is not a good practice, we should be able to access rb_f_require_relative() from the C API. Unfortunately, this function is defined in load.c, but is not available in any files within /usr/local/include/ruby.
I believe this function, or perhaps a function named rb_require_relative() (to be consistent with the C API naming conventions) should be added to ruby.h.
My apologies if there is something that I have missed.
=end
Updated by shyouhei (Shyouhei Urabe) over 13 years ago
- Status changed from Open to Feedback
=begin
Hi,
we do not have rb_f_require_relative now so
if you need one, we need some use cases for
it to make a spec. Do you have one?
=end
Updated by akr (Akira Tanaka) about 12 years ago
- Description updated (diff)
I think it is difficult to determine the base directory of relative directory in C.
Updated by shyouhei (Shyouhei Urabe) about 12 years ago
- Status changed from Feedback to Closed
closing because no feedback..