diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-13 08:07:36 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-13 08:07:36 +0000 |
commit | f70e60783e2b83c5749f9461d156d3bd9a5c221a (patch) | |
tree | e7770d99121cb5f039bf79b687f92cde1b303f89 /test | |
parent | 92958d0a46534f5bb02854432eeed82dd77dfe02 (diff) |
merges r24012 from trunk into ruby_1_9_1.
--
* vm_insnhelper.c (vm_search_superclass): checks for implicit
argument passing before method search. [ruby-core:24244]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_super.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_super.rb b/test/ruby/test_super.rb index 5e93074e2d..8de1e2fa7e 100644 --- a/test/ruby/test_super.rb +++ b/test/ruby/test_super.rb @@ -130,5 +130,13 @@ class TestSuper < Test::Unit::TestCase a = A.new a.uu(12) assert_equal("A#tt", a.tt(12), "[ruby-core:3856]") + e = assert_raise(RuntimeError, "[ruby-core:24244]") { + lambda { + Class.new do + define_method(:a) {super}.call + end + }.call + } + assert_match(/implicit argument passing of super from method defined by define_method/, e.message) end end |