Module: NewRelic::LanguageSupport::Control

Included in:
Control
Defined in:
lib/new_relic/language_support.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/new_relic/language_support.rb', line 27

def self.included(base)
  # need to use syck rather than psych when possible
  if defined?(::YAML::ENGINE)
    unless NewRelic::LanguageSupport.using_engine?('jruby') &&
            NewRelic::LanguageSupport.using_version?('1.9')
      base.class_eval do
        def load_newrelic_yml(*args)
          yamler = ::YAML::ENGINE.yamler
          ::YAML::ENGINE.yamler = 'syck'
          val = super
          ::YAML::ENGINE.yamler = yamler
          val
        end
      end
    end
  end
end