named_value_class 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/named_value_class.rb +1 -1
  2. metadata +1 -1
@@ -49,7 +49,7 @@ def NamedValueClass(klass_name,superclass, &block)
49
49
  this = self
50
50
  self.class.singleton_class.instance_eval do
51
51
  @mapping ||= {}
52
- @mapping[value] = this
52
+ @mapping[value] = this unless @mapping[value]
53
53
  end
54
54
 
55
55
  named_values_collection << self
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: named_value_class
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: