mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-19 23:50:20 +08:00
add test for RM-357 and RM-156
This commit is contained in:
@@ -295,3 +295,20 @@ describe "self" do
|
||||
$test_dealloc.should == true
|
||||
end
|
||||
end
|
||||
|
||||
# RM-357, RM-156
|
||||
describe "Kernel.#block_given?" do
|
||||
def first_block
|
||||
second_block do
|
||||
block_given?
|
||||
end
|
||||
end
|
||||
|
||||
def second_block(&block)
|
||||
block.call
|
||||
end
|
||||
|
||||
it "should return true even if passed Proc into method argument" do
|
||||
first_block.should == true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user