APIdock / Ruby on Rails
/
Browse About
method

deep_dup

v7.1.3.4 - Show latest stable - Class: Module
deep_dup()
public

Returns a copy of module or class if it’s anonymous. If it’s named, returns self.

Object.deep_dup == Object # => true
klass = Class.new
klass.deep_dup == klass # => false
# File activesupport/lib/active_support/core_ext/object/deep_dup.rb, line 64
  def deep_dup
    if name.nil?
      super
    else
      self
    end
  end

Related methods

  • Instance methods
  • alias_attribute
  • anonymous?
  • as_json
  • attr_internal
  • attr_internal_accessor
  • attr_internal_reader
  • attr_internal_writer
  • cattr_accessor
  • cattr_reader
  • cattr_writer
  • deep_dup
  • delegate
  • delegate_missing_to
  • deprecate
  • mattr_accessor
  • mattr_reader
  • mattr_writer
  • method_visibility
  • module_parent
  • module_parent_name
  • module_parents
  • redefine_method
  • redefine_singleton_method
  • remove_possible_method
  • remove_possible_singleton_method
  • silence_redefinition_of_method
  • thread_cattr_accessor
  • thread_cattr_reader
  • thread_cattr_writer
  • thread_mattr_accessor
  • thread_mattr_reader
  • thread_mattr_writer
  • Private methods
  • privateattr_internal_define
  • privateattr_internal_ivar_name
APIdock API Documentation Browser

© 2026 APIdock