Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't hit `__mock_proxy` unless you need to. This avoids a Rubby 1.8.…

…7 Proc equality bug: https://gist.github.com/1702877

This commit fixes the build for 1.8.7
  • Loading branch information...
commit 9a201dafb3b0acfee4ff71f9feefc2a7ec2990fa 1 parent de283b3
@justinko justinko authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/rspec/mocks/methods.rb
View
3  lib/rspec/mocks/methods.rb
@@ -97,12 +97,13 @@ def stub_chain(*chain, &blk)
# are declared, they'll work as expected. If not, the receiver is
# returned.
def as_null_object
+ @_null_object = true
__mock_proxy.as_null_object
end
# Returns true if this object has received `as_null_object`
def null_object?
- __mock_proxy.null_object?
+ @_null_object
end
# @private
Please sign in to comment.
Something went wrong with that request. Please try again.