This file is indexed.

/usr/lib/ruby/vendor_ruby/ffi/tools/generator_task.rb is in ruby-ffi 1.9.10debian-1build2.

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
36
begin
  require 'ffi/struct_generator'
  require 'ffi/const_generator'
  require 'ffi/generator'
rescue LoadError
  # from Rakefile
  require 'lib/ffi/struct_generator'
  require 'lib/ffi/const_generator'
  require 'lib/ffi/generator'
end

require 'rake'
require 'rake/tasklib'
require 'tempfile'

##
# Rake task that calculates C structs for FFI::Struct.

# @private
class FFI::Generator::Task < Rake::TaskLib

  def initialize(rb_names)
    task :clean do rm_f rb_names end

    rb_names.each do |rb_name|
      ffi_name = "#{rb_name}.ffi"

      file rb_name => ffi_name do |t|
        puts "Generating #{rb_name}..." if Rake.application.options.trace

        FFI::Generator.new ffi_name, rb_name
      end
    end
  end

end