# Thoughts on #require options

**URL:** <https://www.ruby-forum.com/t/thoughts-on-require-options/47818>\
**Category:** Ruby\
**Created:** [November 14, 2005, 4:18am UTC](https://www.ruby-forum.com/t/thoughts-on-require-options/47818 "2005-11-14T04:18:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![transfire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c67d28/32.png) [@transfire](https://www.ruby-forum.com/u/transfire)\
**Post date:** [November 14, 2005, 4:18am UTC](https://www.ruby-forum.com/t/thoughts-on-require-options/47818/1 "2005-11-14T04:18:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![transfire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c67d28/32.png) [@transfire](https://www.ruby-forum.com/u/transfire)\
**Post date:** [November 14, 2005, 4:36am UTC](https://www.ruby-forum.com/t/thoughts-on-require-options/47818/2 "2005-11-14T04:36:03Z")

</div>

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