1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
shugo 2012-08-04 01:04:05 +00:00
parent 260d02d91d
commit cd060b4588
2 changed files with 30 additions and 0 deletions

View file

@ -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

View file

@ -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