clogger RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* [PATCH] mark Rack::HeaderHash for GC.compact
@ 2021-05-24 22:02 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2021-05-24 22:02 UTC (permalink / raw)
  To: clogger-public

With GC.compact in Ruby 3.x, Ruby-defined constants need to be
explicitly marked to prevent movement:

Link: https://yhbt.net/kgio-public/CAAvYYt5Z5f2rMuXO5DMpR1-6uRvu_gXKDvqcyoZ+oNcLiTH39g@mail.gmail.com/T/
---
 ext/clogger_ext/clogger.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ext/clogger_ext/clogger.c b/ext/clogger_ext/clogger.c
index a3de120..079817c 100644
--- a/ext/clogger_ext/clogger.c
+++ b/ext/clogger_ext/clogger.c
@@ -1104,6 +1104,7 @@ void Init_clogger_ext(void)
 	tmp = rb_const_get(rb_cObject, rb_intern("Rack"));
 	tmp = rb_const_get(tmp, rb_intern("Utils"));
 	cHeaderHash = rb_const_get(tmp, rb_intern("HeaderHash"));
+	rb_ary_push(mark_ary, cHeaderHash);
 
 	rb_obj_freeze(mark_ary);
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-24 22:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24 22:02 [PATCH] mark Rack::HeaderHash for GC.compact Eric Wong

Code repositories for project(s) associated with this inbox:

	../../../clogger.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).