diff options
author | nagachika <nagachika@ruby-lang.org> | 2021-10-16 13:28:27 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2021-10-16 13:28:27 +0900 |
commit | 5427b08381fb0d644ec69d5aa94234f90a4fbed1 (patch) | |
tree | 61b93d071417217f96d8c73c9adb698c3ef933a8 /version.h | |
parent | a2fe4b75e4b236ad15778c59ace63006ace53889 (diff) |
merge revision(s) 76228191474c76810043b294a74bbb2f1808b3d9: [Backport #18023]
Fix Ractor.make_shareable changing locals for Procs
env_copy() uses rb_ary_delete_at() with a loop counting up while
iterating through the list of read only locals. rb_ary_delete_at() can
shift elements in the array to an index lesser than the loop index,
causing locals to be missed and set to Qfalse in the returned
environment.
Iterate through the locals in reverse instead, this way the shifting
never happens for locals that are yet to be visited and we process all
the locals in the array.
[Bug #18023]
---
bootstraptest/test_ractor.rb | 22 ++++++++++++++++++++++
vm.c | 2 +-
2 files changed, 23 insertions(+), 1 deletion(-)
Diffstat (limited to 'version.h')
-rw-r--r-- | version.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -12,7 +12,7 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 3 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 144 +#define RUBY_PATCHLEVEL 145 #define RUBY_RELEASE_YEAR 2021 #define RUBY_RELEASE_MONTH 10 |