Skip to content

Commit 9acec7d

Browse files
can't use gc(full=TRUE) on ancient R (#6546)
1 parent 8d77127 commit 9acec7d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

inst/tests/tests.Rraw

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19226,7 +19226,8 @@ test(2286,
1922619226
x<2, structure(list(1), class = "foo"),
1922719227
x<3, structure(list(2), class = "foo"),
1922819228
# Force gc() and some allocations which have a good chance at landing in the region that was earlier left unprotected
19229-
{ gc(full = TRUE); replicate(10, FALSE); x<4 },
19229+
# TODO(R>=3.5.0): no need to branch here for gc(full=TRUE)
19230+
{ if ("full" %in% names(formals(gc))) gc(full = TRUE) else gc(); replicate(10, FALSE); x<4 },
1923019231
`attr<-`(list(3), "class", "foo")),
1923119232
structure(list(1, 2, 3), class = "foo"))
1923219233

0 commit comments

Comments
 (0)