Sha256: a20ce371a1502d16f34ed9b1ef5312962c74838e27dc81f298ec61d91d96fde1
Contents?: true
Size: 574 Bytes
Versions: 14
Compression:
Stored size: 574 Bytes
Contents
# frozen_string_literal: true RubyNext::Core.patch Hash, method: :deconstruct_keys, version: "2.7" do <<~RUBY def deconstruct_keys(_) self end RUBY end # We need to hack `respond_to?` in Ruby 2.5, since it's not working with refinements if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6") RubyNext::Core.patch refineable: Hash, name: "HashRespondToDeconstructKeys", method: :deconstruct_keys, version: "2.7" do <<~RUBY def respond_to?(mid, *) return true if mid == :deconstruct_keys super end RUBY end end
Version data entries
14 entries across 14 versions & 2 rubygems