Thoughts on #require options


#1

Matz mentioned a few days ago leaving additional #require parameters
open for potential future use. What is the general opinion on the
utility of having require options --pseudo code:

module Kernel
def requre( path, options=nil )
previous = $require_options
$require_options = options || {}
Kernel.require( path )
$require_options = previous
end
end

Besides specifying lib versions I have only thought of one addtional
use, turning on/off extraneous functionality --sort of akin to compile
options in C. I’m not so sure that it’s a good idea.

T.


#2

How about passing an IO as the source of the loaded library?