summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2020-12-19 11:48:04 +0900
committerYusuke Endoh <mame@ruby-lang.org>2020-12-19 12:24:41 +0900
commit5b2cf7eac89550fc88aea45ad2a9dfe9a261c2b1 (patch)
tree4ae1998dae6670f9930f9bb6d078d6688ba13253
parent51bcd50915941d21df806e8dcde769ae63b6eaaf (diff)
Partially reintroduce e042e8460bb9a63c05f938d51e8c7c5345a6f3a4 and ...
34f06062174882a98ebef998c50ad8d4f7fc0f2e Add a test for alias_method
-rw-r--r--test/ruby/test_module.rb3
1 files changed, 2 insertions, 1 deletions
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