summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-10 01:25:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-10 01:25:26 +0000
commit986a0d543c5bc72137fbf04d18d664db3ad67186 (patch)
treea5323f8ad8860d6b0fe55b17c4f07f36b7e88b9f /test/ruby
parent4d43c82d6acc6a7ba61288a1f542d992bd13b8d7 (diff)
downloadruby-986a0d543c5bc72137fbf04d18d664db3ad67186.tar.gz
ruby-986a0d543c5bc72137fbf04d18d664db3ad67186.tar.xz
ruby-986a0d543c5bc72137fbf04d18d664db3ad67186.zip
* vm_insnhelper.c (vm_search_superclass): checks for implicit
argument passing before method search. [ruby-core:24244] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_super.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_super.rb b/test/ruby/test_super.rb
index 5e93074e2..8de1e2fa7 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