From 9acec7dcda9922365db38da944eda4b4409264a6 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Sat, 28 Sep 2024 16:23:43 -0700 Subject: [PATCH] can't use gc(full=TRUE) on ancient R (#6546) --- inst/tests/tests.Rraw | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inst/tests/tests.Rraw b/inst/tests/tests.Rraw index f12bea83d..89bca1bea 100644 --- a/inst/tests/tests.Rraw +++ b/inst/tests/tests.Rraw @@ -19226,7 +19226,8 @@ test(2286, x<2, structure(list(1), class = "foo"), x<3, structure(list(2), class = "foo"), # Force gc() and some allocations which have a good chance at landing in the region that was earlier left unprotected - { gc(full = TRUE); replicate(10, FALSE); x<4 }, + # TODO(R>=3.5.0): no need to branch here for gc(full=TRUE) + { if ("full" %in% names(formals(gc))) gc(full = TRUE) else gc(); replicate(10, FALSE); x<4 }, `attr<-`(list(3), "class", "foo")), structure(list(1, 2, 3), class = "foo"))