/usr/lib/ruby/vendor_ruby/naught/null_class_builder/commands/singleton.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 21 22 23 24 | require 'naught/null_class_builder/command'
module Naught::NullClassBuilder::Commands
class Singleton < Naught::NullClassBuilder::Command
def call
defer(:class => true) do |subject|
require 'singleton'
subject.module_eval do
include ::Singleton
def self.get(*)
instance
end
%w(dup clone).each do |method_name|
define_method method_name do
self
end
end
end
end
end
end
end
|