Refinement#include and Refinement#prepend have been deprecated

This commit is contained in:
Nobuyoshi Nakada 2021-10-22 13:53:21 +09:00
Родитель 4446942f1a
Коммит 9f4f3bd1cc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7CD2805BFA3770C6
1 изменённых файлов: 234 добавлений и 228 удалений

Просмотреть файл

@ -298,6 +298,7 @@ describe "Module#refine" do
result.should == "foo from IncludeMeLater"
end
ruby_version_is ""..."3.1" do
it "looks in prepended modules from the refinement first" do
refined_class = ModuleSpecs.build_refined_class
@ -356,6 +357,7 @@ describe "Module#refine" do
result.should == "foo from included module"
end
end
it "looks in the class then" do
refined_class = ModuleSpecs.build_refined_class
@ -704,6 +706,7 @@ describe "Module#refine" do
result.should == "foo"
end
ruby_version_is ""..."3.1" do
it "looks in the refined class from included module" do
refined_class = ModuleSpecs.build_refined_class(for_super: true)
@ -754,6 +757,7 @@ describe "Module#refine" do
result.should == [:A, :C]
end
end
# super in a method of a refinement invokes the method in the refined
# class even if there is another refinement which has been activated
@ -816,6 +820,7 @@ describe "Module#refine" do
end
end
ruby_version_is ""..."3.1" do
it "does't have access to active refinements for C from included module" do
refined_class = ModuleSpecs.build_refined_class
@ -987,6 +992,7 @@ describe "Module#refine" do
result.should == [:A, :LOCAL, :C]
end
end
end
it 'and alias aliases a method within a refinement module, but not outside it' do
Module.new do