Sha256: 9c232c3f18ca8b82b12c9e8f40534c56300f9cfd32f68cabd93b6af2f31f6d71

Contents?: true

Size: 371 Bytes

Versions: 15

Compression:

Stored size: 371 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 ? super({}) : (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

15 entries across 15 versions & 2 rubygems

Version Path
asciidoctor-2.0.16 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.15 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.14 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.13 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.12 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.11 lib/asciidoctor/core_ext/hash/merge.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/asciidoctor-2.0.10/lib/asciidoctor/core_ext/hash/merge.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/asciidoctor-2.0.10/lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.10 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.9 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.8 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.7 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.6 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.5 lib/asciidoctor/core_ext/hash/merge.rb
asciidoctor-2.0.4 lib/asciidoctor/core_ext/hash/merge.rb