lib/contrast/utils/class_util.rb in contrast-agent-6.0.0 vs lib/contrast/utils/class_util.rb in contrast-agent-6.1.0

- old
+ new

@@ -84,16 +84,12 @@ else "#{ object.cs__class.cs__name }@#{ object.__id__ }" end end - # The method const_defined? can cause autoload, which is bad for us. The method autoload? doesn't traverse - # namespaces. This method lets us provide a constant, as a String, and parse it to determine if it has been - # truly truly defined, meaning it existed before this method was invoked, not as a result of it. + # The method Module.const_defined? can raise an exception if the constant is poorly named. As such, we need to + # handle the case where that exception is raised. # - # TODO: RUBY-1326 - # This is required to handle a bug in Ruby prior to 2.7.0. When we drop support for 2.6.X, we should remove - # this code. https://bugs.ruby-lang.org/issues/10741 # @param name [String] the name of the constant to look up # @return [Boolean] def truly_defined? name return false unless name