summaryrefslogtreecommitdiff
path: root/test/ruby/test_super.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-25 00:59:29 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-25 00:59:29 +0000
commit1e56548995fe2b3b266ccdfecce0ef1163534dc6 (patch)
tree6385c62c3281772a716b3b40957164618f7dde2a /test/ruby/test_super.rb
parent80440ed07f23c2f6a53e210f84aa2d4ca7f92555 (diff)
insns.def: super from at_exit
* insns.def (invokesuper): klass in cfp is not valid in at_exit and END blocks. [ruby-core:47680] [Bug #7064] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_super.rb')
-rw-r--r--test/ruby/test_super.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_super.rb b/test/ruby/test_super.rb
index dcd700858c..bdd584c0b8 100644
--- a/test/ruby/test_super.rb
+++ b/test/ruby/test_super.rb
@@ -1,4 +1,5 @@
require 'test/unit'
+require_relative 'envutil'
class TestSuper < Test::Unit::TestCase
class Base
@@ -347,4 +348,14 @@ class TestSuper < Test::Unit::TestCase
assert_equal 'hoge', foo.new.bar
end
+
+ def test_super_in_at_exit
+ bug7064 = '[ruby-core:47680]'
+ assert_normal_exit "at_exit {super}", bug7064
+ end
+
+ def test_super_in_END
+ bug7064 = '[ruby-core:47680]'
+ assert_normal_exit "END {super}", bug7064
+ end
end