Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 304c30f

Browse files
committed
Call include directly
1 parent 0b4dca2 commit 304c30f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/rspec/core/configuration.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -843,8 +843,8 @@ def expect_with(*frameworks)
843843

844844
# Tag this exception class so our exception formatting logic knows
845845
# that it satisfies the `MultipleExceptionError` interface.
846-
::RSpec::Expectations::MultipleExpectationsNotMetError.__send__(
847-
:include, MultipleExceptionError::InterfaceTag
846+
::RSpec::Expectations::MultipleExpectationsNotMetError.include(
847+
MultipleExceptionError::InterfaceTag
848848
)
849849

850850
::RSpec::Matchers
@@ -2331,11 +2331,11 @@ def metadata_applies_to_group?(meta, group)
23312331
end
23322332

23332333
def safe_prepend(mod, host)
2334-
host.__send__(:prepend, mod) unless host < mod
2334+
host.prepend(mod) unless host < mod
23352335
end
23362336

23372337
def safe_include(mod, host)
2338-
host.__send__(:include, mod) unless host < mod
2338+
host.include(mod) unless host < mod
23392339
end
23402340

23412341
def safe_extend(mod, host)

lib/rspec/core/memoized_helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def self.module_for(example_group)
514514

515515
# @private
516516
def self.define_helpers_on(example_group)
517-
example_group.__send__(:include, module_for(example_group))
517+
example_group.include(module_for(example_group))
518518
end
519519

520520
# @private

0 commit comments

Comments
 (0)