active_value 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_value/base.rb +1 -1
- data/lib/active_value/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7b6e5171d472898893d059bd6255cc328f09556e90648d57f2d50666db1df95
|
4
|
+
data.tar.gz: 01ebd564d90d24b72d061fc9db40f975d930e86866b74b86fc6911c47745c548
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24c684de542964f56c8ca398ccab44df65e959a7f40c5c2b9c3541db3064ac8433c0179b68bf571af1a97d2e8f74b18b92f974b90c5b949bb11aed98aada7482
|
7
|
+
data.tar.gz: 79af7ce2312d5089fdc6d4ecf4b031917674e78d2d45b1832a8d9e8b4f5781ea5744cb5e2528854fa67fcb791b4274b4d2cd035815b0322d284351964e98fd70
|
data/lib/active_value/base.rb
CHANGED
@@ -140,7 +140,7 @@ module ActiveValue
|
|
140
140
|
|
141
141
|
# Define the equal operator. `A == B` expression means every attribute has same value. (NOT object_id comparison)
|
142
142
|
def ==(another)
|
143
|
-
self.class.accessors.all? { |attr| public_send(attr) == another.public_send(attr) }
|
143
|
+
self.class.accessors.all? { |attr| respond_to?(attr) && another.respond_to?(attr) && public_send(attr) == another.public_send(attr) }
|
144
144
|
end
|
145
145
|
alias_method :eql?, :==
|
146
146
|
|
data/lib/active_value/version.rb
CHANGED