mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
merge revision(s) ae5458f228
: [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(+)
This commit is contained in:
parent
83de713387
commit
ea9b0fe5d3
3 changed files with 17 additions and 2 deletions
|
@ -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
|
||||
|
|
4
thread.c
4
thread.c
|
@ -741,6 +741,10 @@ 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) {
|
||||
/* fatal error within this thread, need to stop whole script */
|
||||
}
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
|
||||
#define RUBY_VERSION_TEENY 6
|
||||
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
|
||||
#define RUBY_PATCHLEVEL 211
|
||||
#define RUBY_PATCHLEVEL 212
|
||||
|
||||
#define RUBY_RELEASE_YEAR 2022
|
||||
#define RUBY_RELEASE_MONTH 3
|
||||
#define RUBY_RELEASE_DAY 5
|
||||
#define RUBY_RELEASE_DAY 19
|
||||
|
||||
#include "ruby/version.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue