hamsterdam 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -118,6 +118,7 @@ module Hamsterdam
118
118
 
119
119
  def ==(other)
120
120
  !other.nil? &&
121
+ other.respond_to?(:internal_hash) &&
121
122
  internal_hash == other.internal_hash
122
123
  end
123
124
 
@@ -1,3 +1,3 @@
1
1
  module Hamsterdam
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
@@ -157,6 +157,13 @@ describe "Hamsterdam structures" do
157
157
  (s1 == nil).should be_false
158
158
  s1.should_not == nil
159
159
  end
160
+
161
+ it "can be compared to non structs" do
162
+ s1 = struct_class.new(top: 50, bottom: 75)
163
+ s1.eql?(:foo).should be_false
164
+ (s1 == :foo).should be_false
165
+ s1.should_not == :foo
166
+ end
160
167
  end
161
168
 
162
169
  it "uses the same #hash as the underlying data structure" do
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: hamsterdam
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.7
5
+ version: 1.0.8
6
6
  platform: ruby
7
7
  authors:
8
8
  - David Crosby
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-30 00:00:00.000000000 Z
12
+ date: 2013-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hamster