Sha256: 5a32376aef9075ec8b3b82ed0936554cf8e8954e7615f579751ce8c9c2261889

Contents?: true

Size: 132 Bytes

Versions: 20

Compression:

Stored size: 132 Bytes

Contents

unless Hash.method_defined? :to_proc
  class Hash
    def to_proc
      h = self
      Proc.new{|*args| h[*args]}
    end
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/backports-3.12.0/lib/backports/2.3.0/hash/to_proc.rb
backports-3.16.1 lib/backports/2.3.0/hash/to_proc.rb
backports-3.16.0 lib/backports/2.3.0/hash/to_proc.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/backports-3.15.0/lib/backports/2.3.0/hash/to_proc.rb
backports-3.15.0 lib/backports/2.3.0/hash/to_proc.rb
backports-3.14.0 lib/backports/2.3.0/hash/to_proc.rb
backports-3.13.0 lib/backports/2.3.0/hash/to_proc.rb
backports-3.12.0 lib/backports/2.3.0/hash/to_proc.rb
backports-3.11.4 lib/backports/2.3.0/hash/to_proc.rb
backports-3.11.3 lib/backports/2.3.0/hash/to_proc.rb
backports-3.11.2 lib/backports/2.3.0/hash/to_proc.rb
backports-3.11.1 lib/backports/2.3.0/hash/to_proc.rb
backports-3.11.0 lib/backports/2.3.0/hash/to_proc.rb
backports-3.10.3 lib/backports/2.3.0/hash/to_proc.rb
backports-3.10.2 lib/backports/2.3.0/hash/to_proc.rb
backports-3.10.1 lib/backports/2.3.0/hash/to_proc.rb
backports-3.10.0 lib/backports/2.3.0/hash/to_proc.rb
backports-3.9.1 lib/backports/2.3.0/hash/to_proc.rb
backports-3.9.0 lib/backports/2.3.0/hash/to_proc.rb
backports-3.8.0 lib/backports/2.3.0/hash/to_proc.rb