summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_block.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/bootstraptest/test_block.rb b/bootstraptest/test_block.rb
index ea6768cc25..6a2ccfc6da 100644
--- a/bootstraptest/test_block.rb
+++ b/bootstraptest/test_block.rb
@@ -565,3 +565,35 @@ assert_normal_exit %q{
t.test_for_bug
}, '[ruby-core:14395]'
+assert_equal 'true', %q{
+ class C0
+ def foo
+ block_given?
+ end
+ end
+
+ class C1 < C0
+ def foo
+ super
+ end
+ end
+
+ C1.new.foo{}
+}
+
+assert_equal 'true', %q{
+ class C0
+ def foo
+ block_given?
+ end
+ end
+
+ class C1 < C0
+ def foo
+ super()
+ end
+ end
+
+ C1.new.foo{}
+}
+