operable 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,8 +12,10 @@ module Operable
12
12
 
13
13
  self.class.new.tap do |o|
14
14
  operable_values.each do |k,v|
15
- o.send("#{k}=", (v || 0).send(method, (other.send(k) || 0)))
16
- # o[k] = (v || 0).send(method, (other[k] || 0))
15
+ our_value = v || 0
16
+ other_value = other.respond_to?(k) ? other.send(k) : 0
17
+
18
+ o.send("#{k}=", our_value.send(method, other_value || 0))
17
19
  end
18
20
  end
19
21
  end
@@ -1,3 +1,3 @@
1
1
  module Operable
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: operable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: