Sha256: 5924e728a9d1b18dd9f8c5d5bbc0226f5571faa35801f43d3da5c4e29f1c32db
Contents?: true
Size: 536 Bytes
Versions: 16
Compression:
Stored size: 536 Bytes
Contents
# typed: false module Datadog module Core module Utils # Helper methods for safer dup module SafeDup if RUBY_VERSION < '2.2' # nil.dup only fails in Ruby 2.1 # Ensures #initialize can call nil.dup safely module RefineNil refine NilClass do def dup self end end end using RefineNil end def self.frozen_or_dup(v) v.frozen? ? v : v.dup end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems