summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_alias.rb9
-rw-r--r--test/ruby/test_module.rb2
2 files changed, 10 insertions, 1 deletions
diff --git a/test/ruby/test_alias.rb b/test/ruby/test_alias.rb
index 8901fc243c..802c196355 100644
--- a/test/ruby/test_alias.rb
+++ b/test/ruby/test_alias.rb
@@ -193,4 +193,13 @@ class TestAlias < Test::Unit::TestCase
assert_equal(o.to_s, o.orig_to_s, bug)
end;
end
+
+ class C0; def foo; end; end
+ class C1 < C0; alias bar foo; end
+
+ def test_alias_method_equation
+ obj = C1.new
+ assert_equal(obj.method(:bar), obj.method(:foo))
+ assert_equal(obj.method(:foo), obj.method(:bar))
+ end
end
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 9c5ec6032a..8bfdf8db35 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -2042,7 +2042,7 @@ class TestModule < Test::Unit::TestCase
A.prepend InspectIsShallow
- expect = "#<Method: A(Object)#inspect(shallow_inspect)>"
+ expect = "#<Method: A(ShallowInspect)#inspect(shallow_inspect)>"
assert_equal expect, A.new.method(:inspect).inspect, "#{bug_10282}"
RUBY
end