Permalink
Browse files

check if @_null_object is defined to avoid warning when it is not

  • Loading branch information...
dchelimsky committed Feb 27, 2012
1 parent 3bb19cb commit 185d47e6becd2160f59265dde5e09a5fcdc9cc39
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rspec/mocks/methods.rb
@@ -103,7 +103,7 @@ def as_null_object
# Returns true if this object has received `as_null_object`
def null_object?
- @_null_object
+ defined?(@_null_object)
end
# @private

0 comments on commit 185d47e

Please sign in to comment.