Skip to content

Commit

Permalink
check if @_null_object is defined to avoid warning when it is not
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Feb 27, 2012
1 parent 3bb19cb commit 185d47e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec/mocks/methods.rb
Expand Up @@ -103,7 +103,7 @@ def as_null_object


# Returns true if this object has received `as_null_object` # Returns true if this object has received `as_null_object`
def null_object? def null_object?
@_null_object defined?(@_null_object)
end end


# @private # @private
Expand Down

0 comments on commit 185d47e

Please sign in to comment.