summaryrefslogtreecommitdiff
path: root/test/ruby/test_refinement.rb
diff options
context:
space:
mode:
authorShugo Maeda <[email protected]>2022-01-05 16:58:23 +0900
committerShugo Maeda <[email protected]>2022-01-05 16:58:23 +0900
commit21ee5341f8fc4ca513295dff2148f7c203c908a7 ()
treeb78bdf96d31a7a53329dd63d216f473d7b281e38 /test/ruby/test_refinement.rb
parent5757696e07398112c6275704f2cf873aa700f80b (diff)
Add Module.used_refinements
-rw-r--r--test/ruby/test_refinement.rb17
1 files changed, 17 insertions, 0 deletions
@@ -1687,6 +1687,8 @@ class TestRefinement < Test::Unit::TestCase
refine Object do
def in_ref_a
end
end
end
@@ -1694,6 +1696,8 @@ class TestRefinement < Test::Unit::TestCase
refine Object do
def in_ref_b
end
end
end
@@ -1703,23 +1707,28 @@ class TestRefinement < Test::Unit::TestCase
refine Object do
def in_ref_c
end
end
end
module Foo
using RefB
USED_MODS = Module.used_modules
end
module Bar
using RefC
USED_MODS = Module.used_modules
end
module Combined
using RefA
using RefB
USED_MODS = Module.used_modules
end
end
@@ -1731,6 +1740,14 @@ class TestRefinement < Test::Unit::TestCase
assert_equal [ref::RefB, ref::RefA], ref::Combined::USED_MODS
end
def test_warn_setconst_in_refinmenet
bug10103 = '[ruby-core:64143] [Bug #10103]'
warnings = [