/usr/lib/ruby/vendor_ruby/naught/null_class_builder/commands/traceable.rb is in ruby-naught 1.0.0-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 | require 'naught/null_class_builder/command'
module Naught::NullClassBuilder::Commands
class Traceable < Naught::NullClassBuilder::Command
def call
defer do |subject|
subject.module_eval do
attr_reader :__file__, :__line__
def initialize(options = {})
range = (RUBY_VERSION.to_f == 1.9 && RUBY_PLATFORM != 'java') ? 4 : 3
backtrace = options.fetch(:caller) { Kernel.caller(range) }
@__file__, line, _ = backtrace[0].split(':')
@__line__ = line.to_i
end
end
end
end
end
end
|