Sha256: 3c68ddedf516e139eafc5e77d7529234917c2c13f37955bc6fcd515863d738df

Contents?: true

Size: 365 Bytes

Versions: 6

Compression:

Stored size: 365 Bytes

Contents

# frozen_string_literal: true
# NOTE remove once minimum required Ruby version is at least 2.6
# NOTE use `send :prepend` to be nice to Ruby 2.0
Hash.send :prepend, (Module.new do
  def merge *args
    (len = args.length) < 1 ? dup : (len > 1 ? args.inject(self) {|acc, arg| acc.merge arg } : (super args[0]))
  end
end) if (Hash.instance_method :merge).arity == 1

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
asciidoctor-2.0.22 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.21 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.20 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.19 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.18 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.17 lib/asciidoctor/core_ext/hash/merge.rb