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 | |
| parent | 260d02d91d769f4ef3075e9248e1aae73e22a22b (diff) | |
* 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
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | test/ruby/test_alias.rb | 25 |
2 files changed, 30 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Sat Aug 4 10:02:03 2012 Shugo Maeda <shugo@ruby-lang.org> + + * test/ruby/test_alias.rb (test_super_in_aliased_module_method): + add a test case for [ruby-dev:46028], which fails in 1.8. + Sat Aug 4 01:56:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> * vm_insnhelper.c (vm_search_normal_superclass): no longer needs 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 |
