diff options
author | NARUSE, Yui <naruse@airemix.jp> | 2022-01-31 11:16:52 +0900 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2022-01-31 11:16:52 +0900 |
commit | 8e3bce0841497fc00ccdaf45f6583c25720a2d3f (patch) | |
tree | b48036d015292bcfe02898ddda3b5f10bb3c3019 | |
parent | abdd655afd6f3f36553e6bb0d6b3e3eac09ae977 (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(+)
-rw-r--r-- | test/ruby/test_enum.rb | 11 | ||||
-rw-r--r-- | thread.c | 3 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 15 insertions, 1 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 @@ -830,6 +830,9 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start) else { errinfo = th->ec->errinfo; + VALUE exc = rb_vm_make_jump_tag_but_local_jump(state, Qundef); + if (!NIL_P(exc)) errinfo = exc; + if (state == TAG_FATAL) { if (th->invoke_type == thread_invoke_type_ractor_proc) { rb_ractor_atexit(th->ec, Qnil); @@ -11,7 +11,7 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 7 +#define RUBY_PATCHLEVEL 8 #define RUBY_RELEASE_YEAR 2022 #define RUBY_RELEASE_MONTH 1 |