diff options
| author | Teddy Wing | 2017-09-25 12:22:29 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-09-25 12:22:29 +0200 | 
| commit | 75c7bc19c318ace8136ee94c2a09952226c0b7de (patch) | |
| tree | 17159eb851f379afded98caffabaa8748714a24c /lib | |
| parent | f4034d9d176a6402de135acd91dc34d7b39dbf4a (diff) | |
| download | chouette-core-75c7bc19c318ace8136ee94c2a09952226c0b7de.tar.bz2 | |
ModelAttribute#==: Check for matching class type
Thanks to Robert for this suggestion, of course it makes a lot of sense
to verify class equivalence when checking equality.
Refs #4401
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/model_attribute.rb | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/lib/model_attribute.rb b/lib/model_attribute.rb index 9d821f551..4d246853a 100644 --- a/lib/model_attribute.rb +++ b/lib/model_attribute.rb @@ -93,7 +93,8 @@ class ModelAttribute    end    def ==(other) -    klass == other.klass && +    self.class === other && +      klass == other.klass &&        name == other.name &&        data_type == other.data_type    end | 
