This file is indexed.

/usr/lib/ruby/vendor_ruby/rspec/matchers/matcher_delegator.rb is in ruby-rspec-expectations 3.4.0c3e0m1s1-1ubuntu1.

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
33
34
35
module RSpec
  module Matchers
    # Provides the necessary plumbing to wrap a matcher with a decorator.
    # @private
    class MatcherDelegator
      include Composable
      attr_reader :base_matcher

      def initialize(base_matcher)
        @base_matcher = base_matcher
      end

      def method_missing(*args, &block)
        base_matcher.__send__(*args, &block)
      end

      if ::RUBY_VERSION.to_f > 1.8
        def respond_to_missing?(name, include_all=false)
          super || base_matcher.respond_to?(name, include_all)
        end
      else
        # :nocov:
        def respond_to?(name, include_all=false)
          super || base_matcher.respond_to?(name, include_all)
        end
        # :nocov:
      end

      def initialize_copy(other)
        @base_matcher = @base_matcher.clone
        super
      end
    end
  end
end