summaryrefslogtreecommitdiff
path: root/bootstraptest/test_syntax.rb
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest/test_syntax.rb')
-rw-r--r--bootstraptest/test_syntax.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb
index e06db6b..5fd948c 100644
--- a/bootstraptest/test_syntax.rb
+++ b/bootstraptest/test_syntax.rb
@@ -662,3 +662,22 @@ assert_equal '1', %q{
foo
}
+assert_equal 'ok', %q{
+ counter = 2
+ while true
+ counter -= 1
+ next if counter != 0
+ break
+ end
+ :ok
+}, '[ruby-core:14385]'
+
+assert_equal 'ok', %q{
+ counter = 2
+ while true
+ counter -= 1
+ next if counter != 0
+ break :ok
+ end # direct
+}, '[ruby-core:14385]'
+