# File lib/cucumber/feature_file.rb, line 49
    def source
      @source ||= if @path =~ /^http/
        require 'open-uri'
        open(@path).read
      else
        begin
          source = File.open(@path, Cucumber.file_mode('r', DEFAULT_ENCODING)).read
          encoding = encoding_for(source)
          if(DEFAULT_ENCODING.downcase != encoding.downcase)
            # Read the file again - it's explicitly declaring a different encoding
            source = File.open(@path, Cucumber.file_mode('r', encoding)).read
            source = to_default_encoding(source, encoding)
          end
          source
        rescue Errno::EACCES => e
          e.message << "\nCouldn't open #{File.expand_path(@path)}"
          raise e
        rescue Errno::ENOENT => e
          # special-case opening features, because this could be a new user:
          if(@path == 'features')
            STDERR.puts("You don't have a 'features' directory.  Please create one to get started.",
                        "See http://cukes.info/ for more information.")
            exit 1
          end
          raise e
        end
      end
    end