Sha256: d723e7fdc800282751b50061d7f4c31bab6e2244d4c9f10882fd85b7c5c97f3a

Contents?: true

Size: 255 Bytes

Versions: 26

Compression:

Stored size: 255 Bytes

Contents

class Hash
  if {}.select{} == []
    def select_with_hash_return
      return to_enum(:select) unless block_given?
      Hash[select_without_hash_return{|k, v| yield [k, v]}]
    end
    Backports.alias_method_chain self, :select, :hash_return
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
scout_realtime-1.0.5 lib/vendor/backports-3.3.5/lib/backports/force/hash_select.rb
scout_realtime-1.0.4 lib/vendor/backports-3.3.5/lib/backports/force/hash_select.rb
scout_realtime-1.0.3 lib/vendor/backports-3.3.5/lib/backports/force/hash_select.rb
scout_realtime-1.0.3.pre lib/vendor/backports-3.3.5/lib/backports/force/hash_select.rb
scout_realtime-1.0.2 lib/vendor/backports-3.3.5/lib/backports/force/hash_select.rb
scout_realtime-1.0.1 lib/vendor/backports-3.3.5/lib/backports/force/hash_select.rb
scout_realtime-1.0.0 lib/vendor/backports-3.3.5/lib/backports/force/hash_select.rb
scout_realtime-0.5.5 lib/vendor/backports-3.3.5/lib/backports/force/hash_select.rb
scout_realtime-0.5.5.pre lib/vendor/backports-3.3.5/lib/backports/force/hash_select.rb
scout_realtime-0.5.4 lib/vendor/backports-3.3.5/lib/backports/force/hash_select.rb
backports-3.6.0 lib/backports/force/hash_select.rb
backports-3.5.0 lib/backports/force/hash_select.rb
backports-3.4.1 lib/backports/force/hash_select.rb
scout_realtime-0.5.3 lib/vendor/backports-3.3.5/lib/backports/force/hash_select.rb
scout_realtime-0.5.2 lib/vendor/backports-3.3.5/lib/backports/force/hash_select.rb
scout_realtime-0.5.1 lib/vendor/backports-3.3.5/lib/backports/force/hash_select.rb
backports-3.4.0 lib/backports/force/hash_select.rb
backports-3.3.5 lib/backports/force/hash_select.rb
backports-3.3.4 lib/backports/force/hash_select.rb
backports-3.3.3 lib/backports/force/hash_select.rb