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:
parent
260d02d91d
commit
cd060b4588
2 changed files with 30 additions and 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>
|
Sat Aug 4 01:56:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* vm_insnhelper.c (vm_search_normal_superclass): no longer needs
|
* vm_insnhelper.c (vm_search_normal_superclass): no longer needs
|
||||||
|
|
|
@ -104,4 +104,29 @@ class TestAlias < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
assert_equal(:ok, d.new.bar)
|
assert_equal(:ok, d.new.bar)
|
||||||
end
|
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
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue