require hacks not affecting -r command-line option?

F

Francis Hwang

So, I'm trying to override Kernel.require, doing a similar thing to it
that Rubygems does when you use -rubygems. But one thing I notice is
that it doesn't seem possible to have the change to Kernel.require
affect subsequent uses of the -r command-line option. So if you're
trying to use log4r as a gem, say, then

ruby -rubygems -rlog4r -e "puts 'blah blah blah'"

won't work. -rubygems will affect require, but not in any way that
-rlog4r can get to.

Can somebody explain to me how this is working (or not working), and if
there's any way around this? If there isn't a way around this, maybe I
should be submitting an RCR?

f.
 
T

ts

F> Can somebody explain to me how this is working (or not working),

With -r ruby call directly rb_require()



Guy Decoux
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top