I’m trying to open a file from with a Ruby Rack extension I wrote called rack-xsl.

If I try “File.open(…)”, it fails with this error:

private method `open' called for Rack::File:Class

Instead, I can use the double colon prefix, or colon colon class name, or ::File:

      if @options[:reload] == true
        @xslt     = XML::XSLT.new()
        refreshxsl = ::File.open(@options[:xslfilename]) {|f| f.read }
        @xslt.xsl = REXML::Document.new refreshxsl
      end

Sweet!