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

clogger RubyGem user+dev discussion/patches/pulls/bugs/help

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhbt.net/clogger-public
	git clone --mirror http://ou63pmih66umazou.onion/clogger-public

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 clogger-public clogger-public/ https://yhbt.net/clogger-public \
		clogger-public@yhbt.net clogger-public@bogomips.org clogger@librelist.org clogger@librelist.com
	public-inbox-index clogger-public

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.clogger
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.clogger
 note: .onion URLs require Tor: https://www.torproject.org/

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

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

AGPL code for this site: git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/public-inbox.git