Sha256: 6ab5ad2d3b46eb831669aa3e5a997d7240f6a34d5e0d34f42df2e1831d163fb7

Contents?: true

Size: 606 Bytes

Versions: 14

Compression:

Stored size: 606 Bytes

Contents

module Celluloid
  # Base class of all Celluloid proxies
  class AbstractProxy < BasicObject
    # 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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
celluloid-0.13.0 lib/celluloid/proxies/abstract_proxy.rb
celluloid-0.13.0.pre2 lib/celluloid/proxies/abstract_proxy.rb
celluloid-0.13.0.pre lib/celluloid/proxies/abstract_proxy.rb
celluloid-0.12.4 lib/celluloid/proxies/abstract_proxy.rb
celluloid-0.12.4.pre2 lib/celluloid/proxies/abstract_proxy.rb
celluloid-0.12.4.pre lib/celluloid/proxies/abstract_proxy.rb
celluloid-0.12.3 lib/celluloid/proxies/abstract_proxy.rb
celluloid-0.12.2 lib/celluloid/proxies/abstract_proxy.rb
celluloid-0.12.1 lib/celluloid/proxies/abstract_proxy.rb
celluloid-0.12.1.pre2 lib/celluloid/proxies/abstract_proxy.rb
celluloid-0.12.1.pre lib/celluloid/proxies/abstract_proxy.rb
celluloid-0.12.0 lib/celluloid/proxies/abstract_proxy.rb
celluloid-0.12.0.pre3 lib/celluloid/proxies/abstract_proxy.rb
celluloid-0.12.0.pre2 lib/celluloid/proxies/abstract_proxy.rb