hamsterdam 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/lib/hamsterdam.rb CHANGED
@@ -117,7 +117,8 @@ module Hamsterdam
117
117
  end
118
118
 
119
119
  def ==(other)
120
- internal_hash == other.internal_hash
120
+ !other.nil? &&
121
+ internal_hash == other.internal_hash
121
122
  end
122
123
 
123
124
  def eql?(other)
@@ -1,3 +1,3 @@
1
1
  module Hamsterdam
2
- VERSION = "1.0.6"
2
+ VERSION = "1.0.7"
3
3
  end
@@ -150,6 +150,13 @@ describe "Hamsterdam structures" do
150
150
  s1.eql?(s2).should == true
151
151
  s1.should == s2
152
152
  end
153
+
154
+ it "can be compared to nil" do
155
+ s1 = struct_class.new(top: 50, bottom: 75)
156
+ s1.eql?(nil).should be_false
157
+ (s1 == nil).should be_false
158
+ s1.should_not == nil
159
+ end
153
160
  end
154
161
 
155
162
  it "uses the same #hash as the underlying data structure" do
metadata CHANGED
@@ -1,96 +1,106 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hamsterdam
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
5
- prerelease:
4
+ prerelease:
5
+ version: 1.0.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - David Crosby
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-20 00:00:00.000000000 Z
12
+ date: 2013-04-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hamster
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
16
+ version_requirements: !ruby/object:Gem::Requirement
18
17
  requirements:
19
18
  - - ! '>='
20
19
  - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
20
+ version: !binary |-
21
+ MA==
25
22
  none: false
23
+ requirement: !ruby/object:Gem::Requirement
26
24
  requirements:
27
25
  - - ! '>='
28
26
  - !ruby/object:Gem::Version
29
- version: '0'
27
+ version: !binary |-
28
+ MA==
29
+ none: false
30
+ prerelease: false
31
+ type: :runtime
30
32
  - !ruby/object:Gem::Dependency
31
33
  name: rake
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
+ version_requirements: !ruby/object:Gem::Requirement
34
35
  requirements:
35
36
  - - ! '>='
36
37
  - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :development
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
38
+ version: !binary |-
39
+ MA==
41
40
  none: false
41
+ requirement: !ruby/object:Gem::Requirement
42
42
  requirements:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
- version: '0'
45
+ version: !binary |-
46
+ MA==
47
+ none: false
48
+ prerelease: false
49
+ type: :development
46
50
  - !ruby/object:Gem::Dependency
47
51
  name: rspec
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
52
+ version_requirements: !ruby/object:Gem::Requirement
50
53
  requirements:
51
54
  - - ! '>='
52
55
  - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
56
+ version: !binary |-
57
+ MA==
57
58
  none: false
59
+ requirement: !ruby/object:Gem::Requirement
58
60
  requirements:
59
61
  - - ! '>='
60
62
  - !ruby/object:Gem::Version
61
- version: '0'
63
+ version: !binary |-
64
+ MA==
65
+ none: false
66
+ prerelease: false
67
+ type: :development
62
68
  - !ruby/object:Gem::Dependency
63
69
  name: simplecov
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
70
+ version_requirements: !ruby/object:Gem::Requirement
66
71
  requirements:
67
72
  - - ! '>='
68
73
  - !ruby/object:Gem::Version
69
- version: '0'
70
- type: :development
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
74
+ version: !binary |-
75
+ MA==
73
76
  none: false
77
+ requirement: !ruby/object:Gem::Requirement
74
78
  requirements:
75
79
  - - ! '>='
76
80
  - !ruby/object:Gem::Version
77
- version: '0'
81
+ version: !binary |-
82
+ MA==
83
+ none: false
84
+ prerelease: false
85
+ type: :development
78
86
  - !ruby/object:Gem::Dependency
79
87
  name: pry
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
88
+ version_requirements: !ruby/object:Gem::Requirement
82
89
  requirements:
83
90
  - - ! '>='
84
91
  - !ruby/object:Gem::Version
85
- version: '0'
86
- type: :development
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
92
+ version: !binary |-
93
+ MA==
89
94
  none: false
95
+ requirement: !ruby/object:Gem::Requirement
90
96
  requirements:
91
97
  - - ! '>='
92
98
  - !ruby/object:Gem::Version
93
- version: '0'
99
+ version: !binary |-
100
+ MA==
101
+ none: false
102
+ prerelease: false
103
+ type: :development
94
104
  description: Immutable Struct-like record structures based on Hamster.
95
105
  email:
96
106
  - david.crosby@atomicobject.com
@@ -100,43 +110,54 @@ extra_rdoc_files: []
100
110
  files:
101
111
  - README.md
102
112
  - CHANGELOG
103
- - lib/hamsterdam/clj.rb
104
- - lib/hamsterdam/version.rb
105
- - lib/hamsterdam.rb
106
- - spec/hamsterdam_spec.rb
107
- - spec/spec_helper.rb
108
- - spec/support/hamsterdam_helpers.rb
113
+ - !binary |-
114
+ bGliL2hhbXN0ZXJkYW0ucmI=
115
+ - !binary |-
116
+ bGliL2hhbXN0ZXJkYW0vY2xqLnJi
117
+ - !binary |-
118
+ bGliL2hhbXN0ZXJkYW0vdmVyc2lvbi5yYg==
119
+ - !binary |-
120
+ c3BlYy9oYW1zdGVyZGFtX3NwZWMucmI=
121
+ - !binary |-
122
+ c3BlYy9zcGVjX2hlbHBlci5yYg==
123
+ - !binary |-
124
+ c3BlYy9zdXBwb3J0L2hhbXN0ZXJkYW1faGVscGVycy5yYg==
109
125
  homepage: https://github.com/atomicobject/hamsterdam
110
126
  licenses: []
111
- post_install_message:
127
+ post_install_message:
112
128
  rdoc_options: []
113
129
  require_paths:
114
130
  - lib
115
131
  required_ruby_version: !ruby/object:Gem::Requirement
116
- none: false
117
132
  requirements:
118
133
  - - ! '>='
119
134
  - !ruby/object:Gem::Version
120
- version: '0'
121
135
  segments:
122
136
  - 0
123
- hash: 4489320240594326591
124
- required_rubygems_version: !ruby/object:Gem::Requirement
137
+ hash: 2
138
+ version: !binary |-
139
+ MA==
125
140
  none: false
141
+ required_rubygems_version: !ruby/object:Gem::Requirement
126
142
  requirements:
127
143
  - - ! '>='
128
144
  - !ruby/object:Gem::Version
129
- version: '0'
130
145
  segments:
131
146
  - 0
132
- hash: 4489320240594326591
147
+ hash: 2
148
+ version: !binary |-
149
+ MA==
150
+ none: false
133
151
  requirements: []
134
- rubyforge_project:
152
+ rubyforge_project:
135
153
  rubygems_version: 1.8.24
136
- signing_key:
154
+ signing_key:
137
155
  specification_version: 3
138
156
  summary: Immutable Struct-like record structures based on Hamster.
139
157
  test_files:
140
- - spec/hamsterdam_spec.rb
141
- - spec/spec_helper.rb
142
- - spec/support/hamsterdam_helpers.rb
158
+ - !binary |-
159
+ c3BlYy9oYW1zdGVyZGFtX3NwZWMucmI=
160
+ - !binary |-
161
+ c3BlYy9zcGVjX2hlbHBlci5yYg==
162
+ - !binary |-
163
+ c3BlYy9zdXBwb3J0L2hhbXN0ZXJkYW1faGVscGVycy5yYg==