From cd060b4588b80786f921ab8d8e80efc143dce5fe Mon Sep 17 00:00:00 2001 From: shugo Date: Sat, 4 Aug 2012 01:04:05 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++++ test/ruby/test_alias.rb | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7c565f105e..04a26c37f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Aug 4 10:02:03 2012 Shugo Maeda + + * 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 * 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