Module: Datadog::Core::BackportFrom24

Defined in:
lib/datadog/core/backport.rb

Overview

This module is used to provide features from Ruby 2.4+ to older Rubies

Class Method Summary collapse

Class Method Details

.dup(value) ⇒ Object



26
27
28
29
30
31
32
33
# File 'lib/datadog/core/backport.rb', line 26

def self.dup(value)
  case value
  when NilClass, TrueClass, FalseClass, Numeric
    value
  else
    value.dup
  end
end

.hash_compact!(hash) ⇒ Object



41
42
43
# File 'lib/datadog/core/backport.rb', line 41

def self.hash_compact!(hash)
  hash.compact!
end