rogerdpack-sane 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/sane_ruby/hash_hashes.rb +11 -0
  2. metadata +2 -1
@@ -0,0 +1,11 @@
1
+ # extracted from from http://blog.playlouder.com/2008/05/07/an-interesting-ruby-hash-semantics-gotcha/
2
+
3
+ class Hash
4
+ def hash
5
+ inject(0) {|hash,pair| hash ^ pair.hash}
6
+ end
7
+
8
+ def eql?(other)
9
+ self == other
10
+ end
11
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rogerdpack-sane
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roger Pack
@@ -36,6 +36,7 @@ files:
36
36
  - lib/sane.rb
37
37
  - lib/sane_ruby/enumerable-extra.rb
38
38
  - lib/_dbg.rb
39
+ - lib/sane_ruby/hash_hashes.rb
39
40
  has_rdoc: false
40
41
  homepage: http://github.com/rogerdpack/sane_ruby
41
42
  licenses: