diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-04 01:04:05 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-04 01:04:05 +0000 |
commit | cd060b4588b80786f921ab8d8e80efc143dce5fe (patch) | |
tree | e8f059309153d43548d7aff1c9f970018d48a88d /test/ruby/test_alias.rb | |
parent | 260d02d91d769f4ef3075e9248e1aae73e22a22b (diff) | |
download | ruby-cd060b4588b80786f921ab8d8e80efc143dce5fe.tar.gz |
* test/ruby/test_alias.rb (test_super_in_aliased_module_method):
add a test case for [ruby-dev:46028], which fails in 1.8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_alias.rb')
-rw-r--r-- | test/ruby/test_alias.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/ruby/test_alias.rb b/test/ruby/test_alias.rb index 6320121bce..e154982c89 100644 --- a/test/ruby/test_alias.rb +++ b/test/ruby/test_alias.rb @@ -104,4 +104,29 @@ class TestAlias < Test::Unit::TestCase end assert_equal(:ok, d.new.bar) end + + module SuperInAliasedModuleMethod + module M + def foo + super << :M + end + + alias bar foo + end + + class Base + def foo + [:Base] + end + end + + class Derived < Base + include M + end + end + + # [ruby-dev:46028] + def test_super_in_aliased_module_method # fails in 1.8 + assert_equal([:Base, :M], SuperInAliasedModuleMethod::Derived.new.bar) + end end |