1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
ko1 2014-10-27 07:29:32 +00:00
parent 3edcd548f7
commit ed8da2d12a
2 changed files with 22 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Mon Oct 27 16:26:37 2014 Koichi Sasada <ko1@atdot.net>
* test/ruby/test_super.rb: add a test to check block passing.
Mon Oct 27 15:59:26 2014 Koichi Sasada <ko1@atdot.net>
* gc.c: is_incremental_marking(), will_be_incremental_marking():

View file

@ -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