Class: Object

Inherits:
BasicObject
Defined in:
lib/contrast/extension/object.rb,
lib/contrast/agent/assess/finalizers/freeze.rb

Overview

Our patch of the Object#freeze method, allowing any Object we track to function with our Contrast::Agent::Assess::Finalizers::Hash

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.cs__prepended?(method_name, is_instance) ⇒ Boolean

used for direct check on object: String.cs__prepended? *args

Returns:

  • (Boolean)


183
184
185
186
# File 'ext/cs__common/cs__common.c', line 183

extern VALUE contrast_check_prepended(VALUE self, VALUE method_name,
                                      VALUE is_instance) {
    return _contrast_check_prepended(self, method_name, is_instance);
}

Instance Method Details

#cs__freezeObject



13
# File 'lib/contrast/extension/object.rb', line 13

alias_method :cs__freeze, :freeze

#cs__patched_object_freezeObject



9
# File 'lib/contrast/agent/assess/finalizers/freeze.rb', line 9

alias_method :cs__patched_object_freeze, :freeze

#freezeObject

Applies the the freeze patch and handles the pre-finalizes the object.



12
13
14
15
# File 'lib/contrast/agent/assess/finalizers/freeze.rb', line 12

def freeze
  Contrast::Agent::Assess::Tracker.pre_freeze(self)
  cs__patched_object_freeze
end