reallycare_utils 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,12 +28,12 @@ module ReallycareUtils
28
28
  end
29
29
 
30
30
  define_method "add_#{@@has_bitmask_field}" do |bitmask_const, save_it=false|
31
- self[@@has_bitmask_field] = self[@@has_bitmask_field] | self.class.bitmask_value(bitmask_const)
31
+ self[@@has_bitmask_field] = (self[@@has_bitmask_field] || 0) | self.class.bitmask_value(bitmask_const)
32
32
  self.save! if save_it
33
33
  end
34
34
 
35
35
  define_method "remove_#{@@has_bitmask_field}" do |bitmask_const, save_it=false|
36
- self[@@has_bitmask_field] = self[@@has_bitmask_field] & ~(self.class.bitmask_value(bitmask_const))
36
+ self[@@has_bitmask_field] = (self[@@has_bitmask_field] || 0) & ~(self.class.bitmask_value(bitmask_const))
37
37
  self.save! if save_it
38
38
  end
39
39
 
@@ -1,3 +1,3 @@
1
1
  module ReallycareUtils
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: reallycare_utils
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Mark Chapman
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-05-04 00:00:00 -04:00
14
+ date: 2011-06-05 00:00:00 -04:00
15
15
  default_executable:
16
16
  dependencies: []
17
17