summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2012-11-23 02:50:34 -0800
committerYukihiro "Matz" Matsumoto <[email protected]>2012-11-23 02:50:34 -0800
commit32bacb21a2d51e9466b54bc5e30a832e68077c78 (patch)
tree07bc3cd937192b3618e71bb7866b82e62f582314 /test
parent276b77021fb099b1b767d5a606ef709fafd7421b (diff)
parent6c8d2ca3995bbefa00ca04e5275b103f7e59dcd6 (diff)
downloadmruby-32bacb21a2d51e9466b54bc5e30a832e68077c78.tar.gz
mruby-32bacb21a2d51e9466b54bc5e30a832e68077c78.zip
Merge pull request #570 from skandhas/pr-remove-redundant-LOOP_NORMAL-checkups
remove redundant LOOP_NORMAL checkups in function:codegen. and fix #561
Diffstat (limited to 'test')
-rw-r--r--test/t/bs_block.rb30
1 files changed, 29 insertions, 1 deletions
diff --git a/test/t/bs_block.rb b/test/t/bs_block.rb
index cbfb925fe..4bfdc304a 100644
--- a/test/t/bs_block.rb
+++ b/test/t/bs_block.rb
@@ -389,7 +389,7 @@ assert('BS Block [ruby-core:14395]') do
t.test_for_bug
end
-assert("BS Block 32") do
+assert("BS Block 33") do
module TestReturnFromNestedBlock
def self.test
1.times do
@@ -402,3 +402,31 @@ assert("BS Block 32") do
end
TestReturnFromNestedBlock.test == :ok
end
+
+assert("BS Block 34") do
+ module TestReturnFromNestedBlock_BSBlock34
+ def self.test
+ 1.times do
+ while true
+ return :ok
+ end
+ end
+ :bad
+ end
+ end
+ TestReturnFromNestedBlock_BSBlock34.test == :ok
+end
+
+assert("BS Block 35") do
+ module TestReturnFromNestedBlock_BSBlock35
+ def self.test
+ 1.times do
+ until false
+ return :ok
+ end
+ end
+ :bad
+ end
+ end
+ TestReturnFromNestedBlock_BSBlock35.test == :ok
+end