This file is indexed.

/usr/lib/ruby/vendor_ruby/active_record/attribute_methods/deprecated_underscore_read.rb is in ruby-activerecord-3.2 3.2.16-1.

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
30
31
32
require 'active_support/concern'
require 'active_support/deprecation'

module ActiveRecord
  module AttributeMethods
    module DeprecatedUnderscoreRead
      extend ActiveSupport::Concern

      included do
        attribute_method_prefix "_"
      end

      module ClassMethods
        protected

        def define_method__attribute(attr_name)
          # Do nothing, let it hit method missing instead.
        end
      end

      protected

      def _attribute(attr_name)
        ActiveSupport::Deprecation.warn(
          "You have called '_#{attr_name}'. This is deprecated. Please use " \
          "either '#{attr_name}' or read_attribute('#{attr_name}')."
        )
        read_attribute(attr_name)
      end
    end
  end
end