/usr/lib/ruby/vendor_ruby/celluloid/proxies/abstract_proxy.rb is in ruby-celluloid 0.16.0-4.
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 | module Celluloid
# Base class of all Celluloid proxies
class AbstractProxy < BasicObject
# Used for reflecting on proxy objects themselves
def __class__; AbstractProxy; end
# Needed for storing proxies in data structures
needed = [:object_id, :__id__, :hash] - instance_methods
if needed.any?
include ::Kernel.dup.module_eval {
undef_method(*(instance_methods - needed))
self
}
# rubinius bug? These methods disappear when we include hacked kernel
define_method :==, ::BasicObject.instance_method(:==) unless instance_methods.include?(:==)
alias_method(:equal?, :==) unless instance_methods.include?(:equal?)
end
end
end
|