summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-27 07:29:32 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-27 07:29:32 +0000
commited8da2d12ae041b0536d3303659dc98411c2ec4f (patch)
tree3a9d7a23e991e1f8b2ae317e4d7582c089156934 /test
parent3edcd548f73846a98cb1a33057fa0019d4ef5cc0 (diff)
* test/ruby/test_super.rb: add a test to check block passing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_super.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/ruby/test_super.rb b/test/ruby/test_super.rb
index 820e22134a..e4d3b8d57a 100644
--- a/test/ruby/test_super.rb
+++ b/test/ruby/test_super.rb
@@ -508,4 +508,22 @@ class TestSuper < Test::Unit::TestCase
end
assert_equal("A", b.new.foo, bug10263)
end
+
+ def test_super_with_block
+ a = Class.new do
+ def foo
+ yield
+ end
+ end
+
+ b = Class.new(a) do
+ def foo
+ super{
+ "b"
+ }
+ end
+ end
+
+ assert_equal "b", b.new.foo{"c"}
+ end
end