How do you allow a C-extension to use rb_f_require
to require a file from outside the ext
directory (e.g. requiring lib/foo/foo.rb
from ext/foo.so
).
views:
123answers:
1
+1
A:
Not really sure why this isn't converted into html like the rest of the ruby hacking guide that had been translated, but perhaps some portion of this would be helpful?
http://rhg.rubyforge.org/svn/en/chapter18.txt
Given that rb_f_require appears to do a normal load path search, it would seem it would search out into lib/foo if that is in the search path. However, if you are looking for another foo.rb I would imagine you would have name problems if foo.so appears first. Perhaps using a different name for foo.rb could solve the problem?
dgtized
2008-11-26 22:48:15