From 5b2cf7eac89550fc88aea45ad2a9dfe9a261c2b1 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Sat, 19 Dec 2020 11:48:04 +0900 Subject: Partially reintroduce e042e8460bb9a63c05f938d51e8c7c5345a6f3a4 and ... 34f06062174882a98ebef998c50ad8d4f7fc0f2e Add a test for alias_method --- test/ruby/test_module.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 392a98b693..cb8631bf08 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -1233,9 +1233,10 @@ class TestModule < Test::Unit::TestCase o = c.new assert_respond_to(o, :foo) assert_not_respond_to(o, :bar) - c.class_eval {alias_method :bar, :foo} + r = c.class_eval {alias_method :bar, :foo} assert_respond_to(o, :bar) assert_equal(:foo, o.bar) + assert_equal(:bar, r) end def test_undef -- cgit v1.2.3