Report abuse


			
#Used to demonstrate the fix to have jirb read .irbrc correctly under windows
#See http://webmat.wordpress.com/2007/10/18/jruby-not-in-its-setting/
#Code excerpt from JRuby's irb/init.rb file, as of JRuby 1.0.1...

# enumerate possible rc-file base name generators
def IRB.rc_file_generators
  if irbrc = ENV["IRBRC"]
    yield proc{|rc|  rc == "rc" ? irbrc : irbrc+rc}
  end
  if home = ENV["HOME"]
    yield proc{|rc| home+"/.irb#{rc}"} 
  end
  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}"}
end