rr 0.10.6 → 0.10.7

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/CHANGES CHANGED
@@ -1,3 +1,6 @@
1
+ - Fixed issue with DoubleInjections binding to objects overriding the method method.
2
+
3
+ 0.10.6
1
4
  - Added MIT license
2
5
  - Fixed Bug - dont_allow doesn't work when it follows stub (http://github.com/btakita/rr/issues#issue/20)
3
6
  - Fixed exception with DoubleInjections on proxy objects (http://github.com/btakita/rr/issues#issue/24)
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :build:
3
3
  :minor: 10
4
- :patch: 6
4
+ :patch: 7
5
5
  :major: 0
@@ -100,8 +100,9 @@ module RR
100
100
 
101
101
  protected
102
102
  def subject_is_proxy_for_method?(method_name)
103
- method_owner = @subject.method(method_name).owner
104
- !(subject_class.object_id == method_owner.object_id || subject_class.ancestors.include?(method_owner))
103
+ subject_eigen = (class << @subject; self; end)
104
+ method_owner = subject_eigen.instance_methods.include?(method_name.to_s) ? subject_eigen.instance_method(method_name).owner : nil
105
+ !method_owner || !(subject_class.object_id == method_owner.object_id || subject_class.ancestors.include?(method_owner))
105
106
  end
106
107
 
107
108
  def deferred_bind_method
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.6
4
+ version: 0.10.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Takita