property 2.3.1 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 2.3.2 2012-07-02
2
+
3
+ * Minor enhancements
4
+ * Fix a bug in merge hash with a nil original value.
5
+
1
6
  == 2.3.1 2012-07-02
2
7
 
3
8
  * Major enhancements
@@ -34,8 +34,9 @@ module Property
34
34
  delete(key)
35
35
  end
36
36
  elsif value.kind_of?(Hash) && column.klass <= Hash && column.caster.respond_to?(:merge_hash)
37
+ orig = self[key]
37
38
  # We *MUST* duplicate hash here or Dirty will not function correctly.
38
- value = column.caster.merge_hash(self[key].dup, value)
39
+ value = column.caster.merge_hash(orig ? orig.dup : {}, value)
39
40
  if value.blank?
40
41
  if default = column.default_for(@owner)
41
42
  super(key, default)
@@ -1,3 +1,3 @@
1
1
  module Property
2
- VERSION = '2.3.1'
3
- end
2
+ VERSION = '2.3.2'
3
+ end
data/property.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{property}
8
- s.version = "2.3.1"
8
+ s.version = "2.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Renaud Kern", "Gaspard Bucher"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: property
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 3
9
- - 1
10
- version: 2.3.1
9
+ - 2
10
+ version: 2.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Renaud Kern