Sha256: 2c7a08db7a0b60ff48c7a34436d0d787cb8830514ba266f55b40e31649061ea4
Contents?: true
Size: 367 Bytes
Versions: 25
Compression:
Stored size: 367 Bytes
Contents
require 'backports/2.1.0/array/to_h' unless Array.method_defined? :to_h if [[:need, true]].to_h { [:need, false] } [:need] require 'backports/tools/alias_method_chain' class Array def to_h_with_block(&block) receiver = block ? map(&block) : self receiver.to_h_without_block end Backports.alias_method_chain self, :to_h, :block end end
Version data entries
25 entries across 25 versions & 3 rubygems