Skip to content

Commit

Permalink
drop assert_ivars/present_ivars from BaseMatcher
Browse files Browse the repository at this point in the history
They aren't referenced anymore, and apparently haven't been for ~10
years.
  • Loading branch information
nevinera authored and JonRowe committed Jul 16, 2024
1 parent 878c6d9 commit 2ef2588
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions lib/rspec/matchers/built_in/base_matcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,22 +126,6 @@ def self.underscore(camel_cased_word)

private

def assert_ivars(*expected_ivars)
return unless (expected_ivars - present_ivars).any?
ivar_list = EnglishPhrasing.list(expected_ivars)
raise "#{self.class.name} needs to supply#{ivar_list}"
end

if RUBY_VERSION.to_f < 1.9
# :nocov:
def present_ivars
instance_variables.map(&:to_sym)
end
# :nocov:
else
alias present_ivars instance_variables
end

# @private
module HashFormatting
# `{ :a => 5, :b => 2 }.inspect` produces:
Expand Down

0 comments on commit 2ef2588

Please sign in to comment.