diff options
author | Jeremy Evans <[email protected]> | 2022-02-22 13:43:14 -0800 |
---|---|---|
committer | Jeremy Evans <[email protected]> | 2022-03-10 08:35:26 -0800 |
commit | 0c6e24d102e894a7211a596e6aa95828b1cf4406 (patch) | |
tree | f223c3105010c2d8608b29151127c3715c65b1b9 /test/ruby/test_alias.rb | |
parent | 7f5440756eb70117c3f884ea896c10bca8476b33 (diff) |
Fix visibility of alias of zsuper methods
This was broken by 71c746379d5872e250d90ae45c585760afaf9516.
Fixes [Bug #18600]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5592
Diffstat (limited to 'test/ruby/test_alias.rb')
-rw-r--r-- | test/ruby/test_alias.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_alias.rb b/test/ruby/test_alias.rb index 99f2223b49..0d33cb993c 100644 --- a/test/ruby/test_alias.rb +++ b/test/ruby/test_alias.rb @@ -265,6 +265,16 @@ class TestAlias < Test::Unit::TestCase end; end + class C2 + public :system + alias_method :bar, :system + alias_method :system, :bar + end + + def test_zsuper_alias_visibility + assert(C2.new.respond_to?(:system)) + end + def test_alias_memory_leak assert_no_memory_leak([], "#{<<~"begin;"}", "#{<<~'end;'}", rss: true) begin; |