Sha256: 4adaf1e999b2efb6ce2d243974acce34fe472bb85ff377e8e92c8992409236fc

Contents?: true

Size: 340 Bytes

Versions: 63

Compression:

Stored size: 340 Bytes

Contents

# frozen_string_literal: true
class Hash
  class << self
    def create(*args)
      if args.first.is_a?(Array) && args.size == 1
        obj = new
        args.first.each {|k, v| obj[k] = v }
        obj
      else
        create_186(*args)
      end
    end
    alias create_186 []
    alias [] create
  end
end if RUBY_VERSION < "1.8.7"

Version data entries

63 entries across 62 versions & 9 rubygems

Version Path
qiita_org-0.1.25 gems/ruby/2.7.0/gems/yard-0.9.25/lib/yard/core_ext/hash.rb
yard-0.9.25 lib/yard/core_ext/hash.rb
yard-0.9.24 lib/yard/core_ext/hash.rb
yard-0.9.23 lib/yard/core_ext/hash.rb
yard-0.9.22 lib/yard/core_ext/hash.rb
yard-0.9.21 lib/yard/core_ext/hash.rb
yard-0.9.20 lib/yard/core_ext/hash.rb
yard-0.9.19 lib/yard/core_ext/hash.rb
yard-0.9.16 lib/yard/core_ext/hash.rb
yard-0.9.15 lib/yard/core_ext/hash.rb
yard-0.9.14 lib/yard/core_ext/hash.rb
yard-0.9.13 lib/yard/core_ext/hash.rb
yard-0.9.12 lib/yard/core_ext/hash.rb
yard-0.9.11 lib/yard/core_ext/hash.rb
yard-0.9.10 lib/yard/core_ext/hash.rb
yard-0.9.9 lib/yard/core_ext/hash.rb
etude_for_ruby-0.1.4 vendor/bundle/ruby/2.4.0/gems/yard-0.9.8/lib/yard/core_ext/hash.rb
etude_for_ruby-0.1.4 vendor/bundle/ruby/2.2.0/gems/yard-0.9.8/lib/yard/core_ext/hash.rb
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/yard-0.9.8/lib/yard/core_ext/hash.rb
yard-0.9.8 lib/yard/core_ext/hash.rb