From: Narayanan K on
[Note: parts of this message were removed to make it a legal post.]

Hi all,

I want to place *.irbrc* config file in a folder in */tmp* or any other
folder other than under /home and point my *$IRBRC* environment variable to
this location.
*Is this possible??*

From the init.rb file, I found the following code snippet:

# enumerate possible rc-file base name generators
def IRB.rc_file_generators
if irbrc = ENV["IRBRC"]
yield proc{|rc| rc == "rc" ? irbrc : irbrc+rc}
if home = ENV["HOME"]
yield proc{|rc| home+"/.irb#{rc}"}
home = Dir.pwd
yield proc{|rc| home+"/.irb#{rc}"}
yield proc{|rc| home+"/irb#{rc.sub(/\A_?/, '.')}"}
yield proc{|rc| home+"/_irb#{rc}"}
*yield proc{|rc| home+"/$irb#{rc}"}*

Could somebody please help me understand the above method? Can .irbrc be
stored in folders other than home, like in /tmp or in /root etc..?

Thanks in advance,