This file is indexed.

/usr/lib/ruby/vendor_ruby/ramaze/snippets/string/esc.rb is in ruby-ramaze 2012.12.08-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require 'cgi'
require 'uri'

module Ramaze
  module CoreExtensions
    # Extensions for String
    module String
      # String#escape is an extensible escaping mechanism for string.  currently
      # it suports
      #   '<div>foo bar</div>'.esc(:html)
      #   'foo bar'.esc(:uri)
      #   'foo bar'.esc(:cgi)
      def escape which = :html
        case which
        when :html
          Rack::Utils.escape_html(self)
        when :cgi
          Rack::Utils.escape(self)
        when :uri
          ::URI.escape(self)
        else
          raise ArgumentError, "do not know how to escape '#{ which }'"
        end
      end

      alias_method 'esc', 'escape'
    end # String
  end # CoreExtensions
end # Ramaze