diff --git a/core/range/cover_spec.rb b/core/range/cover_spec.rb index 29c0e0bfa8..fa881607e9 100644 --- a/core/range/cover_spec.rb +++ b/core/range/cover_spec.rb @@ -6,4 +6,5 @@ describe "Range#cover?" do it_behaves_like :range_cover_and_include, :cover? it_behaves_like :range_cover, :cover? + it_behaves_like :range_cover_subrange, :cover? end diff --git a/core/range/shared/cover.rb b/core/range/shared/cover.rb index 33d416fef5..5b09cea4e0 100644 --- a/core/range/shared/cover.rb +++ b/core/range/shared/cover.rb @@ -90,7 +90,9 @@ end end end +end +describe :range_cover_subrange, shared: true do ruby_version_is "2.6" do context "range argument" do it "accepts range argument" do