fuzzyhash 0.0.5 → 0.0.6

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.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 0
3
- :patch: 5
3
+ :patch: 6
4
4
  :major: 0
data/lib/fuzzy_hash.rb CHANGED
@@ -16,6 +16,7 @@ class FuzzyHash
16
16
  end
17
17
 
18
18
  def ==(o)
19
+ o.is_a?(FuzzyHash)
19
20
  o.instance_variable_get(:@hash) == @hash &&
20
21
  o.instance_variable_get(:@regexes) == @regexes
21
22
  end
@@ -51,6 +52,7 @@ class FuzzyHash
51
52
  @hash[key] = value
52
53
  @hash_reverse[value] = key
53
54
  end
55
+ value
54
56
  end
55
57
 
56
58
  def replace(src, dest)
@@ -109,4 +109,10 @@ describe "Fuzzy hash" do
109
109
  l_1.should == l_2
110
110
  end
111
111
 
112
+ it "should return the value when adding the value" do
113
+ h = FuzzyHash.new
114
+ (h[/asd/] = '123').should == '123'
115
+ (h['qwe'] = '123').should == '123'
116
+ end
117
+
112
118
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuzzyhash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Hull
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-21 00:00:00 +09:00
12
+ date: 2009-08-22 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15