summaryrefslogtreecommitdiff
path: root/version.h
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2023-03-25 15:03:14 +0900
committernagachika <nagachika@ruby-lang.org>2023-03-25 15:03:14 +0900
commitcd4a997e53a02e5a8b24e38a10ba5525c176980e (patch)
treefca7c7566744314f4c254f08b1bc550435bf3e4f /version.h
parentbdbe6053853c11ffe9b8737eb4da50ed84c9dbd6 (diff)
merge revision(s) 548086b34e3dd125edabf5dc1e46b891fad3ea9c,3dc8cde70078ccb38f5f4b0818ad5eecded01bd5,e0cf80d666d4b5df3229f030a16d10d21323508e: [Backport #19529]
ObjectSpace::WeakMap: fix compaction support [Bug #19529] `rb_gc_update_tbl_refs` can't be used on `w->obj2wmap` because it's not a `VALUE -> VALUE` table, but a `VALUE -> VALUE *` table, so we need some dedicated iterator. --- test/ruby/test_weakmap.rb | 8 ++++++++ weakmap.c | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) Fix crash during compaction [Bug #19529] The fix for [Bug #19529] in commit 548086b contained a bug that crashes on the following script: ``` wm = ObjectSpace::WeakMap.new obj = Object.new 100.times do wm[Object.new] = obj GC.start end GC.compact ``` --- test/ruby/test_weakmap.rb | 10 ++++++++++ weakmap.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) Fix incorrect size of WeakMap buffer In wmap_final_func, j is the number of elements + 1 (since j also includes the length at the 0th index), so we should resize the buffer to size j and the new length is j - 1. --- weakmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Diffstat (limited to 'version.h')
-rw-r--r--version.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/version.h b/version.h
index 9bcaa82d62..114ab90195 100644
--- a/version.h
+++ b/version.h
@@ -11,7 +11,7 @@
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
#define RUBY_VERSION_TEENY 4
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 217
+#define RUBY_PATCHLEVEL 218
#define RUBY_RELEASE_YEAR 2023
#define RUBY_RELEASE_MONTH 3