aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_enum.rb
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2022-01-12 17:29:17 +0900
committerYusuke Endoh <mame@ruby-lang.org>2022-01-13 03:21:45 +0900
commitae5458f228a5477383e9c00425d85d50a3867817 (patch)
tree35b9c29da6b6ae054391067bae449dafff6420d1 /test/ruby/test_enum.rb
parent59eb02cd34f4dd50eeba75d8bdaa2c096d1a42a7 (diff)
downloadruby-ae5458f228a5477383e9c00425d85d50a3867817.tar.gz
thread.c: Convert TAG_BREAK to a normal exception at thread top-level
[Bug #18475]
Diffstat (limited to 'test/ruby/test_enum.rb')
-rw-r--r--test/ruby/test_enum.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_enum.rb b/test/ruby/test_enum.rb
index f6375a4ffc..b0c43b9a7f 100644
--- a/test/ruby/test_enum.rb
+++ b/test/ruby/test_enum.rb
@@ -461,6 +461,17 @@ class TestEnumerable < Test::Unit::TestCase
empty.first
empty.block.call
end;
+
+ bug18475 = '[ruby-dev:107059]'
+ assert_in_out_err([], <<-'end;', [], /unexpected break/, bug18475)
+ e = Enumerator.new do |g|
+ Thread.new do
+ g << 1
+ end.join
+ end
+
+ e.first
+ end;
end
def test_sort