Forum: Ruby Thoughts on #require options

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
transfire (Guest)
on 2005-11-14 05:18
(Received via mailing list)
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

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.

lyndon.samson (Guest)
on 2005-11-14 05:36
(Received via mailing list)
How about passing an IO as the source of the loaded library?
This topic is locked and can not be replied to.