Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 185d47e6becd2160f59265dde5e09a5fcdc9cc39 1 parent 3bb19cb
@dchelimsky dchelimsky authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/rspec/mocks/methods.rb
View
2  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
Please sign in to comment.
Something went wrong with that request. Please try again.