Sha256: a85d32c6f1e5f3c6b6b3f00e44fa42da018939a31f1c9e492c787a8bc4c3a5b2

Contents?: true

Size: 855 Bytes

Versions: 18

Compression:

Stored size: 855 Bytes

Contents

# Copyright (c) 2023 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true

# Some developers override various methods on Object, which can often involve
# changing expected method parity/behavior which in turn prevents us from being
# able to reliably use affected methods.
# We alias these method so that we always have access to them.
#
# Because we use these methods in constructing classes (e.g., calling #freeze
# on constants within class definitions) we do this aliasing ASAP.
class Object
  alias_method :cs__class, :class
  alias_method :cs__freeze, :freeze
  alias_method :cs__frozen?, :frozen?
  alias_method :cs__is_a?, :is_a?
  alias_method :cs__method, :method
  alias_method :cs__respond_to?, :respond_to?
  alias_method :cs__singleton_class, :singleton_class
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
contrast-agent-7.6.1 lib/contrast/extension/object.rb
contrast-agent-7.6.0 lib/contrast/extension/object.rb
contrast-agent-7.5.0 lib/contrast/extension/object.rb
contrast-agent-7.4.1 lib/contrast/extension/object.rb
contrast-agent-7.4.0 lib/contrast/extension/object.rb
contrast-agent-7.3.2 lib/contrast/extension/object.rb
contrast-agent-7.3.1 lib/contrast/extension/object.rb
contrast-agent-7.3.0 lib/contrast/extension/object.rb
contrast-agent-7.2.0 lib/contrast/extension/object.rb
contrast-agent-7.1.0 lib/contrast/extension/object.rb
contrast-agent-7.0.0 lib/contrast/extension/object.rb
contrast-agent-6.15.3 lib/contrast/extension/object.rb
contrast-agent-6.15.2 lib/contrast/extension/object.rb
contrast-agent-6.15.1 lib/contrast/extension/object.rb
contrast-agent-6.15.0 lib/contrast/extension/object.rb
contrast-agent-6.14.0 lib/contrast/extension/object.rb
contrast-agent-6.13.0 lib/contrast/extension/object.rb
contrast-agent-6.12.0 lib/contrast/extension/object.rb