diff options
author | Jeremy Evans <code@jeremyevans.net> | 2020-09-22 09:40:45 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2020-09-22 12:04:48 -0700 |
commit | 179384a66862d5ef7413b6f4850b97d0becf4ec9 (patch) | |
tree | 32d0c29f05e3166b47d9f1b0741192c26635c584 /test | |
parent | f3dddd77a925f576acb6abab9b37e8839f028412 (diff) |
Revert "Prevent SystemStackError when calling super in module with activated refinement"
This reverts commit eeef16e190cdabc2ba474622720f8e3df7bac43b.
This also reverts the spec change.
Preventing the SystemStackError would be nice, but there is valid
code that the fix breaks, and it is probably more common than cases
that cause the SystemStackError.
Fixes [Bug #17182]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3564
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_refinement.rb | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb index e4a5cd25d2..785113de77 100644 --- a/test/ruby/test_refinement.rb +++ b/test/ruby/test_refinement.rb @@ -484,37 +484,6 @@ class TestRefinement < Test::Unit::TestCase assert_equal("M#baz C#baz", RefineModule.call_baz) end - module RefineIncludeActivatedSuper - class C - def foo - ["C"] - end - end - - module M; end - - refinement = Module.new do - R = refine C do - def foo - ["R"] + super - end - - include M - end - end - - using refinement - M.define_method(:foo){["M"] + super()} - - def self.foo - C.new.foo - end - end - - def test_refine_include_activated_super - assert_equal(["R", "M", "C"], RefineIncludeActivatedSuper.foo) - end - def test_refine_neither_class_nor_module assert_raise(TypeError) do Module.new { |