Sha256: b8871d3cc6f46cb37eaf3ed2d6cd045a3dba830805c4ec8f9a60fc46488762d1

Contents?: true

Size: 180 Bytes

Versions: 73

Compression:

Stored size: 180 Bytes

Contents

unless Hash.method_defined? :rassoc
  class Hash
    def rassoc(value)
      k = key(value)
      v = fetch(k){return nil}
      [k, fetch(k)] if k || v == value
    end
  end
end

Version data entries

73 entries across 73 versions & 5 rubygems

Version Path
scout_realtime-0.5.3 lib/vendor/backports-3.3.5/lib/backports/1.9.1/hash/rassoc.rb
scout_realtime-0.5.2 lib/vendor/backports-3.3.5/lib/backports/1.9.1/hash/rassoc.rb
scout_realtime-0.5.1 lib/vendor/backports-3.3.5/lib/backports/1.9.1/hash/rassoc.rb
backports-3.4.0 lib/backports/1.9.1/hash/rassoc.rb
backports-3.3.5 lib/backports/1.9.1/hash/rassoc.rb
backports-3.3.4 lib/backports/1.9.1/hash/rassoc.rb
backports-3.3.3 lib/backports/1.9.1/hash/rassoc.rb
backports-3.3.2 lib/backports/1.9.1/hash/rassoc.rb
backports-3.3.1 lib/backports/1.9.1/hash/rassoc.rb
backports-3.3.0 lib/backports/1.9.1/hash/rassoc.rb
backports-3.2.0 lib/backports/1.9.1/hash/rassoc.rb
backports-3.1.1 lib/backports/1.9.1/hash/rassoc.rb
backports-3.1.0 lib/backports/1.9.1/hash/rassoc.rb