Sha256: a95dc575acb71e0bb9f9d77aedc1f1120980f2760d448f75beb547864cf47964
Contents?: true
Size: 557 Bytes
Versions: 20
Compression:
Stored size: 557 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(::RubyNext.current_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
20 entries across 20 versions & 1 rubygems