summaryrefslogtreecommitdiff
path: root/spec/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-26 23:17:14 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-26 23:28:54 +0900
commit69f03c864eb193a163631d9a208fd64944b078dc (patch)
tree36717898123ab9e361951a1bacdadc0015eab7b0 /spec/ruby
parent39bc5de83394a380c9967df74e06c824186f8560 (diff)
Remove Refinement#include and Refinement#prepend
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5348
Diffstat (limited to 'spec/ruby')
-rw-r--r--spec/ruby/core/module/refine_spec.rb36
1 files changed, 19 insertions, 17 deletions
diff --git a/spec/ruby/core/module/refine_spec.rb b/spec/ruby/core/module/refine_spec.rb
index f6751a42da..56ffc7ead2 100644
--- a/spec/ruby/core/module/refine_spec.rb
+++ b/spec/ruby/core/module/refine_spec.rb
@@ -243,28 +243,30 @@ describe "Module#refine" do
result.should == "foo from singleton class"
end
- it "looks in the included modules for builtin methods" do
- result = ruby_exe(<<-RUBY)
- a = Module.new do
- def /(other) quo(other) end
- end
+ ruby_version_is ""..."3.2" do
+ it "looks in the included modules for builtin methods" do
+ result = ruby_exe(<<-RUBY)
+ a = Module.new do
+ def /(other) quo(other) end
+ end
- refinement = Module.new do
- refine Integer do
- include a
+ refinement = Module.new do
+ refine Integer do
+ include a
+ end
end
- end
- result = nil
- Module.new do
- using refinement
- result = 1 / 2
- end
+ result = nil
+ Module.new do
+ using refinement
+ result = 1 / 2
+ end
- print result.class
- RUBY
+ print result.class
+ RUBY
- result.should == 'Rational'
+ result.should == 'Rational'
+ end
end
it "looks in later included modules of the refined module first" do