mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bootstraptest/test_block.rb: add tests for block with super.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a52af29271
commit
fb9034e757
2 changed files with 36 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Oct 11 03:37:08 2012 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* bootstraptest/test_block.rb: add tests for block with super.
|
||||
|
||||
Thu Oct 11 02:54:07 2012 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm_dump.c: fix debug prints to catch up recent changes
|
||||
|
|
|
@ -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{}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue