summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNAKAMURA Usaku <usa@ruby-lang.org>2022-03-19 22:15:40 +0900
committerNAKAMURA Usaku <usa@ruby-lang.org>2022-03-19 22:15:40 +0900
commitea9b0fe5d30efaa7dad1be4da79c1ee58f4f963b (patch)
treec630cd0a821f604739993dc9ce708c83981695ce /test
parent83de7133876ec392eb4b3b69c2220d7b49685444 (diff)
merge revision(s) ae5458f228a5477383e9c00425d85d50a3867817: [Backport #18475]
thread.c: Convert TAG_BREAK to a normal exception at thread top-level [Bug #18475] --- test/ruby/test_enum.rb | 11 +++++++++++ thread.c | 3 +++ 2 files changed, 14 insertions(+)
Diffstat (limited to 'test')
-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 9f6f19b669..ef732b9924 100644
--- a/test/ruby/test_enum.rb
+++ b/test/ruby/test_enum.rb
@@ -326,6 +326,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